Extra vector element initializers in OpenCL is an error, not a warning.
llvm-svn: 74951
This commit is contained in:
parent
8ec8c97f81
commit
425038cc6d
|
@ -554,6 +554,10 @@ void InitListChecker::CheckExplicitInitList(InitListExpr *IList, QualType &T,
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue