summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/ParseAST.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/ParseAST.cpp b/clang/lib/Sema/ParseAST.cpp
index fcdc27b10ae..cff3ef7612e 100644
--- a/clang/lib/Sema/ParseAST.cpp
+++ b/clang/lib/Sema/ParseAST.cpp
@@ -38,8 +38,9 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats) {
PP.getIdentifierTable(), PP.getSelectorTable());
TranslationUnit TU(Context, PP.getLangOptions());
-
- Parser P(PP, *new Sema(PP, Context, *Consumer));
+
+ Sema S(PP, Context, *Consumer);
+ Parser P(PP, S);
PP.EnterMainSourceFile();
// Initialize the parser.
OpenPOWER on IntegriCloud