[PATCH] D65723: [analyzer][NFC] Add different interestingness kinds
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 15:10:35 PDT 2019
NoQ accepted this revision.
NoQ added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:92-101
/// Default tracking kind -- specifies that as much information should be
/// gathered about the tracked expression value as possible.
- Thorough,
+ Thorough = 0,
/// Specifies that a more moderate tracking should be used for the expression
/// value. This will essentially make sure that functions relevant to the it
/// aren't pruned, but otherwise relies on the user reading the code or
/// following the arrows.
----------------
We usually rely on our "unhandled switch case" warnings for noticing all the places which we need to expand when we're adding a new case. Your approach requires adding static asserts all over the place instead - not sure what's better. I guess they're not generally mutually exclusive, however `NumTrackingKinds` makes it impossible to handle all cases in a switch (because `NumTrackingKinds` itself wouldn't ever be handled). I took some sort of middleground approach in `CFGTerminator::Kind` in D61814 but i'm very much open to suggestions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65723/new/
https://reviews.llvm.org/D65723
More information about the cfe-commits
mailing list