aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/Checker.h
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-10-05 23:37:30 +0000
committerAnna Zaks <ganna@apple.com>2011-10-05 23:37:30 +0000
commitdff6ef903ff4fcb43b5ea292ecd772e381393b5d (patch)
tree209013fabf0d310998b3bc50a81131a21bc152f3 /include/clang/StaticAnalyzer/Core/Checker.h
parent9dd0065e61ea4b48b19eee550704ce964e64e946 (diff)
[analyzer] OSAtomicChecker implements evalCall in a very invasive way - it essentially simulates inlining of compareAndSwap() by means of setting the NodeBuilder flags and calling ExprEngine directly.
This commit introduces a new callback just for this checker to unblock checker API cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/Checker.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/Checker.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/StaticAnalyzer/Core/Checker.h b/include/clang/StaticAnalyzer/Core/Checker.h
index 268c85b068..82fbd46222 100644
--- a/include/clang/StaticAnalyzer/Core/Checker.h
+++ b/include/clang/StaticAnalyzer/Core/Checker.h
@@ -333,6 +333,23 @@ public:
}
};
+class InlineCall {
+ template <typename CHECKER>
+ static bool _inlineCall(void *checker, const CallExpr *CE,
+ ExprEngine &Eng,
+ ExplodedNode *Pred,
+ ExplodedNodeSet &Dst) {
+ return ((const CHECKER *)checker)->inlineCall(CE, Eng, Pred, Dst);
+ }
+
+public:
+ template <typename CHECKER>
+ static void _register(CHECKER *checker, CheckerManager &mgr) {
+ mgr._registerForInlineCall(
+ CheckerManager::InlineCallFunc(checker, _inlineCall<CHECKER>));
+ }
+};
+
} // end eval namespace
class CheckerBase : public ProgramPointTag {