diff options
Diffstat (limited to 'clang/lib/Interpreter')
| -rw-r--r-- | clang/lib/Interpreter/InterpreterValuePrinter.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/clang/lib/Interpreter/InterpreterValuePrinter.cpp b/clang/lib/Interpreter/InterpreterValuePrinter.cpp index 0ed02f3..cfa50ee 100644 --- a/clang/lib/Interpreter/InterpreterValuePrinter.cpp +++ b/clang/lib/Interpreter/InterpreterValuePrinter.cpp @@ -411,7 +411,8 @@ public:    }    InterfaceKind VisitReferenceType(const ReferenceType *Ty) { -    ExprResult AddrOfE = S.CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, E); +    ExprResult AddrOfE = S.CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, +                                                E->IgnoreImpCasts());      assert(!AddrOfE.isInvalid() && "Can not create unary expression");      Args.push_back(AddrOfE.get());      return InterfaceKind::NoAlloc; @@ -537,7 +538,7 @@ llvm::Expected<Expr *> Interpreter::convertExprToValue(Expr *E) {    QualType DesugaredTy = Ty.getDesugaredType(Ctx);    // For lvalue struct, we treat it as a reference. -  if (DesugaredTy->isRecordType() && E->isLValue()) { +  if (DesugaredTy->isRecordType() && E->IgnoreImpCasts()->isLValue()) {      DesugaredTy = Ctx.getLValueReferenceType(DesugaredTy);      Ty = Ctx.getLValueReferenceType(Ty);    } | 
