[clang] af20211 - [Sema] Fix pointer-to-int-cast for MSVC build bot

Mark de Wever via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 16 10:10:11 PST 2020


Author: Mark de Wever
Date: 2020-02-16T19:09:59+01:00
New Revision: af202119443bf8759fb6ca9fd8d0282f27001cec

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

LOG: [Sema] Fix pointer-to-int-cast for MSVC build bot

Revision 9658d895c81a breaks the clang-x64-windows-msvc build bot [1].
This should fix the unit test using the same method as used in 9658d895c81a.

Note I don't have access to a Windows system so the patch is based on the
errors generated by the bot.

[1] http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14358

Differential Revision: https://reviews.llvm.org/D74694

Added: 
    

Modified: 
    clang/test/Analysis/taint-generic.c
    clang/test/Sema/conditional-expr.c
    clang/test/Sema/darwin-align-cast.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Analysis/taint-generic.c b/clang/test/Analysis/taint-generic.c
index 60a27c5ce464..a299501b1068 100644
--- a/clang/test/Analysis/taint-generic.c
+++ b/clang/test/Analysis/taint-generic.c
@@ -1,11 +1,11 @@
-// RUN: %clang_analyze_cc1 -Wno-format-security -verify %s \
+// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast -verify %s \
 // RUN:   -analyzer-checker=alpha.security.taint \
 // RUN:   -analyzer-checker=core \
 // RUN:   -analyzer-checker=alpha.security.ArrayBoundV2 \
 // RUN:   -analyzer-config \
 // RUN:     alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
 
-// RUN: %clang_analyze_cc1 -Wno-format-security -verify %s \
+// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast -verify %s \
 // RUN:   -DFILE_IS_STRUCT \
 // RUN:   -analyzer-checker=alpha.security.taint \
 // RUN:   -analyzer-checker=core \
@@ -13,7 +13,7 @@
 // RUN:   -analyzer-config \
 // RUN:     alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
 
-// RUN: not %clang_analyze_cc1 -verify %s \
+// RUN: not %clang_analyze_cc1 -Wno-pointer-to-int-cast -verify %s \
 // RUN:   -analyzer-checker=alpha.security.taint \
 // RUN:   -analyzer-config \
 // RUN:     alpha.security.taint.TaintPropagation:Config=justguessit \

diff  --git a/clang/test/Sema/conditional-expr.c b/clang/test/Sema/conditional-expr.c
index 6b24ef49b3e6..7ff141d62e56 100644
--- a/clang/test/Sema/conditional-expr.c
+++ b/clang/test/Sema/conditional-expr.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -Wsign-conversion %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-pointer-to-int-cast -verify -pedantic -Wsign-conversion %s
 void foo() {
   *(0 ? (double *)0 : (void *)0) = 0;
   // FIXME: GCC doesn't consider the following two statements to be errors.

diff  --git a/clang/test/Sema/darwin-align-cast.c b/clang/test/Sema/darwin-align-cast.c
index bd357edceddf..3a1824901277 100644
--- a/clang/test/Sema/darwin-align-cast.c
+++ b/clang/test/Sema/darwin-align-cast.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-pointer-to-int-cast -verify %s
 // expected-no-diagnostics
 typedef long unsigned int __darwin_size_t;
 typedef long __darwin_ssize_t;


        


More information about the cfe-commits mailing list