Kaydet (Commit) 19522f05 authored tarafından Noel Grandin's avatar Noel Grandin

fix compiler error in passparamsbyref

Under clang-3.8 we get:

compilerplugins/clang/passparamsbyref.cxx:158:31: error: no member named
'isAssignmentOp' in 'clang::CXXOperatorCallExpr'

Change-Id: Icfba2b624f53f07418674237adc5a47819f73c43
üst 046878a8
......@@ -155,7 +155,12 @@ bool PassParamsByRef::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr * cxxOp
if (!mbInsideFunctionDecl)
return true;
// if we are assigning to a parameter, it can be inconvenient to make the param pass-by-ref
if (!cxxOperatorCallExpr->isAssignmentOp())
auto op = cxxOperatorCallExpr->getOperator();
if ( op != clang::OverloadedOperatorKind::OO_Equal
&& op != clang::OverloadedOperatorKind::OO_SlashEqual
&& op != clang::OverloadedOperatorKind::OO_StarEqual
&& op != clang::OverloadedOperatorKind::OO_MinusEqual
&& op != clang::OverloadedOperatorKind::OO_PlusEqual)
return true;
auto declRefExpr = dyn_cast<DeclRefExpr>(cxxOperatorCallExpr->getArg(0));
if (!declRefExpr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment