]> granicus.if.org Git - clang/commitdiff
Remove bogus "unsupported" case for vectors (which shouldn't
authorEli Friedman <eli.friedman@gmail.com>
Thu, 30 Jul 2009 01:10:26 +0000 (01:10 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 30 Jul 2009 01:10:26 +0000 (01:10 +0000)
ever trigger).  Add an "unsupported" case that triggers for C++ code.

It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77562 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp

index ea14242a002661e57155a1ed53feda0a495b9957..4065758617046738cb87c96584be8f3f53dcc896 100644 (file)
@@ -1116,8 +1116,7 @@ LValue CodeGenFunction::EmitCompoundLiteralLValue(const CompoundLiteralExpr* E){
 }
 
 LValue CodeGenFunction::EmitConditionalOperator(const ConditionalOperator* E) {
-  // We don't handle vectors yet.
-  if (E->getType()->isVectorType())
+  if (E->isLvalue(getContext()) == Expr::LV_Valid)
     return EmitUnsupportedLValue(E, "conditional operator");
 
   // ?: here should be an aggregate.