diff options
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index f5c85ad99c..95f08bdf01 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -269,8 +269,10 @@ void Sema::ActOnEndOfTranslationUnit() { true)), UnusedFileScopedDecls.end()); - if (!CompleteTranslationUnit) + if (!CompleteTranslationUnit) { + TUScope = 0; return; + } // Check for #pragma weak identifiers that were never declared // FIXME: This will cause diagnostics to be emitted in a non-determinstic @@ -340,6 +342,8 @@ void Sema::ActOnEndOfTranslationUnit() { Diag((*I)->getLocation(), diag::warn_unused_variable) << cast<VarDecl>(*I)->getDeclName(); } + + TUScope = 0; } |