diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-03-22 15:47:45 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-03-22 15:47:45 +0000 |
| commit | 963809884f3a55208047cc908ec9a700cdff8b37 (patch) | |
| tree | 89058b89fc0c1b41bd5224b29b32c6802ab34b69 /clang/lib/Basic | |
| parent | 64decd3586ee9e8ab785c47b46e462ae035bcfa9 (diff) | |
| download | bcm5719-llvm-963809884f3a55208047cc908ec9a700cdff8b37.tar.gz bcm5719-llvm-963809884f3a55208047cc908ec9a700cdff8b37.zip | |
Fix a thinko and a typo in the delayed-diagnostic code.
llvm-svn: 99178
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/Diagnostic.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index 227c175dc0c..31d3b34c816 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/lib/Basic/Diagnostic.cpp @@ -297,8 +297,8 @@ void Diagnostic::SetDelayedDiagnostic(unsigned DiagID, llvm::StringRef Arg1, return; DelayedDiagID = DiagID; - DelayedDiagArg1 = Arg1; - DelayedDiagArg1 = Arg2; + DelayedDiagArg1 = Arg1.str(); + DelayedDiagArg2 = Arg2.str(); } void Diagnostic::ReportDelayed() { @@ -567,10 +567,11 @@ bool DiagnosticBuilder::Emit() { bool Emitted = DiagObj->ProcessDiag(); // Clear out the current diagnostic object. + unsigned DiagID = DiagObj->CurDiagID; DiagObj->Clear(); // If there was a delayed diagnostic, emit it now. - if (DiagObj->DelayedDiagID) + if (DiagObj->DelayedDiagID && DiagObj->DelayedDiagID != DiagID) DiagObj->ReportDelayed(); // This diagnostic is dead. |

