This revision was automatically updated to reflect the committed changes.
Closed by commit rL287380: [analyzer] Refactor recursive symbol reachability
check to use symbol_iterator (authored by ddcc).
Changed prior to commit:
https://reviews.llvm.org/D26773?vs=78392=78575#toc
Repository:
rL
NoQ added a comment.
Yep, looks correct now :)
https://reviews.llvm.org/D26773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ddcc added a comment.
I believe you're correct, the original code terminates early because of the
short circuit evaluation on line 553, and visits all reachable nodes but
doesn't recurse on non-SymbolData.
https://reviews.llvm.org/D26773
___
ddcc updated this revision to Diff 78392.
ddcc added a comment.
Fix visitation, add early termination, add comments
https://reviews.llvm.org/D26773
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lib/StaticAnalyzer/Core/ProgramState.cpp
Index:
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:535
+if (!isa(*SI))
+ continue;
Hmm, the original code does actually visit non-SymbolData.
https://reviews.llvm.org/D26773
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:542
+if (!visitor.VisitSymbol(*SI))
+ Result = false;
}
I guess we should break the loop here.
https://reviews.llvm.org/D26773
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Thank you for the cleanup!!! For bonus points, please add comments to the class
APIs:)
https://reviews.llvm.org/D26773
___
cfe-commits
ddcc created this revision.
ddcc added reviewers: zaks.anna, dcoughlin.
ddcc added a subscriber: cfe-commits.
https://reviews.llvm.org/D26773
Files:
lib/StaticAnalyzer/Core/ProgramState.cpp
Index: lib/StaticAnalyzer/Core/ProgramState.cpp