summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 18:21:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 18:21:58 +0200
commitb4f9145fb4cfa8cee6fb52c647adb45712453eca (patch)
tree5857e649ee6742b4484a14d80fb64cb245008f71 /compilerplugins
parent7b6b8131f6ace6334e20e85cd96dddc6213bec0b (diff)
Enable loplugin:loopvartoosmall
Change-Id: I114320ebaab9223b82b4fd9710c3cc221a836645
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/loopvartoosmall.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/compilerplugins/clang/loopvartoosmall.cxx b/compilerplugins/clang/loopvartoosmall.cxx
index 78fc47e77792..c7fa0d384bbd 100644
--- a/compilerplugins/clang/loopvartoosmall.cxx
+++ b/compilerplugins/clang/loopvartoosmall.cxx
@@ -103,17 +103,17 @@ bool LoopVarTooSmall::VisitForStmt( const ForStmt* stmt )
if (qt1BitWidth < qt2BitWidth) {
report(
DiagnosticsEngine::Warning,
- "loop index type is narrower than length type. " + qt.getAsString() + " < " + qt2.getAsString(),
+ "loop index type %0 is narrower than length type %1",
stmt->getInit()->getLocStart())
- << stmt->getInit()->getSourceRange();
+ << qt << qt2 << stmt->getInit()->getSourceRange();
//stmt->getCond()->dump();
}
return true;
}
-loplugin::Plugin::Registration< LoopVarTooSmall > X("loopvartoosmall", false);
+loplugin::Plugin::Registration< LoopVarTooSmall > X("loopvartoosmall");
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */