diff options
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/simplifyconstruct.cxx | 3 | ||||
-rw-r--r-- | compilerplugins/clang/test/simplifyconstruct.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx index d9eff0b3af89..8c67abe6806f 100644 --- a/compilerplugins/clang/simplifyconstruct.cxx +++ b/compilerplugins/clang/simplifyconstruct.cxx @@ -96,7 +96,8 @@ bool SimplifyConstruct::VisitVarDecl(VarDecl const* varDecl) if (compiler.getSourceManager().isMacroBodyExpansion(init->getBeginLoc())) return true; - report(DiagnosticsEngine::Warning, "simplify", varDecl->getLocation()) + report(DiagnosticsEngine::Warning, "simplify construction, just use 'Foo a(...);'", + varDecl->getLocation()) << varDecl->getSourceRange(); return true; diff --git a/compilerplugins/clang/test/simplifyconstruct.cxx b/compilerplugins/clang/test/simplifyconstruct.cxx index d44738f78d01..e39c469bbec3 100644 --- a/compilerplugins/clang/test/simplifyconstruct.cxx +++ b/compilerplugins/clang/test/simplifyconstruct.cxx @@ -60,7 +60,7 @@ struct Foo }; void f(Foo* f) { - // expected-error@+1 {{simplify [loplugin:simplifyconstruct]}} + // expected-error@+1 {{simplify construction, just use 'Foo a(...);' [loplugin:simplifyconstruct]}} rtl::Reference<Foo> x = rtl::Reference(f); } } @@ -80,7 +80,7 @@ namespace test5 { void f() { - // expected-error@+1 {{simplify [loplugin:simplifyconstruct]}} + // expected-error@+1 {{simplify construction, just use 'Foo a(...);' [loplugin:simplifyconstruct]}} tools::Rectangle x = tools::Rectangle(10, 10, 10, 10); (void)x; } |