summaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 18:11:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 18:11:16 +0000
commit59d1ed5b206db2a86b3b5bb851f393c43b568ce2 (patch)
treed4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
parent91bc56ed825ba56b3cc264aa5c95ab84f86832ab (diff)
parent9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (diff)
downloadsrc-test2-59d1ed5b206db2a86b3b5bb851f393c43b568ce2.tar.gz
src-test2-59d1ed5b206db2a86b3b5bb851f393c43b568ce2.zip
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp b/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
index 5678ece0c822..0f5a1b3ffbd6 100644
--- a/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
+++ b/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
@@ -23,9 +23,9 @@
#include "clang/Sema/ExternalSemaSource.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaConsumer.h"
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include <cstdio>
+#include <memory>
using namespace clang;
@@ -36,7 +36,7 @@ class PrettyStackTraceParserEntry : public llvm::PrettyStackTraceEntry {
const Parser &P;
public:
PrettyStackTraceParserEntry(const Parser &p) : P(p) {}
- virtual void print(raw_ostream &OS) const;
+ void print(raw_ostream &OS) const override;
};
/// If a crash happens while the parser is active, print out a line indicating
@@ -88,7 +88,8 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer,
CodeCompleteConsumer *CompletionConsumer,
bool SkipFunctionBodies) {
- OwningPtr<Sema> S(new Sema(PP, Ctx, *Consumer, TUKind, CompletionConsumer));
+ std::unique_ptr<Sema> S(
+ new Sema(PP, Ctx, *Consumer, TUKind, CompletionConsumer));
// Recover resources if we crash before exiting this method.
llvm::CrashRecoveryContextCleanupRegistrar<Sema> CleanupSema(S.get());
@@ -109,8 +110,8 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) {
ASTConsumer *Consumer = &S.getASTConsumer();
- OwningPtr<Parser> ParseOP(new Parser(S.getPreprocessor(), S,
- SkipFunctionBodies));
+ std::unique_ptr<Parser> ParseOP(
+ new Parser(S.getPreprocessor(), S, SkipFunctionBodies));
Parser &P = *ParseOP.get();
PrettyStackTraceParserEntry CrashInfo(P);