From: George Karpenkov Date: Fri, 21 Dec 2018 19:13:28 +0000 (+0000) Subject: [analyzer] Correct the summary violation diagnostics for the retain count checker X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af36987d2a76530d428adf7c191ae1c8d8080a5a;p=clang [analyzer] Correct the summary violation diagnostics for the retain count checker It should be in the past tense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349938 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp index 8fdd105f18..74dd1e149e 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp @@ -285,7 +285,7 @@ annotateConsumedSummaryMismatch(const ExplodedNode *N, 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"; } } diff --git a/test/Analysis/osobject-retain-release.cpp b/test/Analysis/osobject-retain-release.cpp index 2efd20709b..4c23cdc6e0 100644 --- a/test/Analysis/osobject-retain-release.cpp +++ b/test/Analysis/osobject-retain-release.cpp @@ -99,7 +99,7 @@ bool os_consume_violation_two_args(OS_CONSUME OSObject *obj, bool extra) { 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 OSObject *obj) { 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) {