From: NAKAMURA Takumi Date: Wed, 12 Sep 2012 10:45:40 +0000 (+0000) Subject: clang/test: [PR8833] Introduce the feature "LP64" to suppress LLP64-incompatible... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b774d73540ba62a5e6a8e9217b320b27a946cfad;p=clang clang/test: [PR8833] Introduce the feature "LP64" to suppress LLP64-incompatible tests. I think some of them could be rewritten to fit also LLP64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163699 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/cxx-crashes.cpp b/test/Analysis/cxx-crashes.cpp index 8912bf68de..e3f812540d 100644 --- a/test/Analysis/cxx-crashes.cpp +++ b/test/Analysis/cxx-crashes.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s +// REQUIRES: LP64 void clang_analyzer_eval(bool); diff --git a/test/CodeGen/2008-12-23-AsmIntPointerTie.c b/test/CodeGen/2008-12-23-AsmIntPointerTie.c index df646b7801..04b285e686 100644 --- a/test/CodeGen/2008-12-23-AsmIntPointerTie.c +++ b/test/CodeGen/2008-12-23-AsmIntPointerTie.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -emit-llvm -O1 -o - +// REQUIRES: LP64 typedef long intptr_t; int test(void *b) { diff --git a/test/CodeGen/statements.c b/test/CodeGen/statements.c index e2bbb5a90a..5affb9a835 100644 --- a/test/CodeGen/statements.c +++ b/test/CodeGen/statements.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -Wno-error=return-type %s -emit-llvm-only +// REQUIRES: LP64 void test1(int x) { switch (x) { diff --git a/test/CodeGenCXX/2005-01-03-StaticInitializers.cpp b/test/CodeGenCXX/2005-01-03-StaticInitializers.cpp index 875c412c6b..1c9d1202af 100644 --- a/test/CodeGenCXX/2005-01-03-StaticInitializers.cpp +++ b/test/CodeGenCXX/2005-01-03-StaticInitializers.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s +// REQUIRES: LP64 struct S { int A[2]; diff --git a/test/CodeGenCXX/reinterpret-cast.cpp b/test/CodeGenCXX/reinterpret-cast.cpp index dafa67529f..63c5a2adc6 100644 --- a/test/CodeGenCXX/reinterpret-cast.cpp +++ b/test/CodeGenCXX/reinterpret-cast.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -emit-llvm -o - %s -std=c++11 +// REQUIRES: LP64 + void *f1(unsigned long l) { return reinterpret_cast(l); } diff --git a/test/CodeGenObjC/newproperty-nested-synthesis-1.m b/test/CodeGenObjC/newproperty-nested-synthesis-1.m index 4831c22463..aa0c8c9239 100644 --- a/test/CodeGenObjC/newproperty-nested-synthesis-1.m +++ b/test/CodeGenObjC/newproperty-nested-synthesis-1.m @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -emit-llvm -o %t %s +// REQUIRES: LP64 @interface Object - (id) new; diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index cfdf8e2bd7..ad0fc708d7 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s +// REQUIRES: LP64 extern int foof() = 1; // expected-error{{illegal initializer (only variables can be initialized)}} diff --git a/test/Sema/compound-literal.c b/test/Sema/compound-literal.c index beec6ca66e..bac7b0e602 100644 --- a/test/Sema/compound-literal.c +++ b/test/Sema/compound-literal.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// REQUIRES: LP64 struct foo { int a, b; }; diff --git a/test/SemaCXX/cstyle-cast.cpp b/test/SemaCXX/cstyle-cast.cpp index 12495ecdc5..468c8ecb23 100644 --- a/test/SemaCXX/cstyle-cast.cpp +++ b/test/SemaCXX/cstyle-cast.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// REQUIRES: LP64 struct A {}; diff --git a/test/SemaCXX/functional-cast.cpp b/test/SemaCXX/functional-cast.cpp index 61e4da3da9..f8e0c46587 100644 --- a/test/SemaCXX/functional-cast.cpp +++ b/test/SemaCXX/functional-cast.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// REQUIRES: LP64 // ------------ not interpreted as C-style cast ------------ diff --git a/test/SemaCXX/overloaded-builtin-operators.cpp b/test/SemaCXX/overloaded-builtin-operators.cpp index ac110a3c05..19dc338716 100644 --- a/test/SemaCXX/overloaded-builtin-operators.cpp +++ b/test/SemaCXX/overloaded-builtin-operators.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -verify %s +// REQUIRES: LP64 + struct yes; struct no; diff --git a/test/SemaObjC/nonnull.m b/test/SemaObjC/nonnull.m index a38c0acb84..902105b924 100644 --- a/test/SemaObjC/nonnull.m +++ b/test/SemaObjC/nonnull.m @@ -1,6 +1,7 @@ #include "nonnull.h" // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s +// REQUIRES: LP64 @class NSObject; diff --git a/test/lit.cfg b/test/lit.cfg index f271747cec..d7c3de4a3d 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -226,6 +226,10 @@ if platform.system() not in ['Windows'] or lit.getBashPath() != '': if platform.system() not in ['Windows']: config.available_features.add('ansi-escape-sequences') +# [PR8833] LLP64-incompatible tests +if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple): + config.available_features.add('LP64') + # Registered Targets def get_llc_props(tool): set_of_targets = set()