summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/ParseAST.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-17 15:44:30 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-17 15:44:30 +0000
commit4ad3da2843da1e8c8da6a87548ae8ec393512c23 (patch)
treea995f0aeb35ca1d6a9d92dd4a94404032388111c /clang/lib/Sema/ParseAST.cpp
parent22fde23b6e125317828d7c07b86c8e7be16440a5 (diff)
downloadbcm5719-llvm-4ad3da2843da1e8c8da6a87548ae8ec393512c23.tar.gz
bcm5719-llvm-4ad3da2843da1e8c8da6a87548ae8ec393512c23.zip
Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully. llvm-svn: 98727
Diffstat (limited to 'clang/lib/Sema/ParseAST.cpp')
-rw-r--r--clang/lib/Sema/ParseAST.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/ParseAST.cpp b/clang/lib/Sema/ParseAST.cpp
index 898b3c230e8..7cd39895f6f 100644
--- a/clang/lib/Sema/ParseAST.cpp
+++ b/clang/lib/Sema/ParseAST.cpp
@@ -44,7 +44,8 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer,
Sema S(PP, Ctx, *Consumer, CompleteTranslationUnit, CompletionConsumer);
Parser P(PP, S);
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
// Initialize the parser.
P.Initialize();
OpenPOWER on IntegriCloud