diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp index e7def08..e2577c3 100644 --- a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp +++ b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp @@ -20,11 +20,11 @@ #include "clang/StaticAnalyzer/Core/CheckerOptInfo.h" #include "clang/StaticAnalyzer/Core/CheckerRegistry.h" #include "clang/StaticAnalyzer/Frontend/FrontendActions.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/DynamicLibrary.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include <memory> using namespace clang; using namespace ento; @@ -40,7 +40,7 @@ class ClangCheckerRegistry : public CheckerRegistry { public: ClangCheckerRegistry(ArrayRef<std::string> plugins, - DiagnosticsEngine *diags = 0); + DiagnosticsEngine *diags = nullptr); }; } // end anonymous namespace @@ -73,7 +73,7 @@ ClangCheckerRegistry::ClangCheckerRegistry(ArrayRef<std::string> plugins, bool ClangCheckerRegistry::isCompatibleAPIVersion(const char *versionString) { // If the version string is null, it's not an analyzer plugin. - if (versionString == 0) + if (!versionString) return false; // For now, none of the static analyzer API is considered stable. @@ -104,8 +104,8 @@ CheckerManager *ento::createCheckerManager(AnalyzerOptions &opts, const LangOptions &langOpts, ArrayRef<std::string> plugins, DiagnosticsEngine &diags) { - OwningPtr<CheckerManager> checkerMgr(new CheckerManager(langOpts, - &opts)); + std::unique_ptr<CheckerManager> checkerMgr( + new CheckerManager(langOpts, &opts)); SmallVector<CheckerOptInfo, 8> checkerOpts; for (unsigned i = 0, e = opts.CheckersControlList.size(); i != e; ++i) { @@ -123,7 +123,7 @@ CheckerManager *ento::createCheckerManager(AnalyzerOptions &opts, << checkerOpts[i].getName(); } - return checkerMgr.take(); + return checkerMgr.release(); } void ento::printCheckerHelp(raw_ostream &out, ArrayRef<std::string> plugins) { |