diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-12-17 13:00:31 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-12-17 13:00:31 +0000 |
commit | 7bfba2f0d3406071958d33c69e376468e5eda832 (patch) | |
tree | a0dcfff243cd988592f9d97f9fe6eae35bb8d161 /clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | |
parent | a2a6e2f28290119dd9f745db44f8173199e9cf61 (diff) | |
download | bcm5719-llvm-7bfba2f0d3406071958d33c69e376468e5eda832.tar.gz bcm5719-llvm-7bfba2f0d3406071958d33c69e376468e5eda832.zip |
Frontend/VerifyDiagnosticConsumer.cpp: Fix an expression that had side-effect.
It had been causing test "Misc/diag-verify.cpp" failure on ms cl.exe. The emission was ordered unexpectedly as below;
First) error: 'error' diagnostics seen but not expected:
Second) error: 'error' diagnostics expected but not seen:
llvm-svn: 146830
Diffstat (limited to 'clang/lib/Frontend/VerifyDiagnosticConsumer.cpp')
-rw-r--r-- | clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 96c990c54f2..88e36ade579 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -459,10 +459,10 @@ static unsigned CheckLists(DiagnosticsEngine &Diags, SourceManager &SourceMgr, } } // Now all that's left in Right are those that were not matched. - - return (PrintProblem(Diags, &SourceMgr, LeftOnly, Label, true) + - PrintProblem(Diags, &SourceMgr, Right.begin(), Right.end(), - Label, false)); + unsigned num = PrintProblem(Diags, &SourceMgr, LeftOnly, Label, true); + num += PrintProblem(Diags, &SourceMgr, Right.begin(), Right.end(), + Label, false); + return num; } /// CheckResults - This compares the expected results to those that |