diff options
author | Manuel Klimek <klimek@google.com> | 2013-07-18 14:23:12 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-07-18 14:23:12 +0000 |
commit | be0474c047b1cb01225494ccb3210d501490685c (patch) | |
tree | c418f81fc92b19ad8269ea7d763399b81e157c59 /clang/lib/Frontend | |
parent | 655bd0d08ca6df5898c9e64bd00ea39841932edb (diff) | |
download | bcm5719-llvm-be0474c047b1cb01225494ccb3210d501490685c.tar.gz bcm5719-llvm-be0474c047b1cb01225494ccb3210d501490685c.zip |
Fix crash in libclang if code completion is used with unknown flags.
Use CaptureDroppedDiagnostics to make sure that there is a diagnostic
client installed when warning flags are parsed.
llvm-svn: 186582
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index c1f6bc5bb0e..9251fc0daa0 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2410,10 +2410,10 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column, // Set up diagnostics, capturing any diagnostics produced. Clang->setDiagnostics(&Diag); - ProcessWarningOptions(Diag, CCInvocation->getDiagnosticOpts()); CaptureDroppedDiagnostics Capture(true, Clang->getDiagnostics(), StoredDiagnostics); + ProcessWarningOptions(Diag, CCInvocation->getDiagnosticOpts()); // Create the target instance. Clang->setTarget(TargetInfo::CreateTargetInfo(Clang->getDiagnostics(), |