[PATCH] D93110: [analyzer] Implement a first version of suppressions via attributes
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 14 11:15:33 PST 2020
jkorous added a comment.
Thanks for working on this!
================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2907
+ // start with it.
+ llvm::SmallVector<DynTypedNode, 8> Stack{DynTypedNode::create(*BugStmt)};
+
----------------
Since IIUC a node can have multiple parents - does that mean we could end up traversing a node multiple times?
BTW do you have an example of a node that have multiple parents?
================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2936
+ // Let's continue with the current node's parent(s).
+ for (const auto &Parent : AC.getParents(Current)) {
+ Stack.push_back(Parent);
----------------
There's a note for `ASTContext::getParents`:
"New callers should use ParentMapContext::getParents() directly."
https://clang.llvm.org/doxygen/classclang_1_1ASTContext.html#a32d11844fdb82310b9059784fd4ceb6b
Shall we do that?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93110/new/
https://reviews.llvm.org/D93110
More information about the cfe-commits
mailing list