diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 03:23:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 03:23:19 +0000 |
commit | 81f5a1e699b2eefa4a5e50b5dfc06df600748f59 (patch) | |
tree | 26baa722bb2441581b11c915d87c37b0c8e6ae73 /include/clang/Frontend/CompilerInstance.h | |
parent | 0ba63ea5be2c90ef62d1350ea4a0a0c415a785f1 (diff) |
Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.
- This also tweaks a few things:
o Errors are now just regular diagnostics.
o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.
- Not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 5e347061cc..ecfd509acf 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -210,7 +210,10 @@ public: /// instance takes ownership of \arg Value. void setDiagnostics(Diagnostic *Value); - DiagnosticClient &getDiagnosticClient() const; + DiagnosticClient &getDiagnosticClient() const { + assert(Target && "Compiler instance has no diagnostic client!"); + return *DiagClient; + } /// takeDiagnosticClient - Remove the current diagnostics client and give /// ownership to the caller. |