[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas
    Aaron Ballman via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Mar 29 11:00:46 PDT 2023
    
    
  
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM aside from a minor nit, though I have some minor concerns that we may silently break people's code by calling different overloads or instantiating templates differently so I wonder if this is a potentially breaking change or not. I think we can leave it out of the potentially breaking changes section unless we get some reports about a behavior change organically during this release cycle?
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:1138
     if (C.isCopyCapture()) {
-      ClassType.removeLocalCVRQualifiers(Qualifiers::CVRMask);
-      if (!CurLSI->Mutable)
+        if (!CurLSI->Mutable)
         ClassType.addConst();
----------------
This looks like an accidental formatting mistake that can be backed out.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146168/new/
https://reviews.llvm.org/D146168
    
    
More information about the cfe-commits
mailing list