[PATCH] D102531: PR45881: Properly use CXXThisOverride for templated lambda

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 17 06:02:29 PDT 2021


aaron.ballman added a comment.

Mostly just superficial comments from me at this point.



================
Comment at: clang/lib/Sema/SemaTemplate.cpp:5094-5095
+    bool ForLambdaCallOperator = false;
+    if (CXXRecordDecl *Rec =
+            dyn_cast<CXXRecordDecl>(Template->getDeclContext()))
+      ForLambdaCallOperator = Rec->isLambda();
----------------



================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:2865
+      CXXRecordDecl *ThisContext = nullptr;
+      if (CXXRecordDecl *Rec = dyn_cast<CXXRecordDecl>(TD->getDeclContext()))
+        if (Rec->isLambda())
----------------



================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:2867
+        if (Rec->isLambda())
+          if (CXXMethodDecl *Method =
+                  dyn_cast<CXXMethodDecl>(Rec->getDeclContext())) {
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102531/new/

https://reviews.llvm.org/D102531



More information about the cfe-commits mailing list