]> granicus.if.org Git - clang/commit
[analyzer] Be more plugin-friendly by moving static locals into .cpp files.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 20 Oct 2018 00:29:24 +0000 (00:29 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 20 Oct 2018 00:29:24 +0000 (00:29 +0000)
commit3f9a2142b46f697d5ec2b911256470152a7097e7
treea1f6afa415f1491e045f06897e7def25a4f49141
parent70f06000b1276168fa683adb4aa589a447090f23
[analyzer] Be more plugin-friendly by moving static locals into .cpp files.

The GDMIndex functions return a pointer that's used as a key for looking up
data, but addresses of local statics defined in header files aren't the same
across shared library boundaries and the result is that analyzer plugins
can't access this data.

Event types are uniqued by using the addresses of a local static defined
in a header files, but it isn't the same across shared library boundaries
and plugins can't currently handle ImplicitNullDerefEvents.

Patches by Joe Ranieri!

Differential Revision: https://reviews.llvm.org/D52905
Differential Revision: https://reviews.llvm.org/D52906

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344823 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/StaticAnalyzer/Core/Checker.h
include/clang/StaticAnalyzer/Core/CheckerManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
lib/StaticAnalyzer/Core/CMakeLists.txt
lib/StaticAnalyzer/Core/Checker.cpp
lib/StaticAnalyzer/Core/DynamicTypeMap.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
lib/StaticAnalyzer/Core/TaintManager.cpp [new file with mode: 0644]