From d612566385cb20fb867af6d8d6e0c5f138a963d7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 5 Nov 2012 23:58:27 +0000 Subject: 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 --- clang/lib/Parse/ParseAST.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'clang/lib/Parse/ParseAST.cpp') 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 -- cgit v1.2.3