================
@@ -7551,6 +7551,11 @@ EnableIfAttr *Sema::CheckEnableIf(FunctionDecl *Function,
return nullptr;
SFINAETrap Trap(*this);
+ // Perform the access checking immediately so any access diagnostics are
+ // caught by the SFINAE trap.
+ llvm::scope_exit _([&, CurrentState(DelayedDiagnostics.pushUndelayed())] {
----------------
shafik wrote:
@erichkeane made a similar comment in the last version of this PR that this
should be explicitly named. This could show up in a stack trace or we may have
to step into in a debugger and having a name really helps.
https://github.com/llvm/llvm-project/pull/176080
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits