From b4f9145fb4cfa8cee6fb52c647adb45712453eca Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 2 Jun 2015 18:21:58 +0200 Subject: Enable loplugin:loopvartoosmall Change-Id: I114320ebaab9223b82b4fd9710c3cc221a836645 --- compilerplugins/clang/loopvartoosmall.cxx | 8 ++++---- 1 file 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: */ -- cgit