[cfe-commits] r74951 - /cfe/trunk/lib/Sema/SemaInit.cpp
Nate Begeman
natebegeman at mac.com
Tue Jul 7 14:53:06 PDT 2009
Author: sampo
Date: Tue Jul 7 16:53:06 2009
New Revision: 74951
URL: http://llvm.org/viewvc/llvm-project?rev=74951&view=rev
Log:
Extra vector element initializers in OpenCL is an error, not a warning.
Modified:
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=74951&r1=74950&r2=74951&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Jul 7 16:53:06 2009
@@ -554,6 +554,10 @@
DK = diag::err_excess_initializers;
hadError = true;
}
+ if (SemaRef.getLangOptions().OpenCL && initKind == 1) {
+ DK = diag::err_excess_initializers;
+ hadError = true;
+ }
SemaRef.Diag(IList->getInit(Index)->getLocStart(), DK)
<< initKind << IList->getInit(Index)->getSourceRange();
More information about the cfe-commits
mailing list