summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
diff options
context:
space:
mode:
authorGabor Horvath <xazax@google.com>2019-12-09 16:26:38 -0800
committerGabor Horvath <xazax@google.com>2019-12-11 11:44:10 -0800
commit5882e6f36fd9bfc7382e6763c5591b3497428d83 (patch)
treea92ae113503296056e71cafeb7a63b83e0065558 /clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
parent19e83a9b4cd4b0c2918d975f52bdfc6ba82d839f (diff)
downloadbcm5719-llvm-5882e6f36fd9bfc7382e6763c5591b3497428d83.tar.gz
bcm5719-llvm-5882e6f36fd9bfc7382e6763c5591b3497428d83.zip
[analyzer] Escape symbols conjured into specific regions during a conservative EvalCall
This patch introduced additional PointerEscape callbacks after conservative calls for output parameters. This should not really affect the current checkers but the upcoming FuchsiaHandleChecker relies on this heavily. Differential Revision: https://reviews.llvm.org/D71224
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
index d0def691893..2ef50a727ec 100644
--- a/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
@@ -40,6 +40,7 @@ class AnalysisOrderChecker
check::EndFunction,
check::NewAllocator,
check::Bind,
+ check::PointerEscape,
check::RegionChanges,
check::LiveSymbols> {
@@ -165,6 +166,15 @@ public:
llvm::errs() << "RegionChanges\n";
return State;
}
+
+ ProgramStateRef checkPointerEscape(ProgramStateRef State,
+ const InvalidatedSymbols &Escaped,
+ const CallEvent *Call,
+ PointerEscapeKind Kind) const {
+ if (isCallbackEnabled(State, "PointerEscape"))
+ llvm::errs() << "PointerEscape\n";
+ return State;
+ }
};
} // end anonymous namespace
OpenPOWER on IntegriCloud