diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-11-05 23:58:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-11-05 23:58:27 +0000 |
commit | d612566385cb20fb867af6d8d6e0c5f138a963d7 (patch) | |
tree | 0175436a0bb676dbb4bb5a060517abdaaf6946ea /clang/lib/Parse/ParseAST.cpp | |
parent | 48c5b8e6592523b75202c0e3ab95c8acba2465aa (diff) | |
download | bcm5719-llvm-d612566385cb20fb867af6d8d6e0c5f138a963d7.tar.gz bcm5719-llvm-d612566385cb20fb867af6d8d6e0c5f138a963d7.zip |
Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.
llvm-svn: 167423
Diffstat (limited to 'clang/lib/Parse/ParseAST.cpp')
-rw-r--r-- | clang/lib/Parse/ParseAST.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseAST.cpp b/clang/lib/Parse/ParseAST.cpp index bd4f8595212..7d68e1f37e4 100644 --- a/clang/lib/Parse/ParseAST.cpp +++ b/clang/lib/Parse/ParseAST.cpp @@ -78,7 +78,6 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { S.getPreprocessor().EnterMainSourceFile(); P.Initialize(); - S.Initialize(); // C11 6.9p1 says translation units must have at least one top-level // declaration. C++ doesn't have this restriction. We also don't want to |