diff options
author | John McCall <rjmccall@apple.com> | 2013-02-12 02:08:12 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-02-12 02:08:12 +0000 |
commit | a2905ea609c8ed1bf41a6b917358983d9f26dc6d (patch) | |
tree | d07cbe155511ffec0b851e7b42d515c5d56b1b6d /lib/Sema/SemaExpr.cpp | |
parent | 9dd74c5504c743c96ea3a1d691d6a75ec3a98147 (diff) |
Perform placeholder conversions on the controller of a _Generic
expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 689c1497fd..f6c6fe118e 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1173,6 +1173,12 @@ Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, TypeSourceInfo **Types, Expr **Exprs, unsigned NumAssocs) { + if (ControllingExpr->getType()->isPlaceholderType()) { + ExprResult result = CheckPlaceholderExpr(ControllingExpr); + if (result.isInvalid()) return ExprError(); + ControllingExpr = result.take(); + } + bool TypeErrorFound = false, IsResultDependent = ControllingExpr->isTypeDependent(), ContainsUnexpandedParameterPack |