r349938 - [analyzer] Correct the summary violation diagnostics for the retain count checker
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 21 11:13:28 PST 2018
Author: george.karpenkov
Date: Fri Dec 21 11:13:28 2018
New Revision: 349938
URL: http://llvm.org/viewvc/llvm-project?rev=349938&view=rev
Log:
[analyzer] Correct the summary violation diagnostics for the retain count checker
It should be in the past tense.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
cfe/trunk/test/Analysis/osobject-retain-release.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp?rev=349938&r1=349937&r2=349938&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Fri Dec 21 11:13:28 2018
@@ -285,7 +285,7 @@ annotateConsumedSummaryMismatch(const Ex
os << "Parameter '";
PVD->getNameForDiagnostic(os, PVD->getASTContext().getPrintingPolicy(),
/*Qualified=*/false);
- os << "' is marked as consuming, but the function does not consume "
+ os << "' is marked as consuming, but the function did not consume "
<< "the reference\n";
}
}
Modified: cfe/trunk/test/Analysis/osobject-retain-release.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/osobject-retain-release.cpp?rev=349938&r1=349937&r2=349938&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/osobject-retain-release.cpp (original)
+++ cfe/trunk/test/Analysis/osobject-retain-release.cpp Fri Dec 21 11:13:28 2018
@@ -99,7 +99,7 @@ bool os_consume_violation_two_args(OS_CO
escape(obj);
return true;
}
- return false; // expected-note{{Parameter 'obj' is marked as consuming, but the function does not consume the reference}}
+ return false; // expected-note{{Parameter 'obj' is marked as consuming, but the function did not consume the reference}}
}
bool os_consume_violation(OS_CONSUME OSObject *obj) {
@@ -108,7 +108,7 @@ bool os_consume_violation(OS_CONSUME OSO
escape(obj);
return true;
}
- return false; // expected-note{{Parameter 'obj' is marked as consuming, but the function does not consume the reference}}
+ return false; // expected-note{{Parameter 'obj' is marked as consuming, but the function did not consume the reference}}
}
void os_consume_ok(OS_CONSUME OSObject *obj) {
More information about the cfe-commits
mailing list