summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/plugin.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-15 14:01:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 08:28:50 +0200
commitda2f9c20f61033caa29757942b4f3e709a48ed7c (patch)
tree60a0cd565f913457672a9603c9613ef9c85ea959 /compilerplugins/clang/plugin.cxx
parent28753a11d4d5198d473660f386176cec5a1b4533 (diff)
loplugin:changetoolsgen various improvements
- use AdjustFoo variants of methods on Rect/Size/Point - ignore double assignments - improve error messages - handle expressions that include macros by using getExpansionLoc - replace ++X() with X() + 1 Change-Id: Ida6b06b2a92e9226168aff6b1b8031f5867687b4
Diffstat (limited to 'compilerplugins/clang/plugin.cxx')
-rw-r--r--compilerplugins/clang/plugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 984c9e13d759..07f1edecf4c7 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -543,7 +543,7 @@ bool RewritePlugin::replaceText( SourceLocation Start, unsigned OrigLength, Stri
SourceRange Range(Start, Start.getLocWithOffset(std::max<size_t>(OrigLength, NewStr.size())));
if( OrigLength != 0 && !handler.checkOverlap( Range ) )
{
- report( DiagnosticsEngine::Warning, "double code replacement, possible plugin error", Start );
+ report( DiagnosticsEngine::Warning, "overlapping code replacement, possible plugin error", Start );
return false;
}
if( rewriter->ReplaceText( Start, OrigLength, NewStr ))
@@ -561,7 +561,7 @@ bool RewritePlugin::replaceText( SourceRange range, StringRef NewStr )
return reportEditFailure( range.getBegin());
if( !handler.checkOverlap( range ) )
{
- report( DiagnosticsEngine::Warning, "double code replacement, possible plugin error", range.getBegin());
+ report( DiagnosticsEngine::Warning, "overlapping code replacement, possible plugin error", range.getBegin());
return false;
}
if( rewriter->ReplaceText( range, NewStr ))
@@ -579,7 +579,7 @@ bool RewritePlugin::replaceText( SourceRange range, SourceRange replacementRange
return reportEditFailure( range.getBegin());
if( !handler.checkOverlap( range ) )
{
- report( DiagnosticsEngine::Warning, "double code replacement, possible plugin error", range.getBegin());
+ report( DiagnosticsEngine::Warning, "overlapping code replacement, possible plugin error", range.getBegin());
return false;
}
if( rewriter->ReplaceText( range, replacementRange ))