Skip to content

Commit

Permalink
[LLVM] Do not evaluate dependent immediate invocations
Browse files Browse the repository at this point in the history
This is an adaptation of commit 6627da7
Fixes root-project#13698, a problem
with the new C++ headers from the new macOS SDK.
  • Loading branch information
dpiparo committed Sep 26, 2023
1 parent 14673b8 commit 84bee48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interpreter/llvm/src/tools/clang/lib/Sema/SemaExpr.cpp
Expand Up @@ -18763,7 +18763,7 @@ void Sema::MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base) {

if (auto *FD = dyn_cast<FunctionDecl>(E->getDecl()))
if (!isConstantEvaluated() && FD->isConsteval() &&
!RebuildingImmediateInvocation)
!RebuildingImmediateInvocation && !FD->isDependentContext())
ExprEvalContexts.back().ReferenceToConsteval.insert(E);
MarkExprReferenced(*this, E->getLocation(), E->getDecl(), E, OdrUse,
RefsMinusAssignments);
Expand Down

0 comments on commit 84bee48

Please sign in to comment.