[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)
Yupei Liu via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 6 11:34:10 PDT 2024
================
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII::
SemaRef.RebuildLambdaScopeInfo(cast<CXXMethodDecl>(FD));
- FunctionDecl *Pattern = getPatternFunctionDecl(FD);
- if (Pattern) {
- SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL);
+ FunctionDecl *FDPattern = getPatternFunctionDecl(FD);
+ if (!FDPattern)
+ return;
----------------
LYP951018 wrote:
I would prefer to keep the current change. Firstly, this change is minimal and won’t significantly impact the review workload for this PR. Secondly, it reduces one level of indentation, which slightly improves readability. ;)
https://github.com/llvm/llvm-project/pull/97215
More information about the cfe-commits
mailing list