summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-23 02:25:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-23 02:25:10 +0000
commit91f5ae5022c75fb35b77aeffd5dac4163f456ee8 (patch)
tree5dca72db2f094bed82024e6c9eee1e3eec45ae62 /clang/lib/CodeGen/CGExprAgg.cpp
parentd675a4cec09cf84b2fae69011bba05287e0d27b9 (diff)
downloadbcm5719-llvm-91f5ae5022c75fb35b77aeffd5dac4163f456ee8.tar.gz
bcm5719-llvm-91f5ae5022c75fb35b77aeffd5dac4163f456ee8.zip
Try to handle qualifiers more consistently for array InitListExprs. Fixes <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent.
(I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) llvm-svn: 151229
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 80d754a98a4..6ea21ec47aa 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -905,10 +905,8 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) {
}
}
- QualType elementType = E->getType().getCanonicalType();
- elementType = CGF.getContext().getQualifiedType(
- cast<ArrayType>(elementType)->getElementType(),
- elementType.getQualifiers() + Dest.getQualifiers());
+ QualType elementType =
+ CGF.getContext().getAsArrayType(E->getType())->getElementType();
llvm::PointerType *APType =
cast<llvm::PointerType>(DestPtr->getType());
OpenPOWER on IntegriCloud