Skip to content

Commit 2fa2c72

Browse files
committed
remove warning and always error
1 parent 8488243 commit 2fa2c72

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
930930
def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
931931
def VariadicMacros : DiagGroup<"variadic-macros">;
932932
def VectorConversion : DiagGroup<"vector-conversion">; // clang specific
933-
def VectorOutOfRange : DiagGroup<"vector-out-of-range">;
934933
def VexingParse : DiagGroup<"vexing-parse">;
935934
def VLAUseStaticAssert : DiagGroup<"vla-extension-static-assert">;
936935
def VLACxxExtension : DiagGroup<"vla-cxx-extension", [VLAUseStaticAssert]>;

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10637,9 +10637,6 @@ def err_sizeless_nonlocal : Error<
1063710637

1063810638
def err_vector_index_out_of_range : Error<
1063910639
"vector element index %0 is out of bounds">;
10640-
def warn_vector_index_out_of_range : Warning<
10641-
err_vector_index_out_of_range.Summary>,
10642-
InGroup<VectorOutOfRange>;
1064310640

1064410641
def err_vec_builtin_non_vector : Error<
1064510642
"%select{first two|all}1 arguments to %0 must be vectors">;

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14026,8 +14026,7 @@ void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) {
1402614026
if (!IndexExpr->EvaluateAsInt(Result, Context, Expr::SE_AllowSideEffects))
1402714027
return;
1402814028

14029-
unsigned DiagID = getLangOpts().HLSL ? diag::err_vector_index_out_of_range
14030-
: diag::warn_vector_index_out_of_range;
14029+
unsigned DiagID = diag::err_vector_index_out_of_range;
1403114030

1403214031
llvm::APSInt index = Result.Val.getInt();
1403314032
if (index.isNegative() || index >= VTy->getNumElements())

clang/test/CodeGenCXX/x86_64-arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,6 @@ union U {
215215
float f1;
216216
char __attribute__((__vector_size__(1))) f2;
217217
};
218-
int f(union U u) { return u.f2[1]; }
218+
int f(union U u) { return u.f2[0]; }
219219
// CHECK-LABEL: define{{.*}} i32 @_ZN6test111fENS_1UE(i32
220220
}

0 commit comments

Comments
 (0)