summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/passstuffbyref.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-12-16 15:16:37 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-12-16 15:16:37 +0100
commit9d7802e7fc055d5d4d28fcf01461e8a7dbe208a0 (patch)
treec0d3dc721aa3714467084d2ef94c1e7826c682ae /compilerplugins/clang/passstuffbyref.cxx
parentb998313d9d1ec511eff5076029e62608c8c5ca0e (diff)
Make move detection in loplugin::passstuffbyref work for parenthesized cases
Change-Id: I56754a718af9433c0fa654ccb8eb34da00e75420
Diffstat (limited to 'compilerplugins/clang/passstuffbyref.cxx')
-rw-r--r--compilerplugins/clang/passstuffbyref.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index fca6b7375a07..8bbea52fc790 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -201,7 +201,7 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) {
for (CXXCtorInitializer const * cxxCtorInitializer : cxxConstructorDecl->inits()) {
if (cxxCtorInitializer->isMemberInitializer())
{
- auto cxxConstructExpr = dyn_cast<CXXConstructExpr>(cxxCtorInitializer->getInit());
+ auto cxxConstructExpr = dyn_cast<CXXConstructExpr>(cxxCtorInitializer->getInit()->IgnoreParenImpCasts());
if (cxxConstructExpr && cxxConstructExpr->getNumArgs() == 1)
{
if (auto callExpr = dyn_cast<CallExpr>(cxxConstructExpr->getArg(0)->IgnoreParenImpCasts())) {