r178716 - Update OpenCL comments to mention spec section and version.

Tanya Lattner tonic at nondot.org
Wed Apr 3 16:55:58 PDT 2013


Author: tbrethou
Date: Wed Apr  3 18:55:58 2013
New Revision: 178716

URL: http://llvm.org/viewvc/llvm-project?rev=178716&view=rev
Log:
Update OpenCL comments to mention spec section and version.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=178716&r1=178715&r2=178716&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Apr  3 18:55:58 2013
@@ -4915,7 +4915,7 @@ static bool checkCondition(Sema &S, Expr
   // C99 6.5.15p2
   if (CondTy->isScalarType()) return false;
 
-  // OpenCL: Sec 6.3.i says the condition is allowed to be a vector or scalar.
+  // OpenCL v1.1 s6.3.i says the condition is allowed to be a vector or scalar.
   if (S.getLangOpts().OpenCL && CondTy->isVectorType())
     return false;
 
@@ -5176,9 +5176,9 @@ QualType Sema::CheckConditionalOperands(
   if (LHSTy->isVectorType() || RHSTy->isVectorType())
     return CheckVectorOperands(LHS, RHS, QuestionLoc, /*isCompAssign*/false);
 
-  // OpenCL: If the condition is a vector, and both operands are scalar,
+  // If the condition is a vector, and both operands are scalar,
   // attempt to implicity convert them to the vector type to act like the
-  // built in select.
+  // built in select. (OpenCL v1.1 s6.3.i)
   if (getLangOpts().OpenCL && CondTy->isVectorType())
     if (checkConditionalConvertScalarsToVectors(*this, LHS, RHS, CondTy))
       return QualType();





More information about the cfe-commits mailing list