summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
index 07c82d46194..8f63cecfd39 100644
--- a/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
@@ -62,9 +62,10 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator *B,
if (ExplodedNode *N = C.addTransition()) {
if (!BT)
- BT.reset(new BuiltinBug("Pointer subtraction",
- "Subtraction of two pointers that do not point to "
- "the same memory chunk may cause incorrect result."));
+ BT.reset(
+ new BuiltinBug(this, "Pointer subtraction",
+ "Subtraction of two pointers that do not point to "
+ "the same memory chunk may cause incorrect result."));
BugReport *R = new BugReport(*BT, BT->getDescription(), N);
R->addRange(B->getSourceRange());
C.emitReport(R);
OpenPOWER on IntegriCloud