Author: Bill Wendling
Date: 2024-08-14T22:14:29-07:00
New Revision: 6e2d9df02502e16659e4a9397260baf9df224f17

URL: 
https://github.com/llvm/llvm-project/commit/6e2d9df02502e16659e4a9397260baf9df224f17
DIFF: 
https://github.com/llvm/llvm-project/commit/6e2d9df02502e16659e4a9397260baf9df224f17.diff

LOG: Fix testcases. Use -emit-llvm and not -S. Use LABEL checking.

Added: 
    

Modified: 
    clang/test/CodeGen/overflow-idiom-exclusion-fp.c
    clang/test/CodeGen/overflow-idiom-exclusion.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/overflow-idiom-exclusion-fp.c 
b/clang/test/CodeGen/overflow-idiom-exclusion-fp.c
index 1d26caa5b4f54..511a88cc7a283 100644
--- a/clang/test/CodeGen/overflow-idiom-exclusion-fp.c
+++ b/clang/test/CodeGen/overflow-idiom-exclusion-fp.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -S -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -fwrapv -S -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -fwrapv -emit-llvm -o - %s | 
FileCheck %s
 
 // Check for potential false positives from patterns that _almost_ match 
classic overflow-dependent or overflow-prone code patterns
 extern unsigned a, b, c;

diff  --git a/clang/test/CodeGen/overflow-idiom-exclusion.c 
b/clang/test/CodeGen/overflow-idiom-exclusion.c
index 02dd3ef3ae42d..c4756a0b80f61 100644
--- a/clang/test/CodeGen/overflow-idiom-exclusion.c
+++ b/clang/test/CodeGen/overflow-idiom-exclusion.c
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -S -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -fwrapv -S -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=add-overflow-test -S -o - %s | FileCheck 
%s --check-prefix=ADD
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=negated-unsigned-const -S -o - %s | 
FileCheck %s --check-prefix=NEGATE
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=post-decr-while -S -o - %s | FileCheck %s 
--check-prefix=WHILE
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=all -fwrapv -emit-llvm -o - %s | 
FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=add-overflow-test -emit-llvm -o - %s | 
FileCheck %s --check-prefix=ADD
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=negated-unsigned-const -emit-llvm -o - %s 
| FileCheck %s --check-prefix=NEGATE
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu 
-fsanitize=signed-integer-overflow,unsigned-integer-overflow 
-fsanitize-overflow-pattern-exclusion=post-decr-while -emit-llvm -o - %s | 
FileCheck %s --check-prefix=WHILE
 
 // Ensure some common overflow-dependent or overflow-prone code patterns don't
 // trigger the overflow sanitizers. In many cases, overflow warnings caused by
@@ -32,6 +32,7 @@
 // NEGATE: usub.with.overflow
 // NEGATE-NOT: negate_overflow
 
+// WHILE-LABEL: @basic_commutativity
 // WHILE: handler.add_overflow
 // WHILE: negate_overflow
 // WHILE-NOT: usub.with.overflow
@@ -57,6 +58,7 @@ void basic_commutativity(void) {
     c = 9;
 }
 
+// WHILE-LABEL: @arguments_and_commutativity
 void arguments_and_commutativity(unsigned V1, unsigned V2) {
   if (V1 + V2 < V1)
     c = 9;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to