forked from OSchip/llvm-project
Look through CXXExprWithTemporaries when digging out the original
initializer. Grrr.... llvm-svn: 95211
This commit is contained in:
parent
3bcbdb8a28
commit
4a2f5464a7
|
@ -241,6 +241,9 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
|
|||
// Extract the initializer, skipping through any temporary-binding
|
||||
// expressions and look at the subexpression as it was written.
|
||||
Expr *DInit = D->getInit();
|
||||
if (CXXExprWithTemporaries *ExprTemp
|
||||
= dyn_cast<CXXExprWithTemporaries>(DInit))
|
||||
DInit = ExprTemp->getSubExpr();
|
||||
while (CXXBindTemporaryExpr *Binder = dyn_cast<CXXBindTemporaryExpr>(DInit))
|
||||
DInit = Binder->getSubExpr();
|
||||
if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(DInit))
|
||||
|
|
Loading…
Reference in New Issue