Kaydet (Commit) b4f9145f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Enable loplugin:loopvartoosmall

Change-Id: I114320ebaab9223b82b4fd9710c3cc221a836645
üst 7b6b8131
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment