NoQ added inline comments.

================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1729
+  handleBlockThatIsGuaranteedToBeCalledOnce(const BlockDecl *Block) override {
+    Data.flushWarnings(Block, S);
+  }
----------------
Do i understand correctly that you're relying on the order in which your 
analysis is invoked from Sema? I.e., Sema parses the inner block before the 
outer function, so it'll analyze the block first, so by the time you see a 
block expression in the surrounding function you'll already have all 
diagnostics for the block readily available and no other diagnostics will ever 
show up, right?


================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2206
 
+sema::AnalysisBasedWarnings::~AnalysisBasedWarnings() { delete IPData; }
+
----------------
Do we really need manual new-delete here? Ownership semantics don't seem to be 
that complicated, a `unique_ptr` would probably suffice. Or maybe even just 
store it by value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98688

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to