aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/ParseAST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/ParseAST.cpp')
-rw-r--r--lib/Sema/ParseAST.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp
index b27734745a..448556092f 100644
--- a/lib/Sema/ParseAST.cpp
+++ b/lib/Sema/ParseAST.cpp
@@ -13,6 +13,7 @@
#include "clang/Sema/ParseAST.h"
#include "Sema.h"
+#include "clang/Sema/SemaConsumer.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/Stmt.h"
@@ -46,6 +47,9 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer,
Consumer->Initialize(Ctx);
+ if (SemaConsumer *SC = dyn_cast<SemaConsumer>(Consumer))
+ SC->InitializeSema(S);
+
if (Ctx.getExternalSource())
Ctx.getExternalSource()->StartTranslationUnit(Consumer);