summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-07-17 05:12:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-07-17 05:12:35 +0000
commitf8adcdc436c100f9103b6e2831819eac6e39a877 (patch)
tree7f4a8764be0f2870b09b79760c62bfaabaeed7c7 /clang/lib/Sema/SemaDeclCXX.cpp
parent68c89c24801e2d1a5e4aea78b264c9bc6dc88b87 (diff)
downloadbcm5719-llvm-f8adcdc436c100f9103b6e2831819eac6e39a877.tar.gz
bcm5719-llvm-f8adcdc436c100f9103b6e2831819eac6e39a877.zip
Track the difference between
-- a constructor list initialization that unpacked an initializer list into constructor arguments and -- a list initialization that created as std::initializer_list and passed it as the first argument to a constructor in the AST. Use this flag while instantiating templates to provide the right semantics for the resulting initialization. llvm-svn: 213224
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 281241ba753..14be51111dd 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -10709,6 +10709,7 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
MultiExprArg ExprArgs,
bool HadMultipleCandidates,
bool IsListInitialization,
+ bool IsStdInitListInitialization,
bool RequiresZeroInit,
unsigned ConstructKind,
SourceRange ParenRange) {
@@ -10732,7 +10733,8 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
return BuildCXXConstructExpr(ConstructLoc, DeclInitType, Constructor,
Elidable, ExprArgs, HadMultipleCandidates,
- IsListInitialization, RequiresZeroInit,
+ IsListInitialization,
+ IsStdInitListInitialization, RequiresZeroInit,
ConstructKind, ParenRange);
}
@@ -10744,13 +10746,15 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
MultiExprArg ExprArgs,
bool HadMultipleCandidates,
bool IsListInitialization,
+ bool IsStdInitListInitialization,
bool RequiresZeroInit,
unsigned ConstructKind,
SourceRange ParenRange) {
MarkFunctionReferenced(ConstructLoc, Constructor);
return CXXConstructExpr::Create(
Context, DeclInitType, ConstructLoc, Constructor, Elidable, ExprArgs,
- HadMultipleCandidates, IsListInitialization, RequiresZeroInit,
+ HadMultipleCandidates, IsListInitialization, IsStdInitListInitialization,
+ RequiresZeroInit,
static_cast<CXXConstructExpr::ConstructionKind>(ConstructKind),
ParenRange);
}
OpenPOWER on IntegriCloud