diff options
Diffstat (limited to 'compilerplugins/clang/simplifyconstruct.cxx')
-rw-r--r-- | compilerplugins/clang/simplifyconstruct.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx index fd5ba5027d01..172a1bd48029 100644 --- a/compilerplugins/clang/simplifyconstruct.cxx +++ b/compilerplugins/clang/simplifyconstruct.cxx @@ -55,9 +55,10 @@ bool SimplifyConstruct::VisitCXXConstructExpr(CXXConstructExpr const* constructE && isa<CXXNullPtrLiteralExpr>(constructExpr->getArg(0)->IgnoreParenImpCasts())) { report(DiagnosticsEngine::Warning, - "no need to explicitly init this with nullptr, just use default constructor", + "no need to explicitly init an instance of %0 with nullptr, just use default " + "constructor", constructExpr->getSourceRange().getBegin()) - << constructExpr->getSourceRange(); + << constructExpr->getType() << constructExpr->getSourceRange(); } return true; } |