Author: Nikita Popov Date: 2024-08-05T12:56:33+02:00 New Revision: 77011b00ad5f7f1789e788e85aed1babeb540213
URL: https://github.com/llvm/llvm-project/commit/77011b00ad5f7f1789e788e85aed1babeb540213 DIFF: https://github.com/llvm/llvm-project/commit/77011b00ad5f7f1789e788e85aed1babeb540213.diff LOG: [Clang] Fix path-sensitivity in ubsan-bool.m test (NFC) This test was failing whenever the path contained the string "f1", e.g. as part of a commit hash. Double-fix the issue by both not embedding the path in the IR at all, and making the CHECK-LABELs more specific. Added: Modified: clang/test/CodeGenObjC/ubsan-bool.m Removed: ################################################################################ diff --git a/clang/test/CodeGenObjC/ubsan-bool.m b/clang/test/CodeGenObjC/ubsan-bool.m index fa5883c01cf4f..e33e3e0ef4963 100644 --- a/clang/test/CodeGenObjC/ubsan-bool.m +++ b/clang/test/CodeGenObjC/ubsan-bool.m @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -no-enable-noundef-analysis -x objective-c -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool %s -o - -w | FileCheck %s -check-prefixes=SHARED,OBJC -// RUN: %clang_cc1 -no-enable-noundef-analysis -x objective-c++ -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool %s -o - -w | FileCheck %s -check-prefixes=SHARED,OBJC -// RUN: %clang_cc1 -no-enable-noundef-analysis -x c -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool %s -o - | FileCheck %s -check-prefixes=SHARED,C +// RUN: %clang_cc1 -no-enable-noundef-analysis -x objective-c -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool -o - -w < %s | FileCheck %s -check-prefixes=SHARED,OBJC +// RUN: %clang_cc1 -no-enable-noundef-analysis -x objective-c++ -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool -o - -w < %s | FileCheck %s -check-prefixes=SHARED,OBJC +// RUN: %clang_cc1 -no-enable-noundef-analysis -x c -emit-llvm -triple x86_64-apple-macosx10.10.0 -fsanitize=bool -o - < %s | FileCheck %s -check-prefixes=SHARED,C typedef signed char BOOL; -// SHARED-LABEL: f1 +// SHARED-LABEL: define{{.*}}f1 BOOL f1(void) { // OBJC: call void @__ubsan_handle_load_invalid_value // C-NOT: call void @__ubsan_handle_load_invalid_value @@ -17,7 +17,7 @@ BOOL f1(void) { BOOL b1 : 1; }; -// SHARED-LABEL: f2 +// SHARED-LABEL: define{{.*}}f2 BOOL f2(struct S1 *s) { // OBJC: [[LOAD:%.*]] = load i8, ptr {{.*}} // OBJC: [[SHL:%.*]] = shl i8 [[LOAD]], 7 @@ -52,7 +52,7 @@ @implementation I1 // OBJC: call void @__ubsan_handle_load_invalid_value // Also check direct accesses to the ivar. -// OBJC-LABEL: f3 +// OBJC-LABEL: define{{.*}}f3 BOOL f3(I1 *i) { // OBJC: [[LOAD:%.*]] = load i8, ptr {{.*}} // OBJC: [[SHL:%.*]] = shl i8 [[LOAD]], 7 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits