diff options
author | John McCall <rjmccall@apple.com> | 2012-05-07 06:16:41 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-05-07 06:16:41 +0000 |
commit | 2ec85375ebee3fcc485a45b387378f66ee8a3553 (patch) | |
tree | bd9faa806c711db173a39afcf1eedbcf7963ab75 /clang/lib/Sema/Sema.cpp | |
parent | 02d06b95aa326138473ab4109aebf10e2cac2d79 (diff) | |
download | bcm5719-llvm-2ec85375ebee3fcc485a45b387378f66ee8a3553.tar.gz bcm5719-llvm-2ec85375ebee3fcc485a45b387378f66ee8a3553.zip |
Refactor DelayedDiagnostics so that it keeps diagnostics in
separate pools owned by the RAII objects that keep pushing
decl state. This gives us quite a bit more flexibility.
llvm-svn: 156289
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 5853f7f394c..ca3e233cb7e 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -18,6 +18,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/APFloat.h" +#include "llvm/Support/CrashRecoveryContext.h" #include "clang/Sema/CXXFieldCollector.h" #include "clang/Sema/TemplateDeduction.h" #include "clang/Sema/ExternalSemaSource.h" @@ -201,7 +202,6 @@ Sema::~Sema() { ExternalSema->ForgetSema(); } - /// makeUnavailableInSystemHeader - There is an error in the current /// context. If we're still in a system header, and we can plausibly /// make the relevant declaration unavailable instead of erroring, do @@ -426,6 +426,9 @@ void Sema::LoadExternalWeakUndeclaredIdentifiers() { /// translation unit when EOF is reached and all but the top-level scope is /// popped. void Sema::ActOnEndOfTranslationUnit() { + assert(DelayedDiagnostics.getCurrentPool() == NULL + && "reached end of translation unit with a pool attached?"); + // Only complete translation units define vtables and perform implicit // instantiations. if (TUKind == TU_Complete) { |