summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-02-12 02:08:12 +0000
committerJohn McCall <rjmccall@apple.com>2013-02-12 02:08:12 +0000
commit587b348504939b57d8fab810ab4483b9d1e5fe48 (patch)
tree81de6a8a4febb369a2445907072cc93421065934 /clang/lib
parent1f3d3ca7698c09f2362930ff0732957e74c9b115 (diff)
downloadbcm5719-llvm-587b348504939b57d8fab810ab4483b9d1e5fe48.tar.gz
bcm5719-llvm-587b348504939b57d8fab810ab4483b9d1e5fe48.zip
Perform placeholder conversions on the controller of a _Generic
expression. llvm-svn: 174930
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 689c1497fdb..f6c6fe118e5 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud