Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13406
llvm-svn: 249484
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index bac9c38..d3d7185 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -1,4 +1,4 @@
-//===--- ASTUnit.cpp - ASTUnit utility ------------------------------------===//
+//===--- ASTUnit.cpp - ASTUnit utility --------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -47,6 +47,7 @@
#include <atomic>
#include <cstdio>
#include <cstdlib>
+
using namespace clang;
using llvm::TimeRecord;
@@ -973,7 +974,7 @@
}
};
-}
+} // anonymous namespace
std::unique_ptr<ASTConsumer>
PrecompilePreambleAction::CreateASTConsumer(CompilerInstance &CI,
@@ -2120,7 +2121,7 @@
return Next.getCodeCompletionTUInfo();
}
};
-}
+} // anonymous namespace
/// \brief Helper function that computes which global names are hidden by the
/// local code-completion results.
@@ -2206,7 +2207,6 @@
}
}
-
void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S,
CodeCompletionContext Context,
CodeCompletionResult *Results,
@@ -2840,9 +2840,9 @@
#else // NDEBUG
-ASTUnit::ConcurrencyState::ConcurrencyState() { Mutex = 0; }
+ASTUnit::ConcurrencyState::ConcurrencyState() { Mutex = nullptr; }
ASTUnit::ConcurrencyState::~ConcurrencyState() {}
void ASTUnit::ConcurrencyState::start() {}
void ASTUnit::ConcurrencyState::finish() {}
-#endif
+#endif // NDEBUG