llvm-project/clang/lib
Kristof Umann fff01c8ec2 [analyzer][NFC] Add different interestingness kinds
We defined (on the mailing list and here on phabricator) 2 different cases where
retrieving information about a control dependency condition is very important:

* When the condition's last write happened in a different stack frame
* When the collapse point of the condition (when we can constrain it to be
true/false) didn't happen in the actual condition.

It seems like we solved this problem with the help of expression value tracking,
and have started working on better diagnostics notes about this process.

Expression value tracking is nothing more than registering a variety of visitors
to construct reports about it. Each of the registered visitors (ReturnVisitor,
FindLastStoreVisitor, NoStoreFuncVisitor, etc) have something to go by: a
MemRegion, an SVal, an ExplodedNode, etc. For this reason, better explaining a
last write is super simple, we can always just pass on some more information to
the visitor in question (as seen in D65575).

ConditionBRVisitor is a different beast, as it was built for a different
purpose. It is responsible for constructing events at, well, conditions, and is
registered only once, and isn't a part of the "expression value tracking
family". Unfortunately, it is also the visitor to tinker with for constructing
better diagnostics about the collapse point problem.

This creates a need for alternative way to communicate with ConditionBRVisitor
that a specific condition is being tracked for for the reason of being a control
dependency. Since at almost all PathDiagnosticEventPiece construction the
visitor checks interestingness, it makes sense to pair interestingness with a
reason as to why we marked an entity as such.

Differential Revision: https://reviews.llvm.org/D65723

llvm-svn: 369583
2019-08-21 21:33:25 +00:00
..
ARCMigrate [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
AST [ASTImporter] Import ctor initializers after setting flags. 2019-08-16 12:10:03 +00:00
ASTMatchers [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Analysis [clang] Use the new Regex::isValid() with no parameter 2019-08-20 16:07:31 +00:00
Basic clang: Fix typo in comment 2019-08-21 15:37:27 +00:00
CodeGen [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new pass manager 2019-08-21 17:24:14 +00:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver win: Enable /Zc:twoPhase by default if targeting MSVC 2017 update 3 or newer 2019-08-20 16:28:11 +00:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] Fix a bug that joins template closer and = 2019-08-18 18:51:39 +00:00
Frontend Implement P1668R1 2019-08-19 17:39:59 +00:00
FrontendTool [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Headers [OpenCL] Fix lang mode predefined macros for C++ mode. 2019-08-12 10:44:07 +00:00
Index [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Lex clang: Fix typo in comment 2019-08-21 15:41:29 +00:00
Parse [Attr] Support _attribute__ ((fallthrough)) 2019-08-20 17:16:49 +00:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema clang: Fix typo in comment 2019-08-21 15:52:44 +00:00
Serialization [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
StaticAnalyzer [analyzer][NFC] Add different interestingness kinds 2019-08-21 21:33:25 +00:00
Tooling [Syntax] Added function to get macro expansion tokens to TokenBuffer. 2019-08-20 13:34:01 +00:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00