diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-02-02 19:31:24 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-02-02 22:59:45 +0100 |
commit | b4392c575e5aaf31ccf0813a20450187df37cf59 (patch) | |
tree | d4ff38959cfbca91ba1c8bcef3b8280cab860c58 /compilerplugins/clang/postfixincrementfix.cxx | |
parent | sal_Bool to bool (diff) | |
download | core-b4392c575e5aaf31ccf0813a20450187df37cf59.tar.gz core-b4392c575e5aaf31ccf0813a20450187df37cf59.zip |
always use the report() helper
Change-Id: I2966fdb5bd98b1ddf718079584acf90a3e3a3700
Diffstat (limited to 'compilerplugins/clang/postfixincrementfix.cxx')
-rw-r--r-- | compilerplugins/clang/postfixincrementfix.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compilerplugins/clang/postfixincrementfix.cxx b/compilerplugins/clang/postfixincrementfix.cxx index 3f4688ec8bfb..e1f6849ec993 100644 --- a/compilerplugins/clang/postfixincrementfix.cxx +++ b/compilerplugins/clang/postfixincrementfix.cxx @@ -119,10 +119,8 @@ bool PostfixIncrementFix::canChangePostfixToPrefix( const CXXOperatorCallExpr* o return canChangeInConditionStatement( op, dyn_cast< ForStmt >( parents[ parent_pos ] )->getCond(), parents, parent_pos ); default: - DiagnosticsEngine& diag = context.getDiagnostics(); - unsigned diagid = diag.getCustomDiagID( DiagnosticsEngine::Fatal, - "cannot analyze operator++ (plugin needs fixing) [loplugin]" ); - diag.Report( op->getLocStart(), diagid ) << parents[ parent_pos ]->getSourceRange(); + report( DiagnosticsEngine::Fatal, "cannot analyze operator++ (plugin needs fixing) [loplugin]", + op->getLocStart()) << parents[ parent_pos ]->getSourceRange(); // parents[ parent_pos ]->dump(); // parents[ std::max( parent_pos - 3, 0 ) ]->dump(); return false; @@ -157,10 +155,8 @@ bool PostfixIncrementFix::shouldDoChange( const Expr* operand ) return true; default: { - DiagnosticsEngine& diag = context.getDiagnostics(); - unsigned diagid = diag.getCustomDiagID( DiagnosticsEngine::Fatal, - "cannot analyze operator++ (plugin needs fixing) [loplugin]" ); - diag.Report( expr->getLocStart(), diagid ) << operand->getSourceRange(); + report( DiagnosticsEngine::Fatal, "cannot analyze operator++ (plugin needs fixing) [loplugin]", + expr->getLocStart()) << operand->getSourceRange(); expr->dump(); operand->dump(); return false; |