summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2012-02-19 14:53:49 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2012-02-19 14:53:49 +0000
commite6c32e6293adaff31d8fb436858459e53764332a (patch)
treefa5cd79abc8781a01c065a6187f477b5228e3003 /clang/lib/CodeGen/CGExprConstant.cpp
parent08487f51b791e7db39ebf9b4bb1191102eef3d00 (diff)
downloadbcm5719-llvm-e6c32e6293adaff31d8fb436858459e53764332a.tar.gz
bcm5719-llvm-e6c32e6293adaff31d8fb436858459e53764332a.zip
Refuse to compile global std::initializer_lists instead of doing completely the wrong thing.
llvm-svn: 150928
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 985e53227e7..a7cd36862ba 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -339,6 +339,11 @@ void ConstStructBuilder::ConvertStructToPacked() {
}
bool ConstStructBuilder::Build(InitListExpr *ILE) {
+ if (ILE->initializesStdInitializerList()) {
+ CGM.ErrorUnsupported(ILE, "global std::initializer_list");
+ return false;
+ }
+
RecordDecl *RD = ILE->getType()->getAs<RecordType>()->getDecl();
const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD);
OpenPOWER on IntegriCloud