aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-12-01 22:02:27 +0000
committerReid Kleckner <reid@kleckner.net>2014-12-01 22:02:27 +0000
commitee7cf84c8feb9ddc93fc5917e04d9db1a375db5f (patch)
tree390ec6b0d704161cbf2fcda48a5e03a247bfaecc /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
parent337c4bd4abac1198312d5d009cf6185063c97812 (diff)
downloadllvm-ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f.zip
llvm-ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f.tar.gz
llvm-ee7cf84c8feb9ddc93fc5917e04d9db1a375db5f.tar.bz2
Use nullptr to silence -Wsentinel when self-hosting on Windows
Richard rejected my Sema change to interpret an integer literal zero in a varargs context as a null pointer, so -Wsentinel sees an integer literal zero and fires off a warning. Only CodeGen currently knows that it promotes integer literal zeroes in this context to pointer size on Windows. I didn't want to teach -Wsentinel about that compatibility hack. Therefore, I'm migrating to C++11 nullptr. llvm-svn: 223079
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 447e66d..9a460ba 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -1580,19 +1580,19 @@ void RetainSummaryManager::InitializeMethodSummaries() {
// Create summaries QCRenderer/QCView -createSnapShotImageOfType:
addInstMethSummary("QCRenderer", AllocSumm,
- "createSnapshotImageOfType", NULL);
+ "createSnapshotImageOfType", nullptr);
addInstMethSummary("QCView", AllocSumm,
- "createSnapshotImageOfType", NULL);
+ "createSnapshotImageOfType", nullptr);
// Create summaries for CIContext, 'createCGImage' and
// 'createCGLayerWithSize'. These objects are CF objects, and are not
// automatically garbage collected.
addInstMethSummary("CIContext", CFAllocSumm,
- "createCGImage", "fromRect", NULL);
- addInstMethSummary("CIContext", CFAllocSumm,
- "createCGImage", "fromRect", "format", "colorSpace", NULL);
- addInstMethSummary("CIContext", CFAllocSumm, "createCGLayerWithSize",
- "info", NULL);
+ "createCGImage", "fromRect", nullptr);
+ addInstMethSummary("CIContext", CFAllocSumm, "createCGImage", "fromRect",
+ "format", "colorSpace", nullptr);
+ addInstMethSummary("CIContext", CFAllocSumm, "createCGLayerWithSize", "info",
+ nullptr);
}
//===----------------------------------------------------------------------===//