[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 13:09:36 PDT 2023


aaronpuchert accepted this revision.
aaronpuchert added a subscriber: rupprecht.
aaronpuchert added a comment.
This revision is now accepted and ready to land.

Looks good to me, but let's wait a few days in case @aaron.ballman has anything to add.

@rupprecht, in case you're still doing integration at Google, perhaps you can test this patch. If you're seeing too many new warnings, we might introduce a flag to turn this off (temporarily).



================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1544
   FactSet FSet;
+  // The fact set for the function on exit (i.e., its entry block).
+  const FactSet &FunctionExitFSet;
----------------
Or drop the parenthesized part.


================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:2304-2305
 
+  CFGBlockInfo &Initial = BlockInfo[CFGraph->getEntry().getBlockID()];
+  CFGBlockInfo &Final = BlockInfo[CFGraph->getExit().getBlockID()];
+
----------------
You might want to do the `*` -> `&` in a separate commit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153131



More information about the cfe-commits mailing list