diff options
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. |