diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-26 06:22:03 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-26 06:22:03 +0000 |
commit | 6b8c5857eb9d309f9adb9149d9f383a29a9b68e7 (patch) | |
tree | 56e8b6db6892b13eea6e33509cb7751501b94409 /lib/Sema/AnalysisBasedWarnings.cpp | |
parent | b0449def46f3e7efc8dd134ac68ce71399ba6573 (diff) |
[C++11] Use 'nullptr'. Sema edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index 048019f994..7f2748ede1 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -241,7 +241,7 @@ static void checkRecursiveFunction(Sema &S, const FunctionDecl *FD, return; CFG *cfg = AC.getCFG(); - if (cfg == 0) return; + if (!cfg) return; // If the exit block is unreachable, skip processing the function. if (cfg->getExit().pred_empty()) @@ -282,7 +282,7 @@ enum ControlFlowKind { /// will return. static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) { CFG *cfg = AC.getCFG(); - if (cfg == 0) return UnknownFallThrough; + if (!cfg) return UnknownFallThrough; // The CFG leaves in dead things, and we don't want the dead code paths to // confuse us, so we mark all live things first. @@ -1033,7 +1033,7 @@ namespace { if (hasSpecificAttr<FallThroughAttr>(AS->getAttrs())) return AS; } - return 0; + return nullptr; } static const Stmt *getLastStmt(const CFGBlock &B) { @@ -1052,7 +1052,7 @@ namespace { if (!isa<SwitchCase>(SW->getSubStmt())) return SW->getSubStmt(); - return 0; + return nullptr; } bool FoundSwitchStatements; @@ -1335,7 +1335,7 @@ class UninitValsDiagReporter : public UninitVariablesHandler { UsesMap *uses; public: - UninitValsDiagReporter(Sema &S) : S(S), uses(0) {} + UninitValsDiagReporter(Sema &S) : S(S), uses(nullptr) {} ~UninitValsDiagReporter() { flushDiagnostics(); } @@ -1783,7 +1783,7 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, assert(Body); // Construct the analysis context with the specified CFG build options. - AnalysisDeclContext AC(/* AnalysisDeclContextManager */ 0, D); + AnalysisDeclContext AC(/* AnalysisDeclContextManager */ nullptr, D); // Don't generate EH edges for CallExprs as we'd like to avoid the n^2 // explosion for destructors that can result and the compile time hit. |