[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

Chris Cotter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 7 17:25:39 PST 2023


ccotter marked 2 inline comments as done.
ccotter added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithCaptureDefaultCheck.cpp:35
+            Capture.getLocation(), SourceMgr, Context.getLangOpts(), tok::amp);
+        llvm::errs() << "FOR REF capture loc= "
+                     << Capture.getLocation().printToString(SourceMgr)
----------------
carlosgalvezp wrote:
> Not having being involved in the development of this check I don't quite understand what this error message means, could you provide a more descriptive message?
> 
> It's also unclear if the program is supposed to abort when entering this branch, or if it's expected that it returns just fine? If it's supposed to return just fine, I think the check should not print anything, to keep the users' logs clean.
My bad - I forgot to remove this trace. Both branches are valid branches for normal program execution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141133



More information about the cfe-commits mailing list