r194919 - Move remaining %clang_cc1 tests out of test/Driver

Alp Toker alp at nuanti.com
Fri Nov 15 22:20:18 PST 2013


Author: alp
Date: Sat Nov 16 00:20:17 2013
New Revision: 194919

URL: http://llvm.org/viewvc/llvm-project?rev=194919&view=rev
Log:
Move remaining %clang_cc1 tests out of test/Driver

clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.

Basic type tests and flag tests generally both go in Frontend.

Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.

These miscategorized tests were probably the source of confusion in r194817.

Added:
    cfe/trunk/test/Frontend/invalid-o-level.c
      - copied, changed from r194916, cfe/trunk/test/Driver/invalid-o-level.c
    cfe/trunk/test/Frontend/mips-long-double.c
      - copied, changed from r194916, cfe/trunk/test/Driver/mips-long-double.c
    cfe/trunk/test/Frontend/x86_64-nacl-types.cpp
      - copied, changed from r194916, cfe/trunk/test/Driver/x86_64-nacl-types.cpp
Removed:
    cfe/trunk/test/Driver/invalid-o-level.c
    cfe/trunk/test/Driver/mips-long-double.c
    cfe/trunk/test/Driver/x86_64-nacl-types.cpp
Modified:
    cfe/trunk/test/Driver/lit.local.cfg

Removed: cfe/trunk/test/Driver/invalid-o-level.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/invalid-o-level.c?rev=194918&view=auto
==============================================================================
--- cfe/trunk/test/Driver/invalid-o-level.c (original)
+++ cfe/trunk/test/Driver/invalid-o-level.c (removed)
@@ -1,4 +0,0 @@
-// RUN: not %clang_cc1 %s -O900 2> %t.log
-// RUN: FileCheck %s -input-file=%t.log
-
-// CHECK: invalid value '900' in '-O900'

Modified: cfe/trunk/test/Driver/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lit.local.cfg?rev=194919&r1=194918&r2=194919&view=diff
==============================================================================
--- cfe/trunk/test/Driver/lit.local.cfg (original)
+++ cfe/trunk/test/Driver/lit.local.cfg Sat Nov 16 00:20:17 2013
@@ -1 +1,5 @@
 config.suffixes = ['.c', '.cpp', '.h', '.m', '.mm', '.S', '.s', '.f90', '.f95']
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+    ('%clang_cc1',
+     """*** Do not use 'clang -cc1' in Driver tests. ***""") )

Removed: cfe/trunk/test/Driver/mips-long-double.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mips-long-double.c?rev=194918&view=auto
==============================================================================
--- cfe/trunk/test/Driver/mips-long-double.c (original)
+++ cfe/trunk/test/Driver/mips-long-double.c (removed)
@@ -1,19 +0,0 @@
-// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s
-// RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s
-// RUN: %clang_cc1 -triple mips-unknown-linux -std=c11 -verify %s
-// RUN: %clang_cc1 -triple mips64-unknown-linux -std=c11 -verify %s
-// expected-no-diagnostics
-
-#ifdef _ABI64
-#  ifdef __FreeBSD__
-_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
-_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
-#  else
-_Static_assert(sizeof(long double) == 16, "sizeof long double is wrong");
-_Static_assert(_Alignof(long double) == 16, "alignof long double is wrong");
-#  endif
-#else
-_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
-_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
-#endif
-

Removed: cfe/trunk/test/Driver/x86_64-nacl-types.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/x86_64-nacl-types.cpp?rev=194918&view=auto
==============================================================================
--- cfe/trunk/test/Driver/x86_64-nacl-types.cpp (original)
+++ cfe/trunk/test/Driver/x86_64-nacl-types.cpp (removed)
@@ -1,37 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-nacl -std=c++11 -verify %s
-// expected-no-diagnostics
-
-#include <stddef.h>
-#include <stdarg.h>
-
-static_assert(alignof(char) == 1, "alignof char is wrong");
-
-static_assert(alignof(short) == 2, "sizeof short is wrong");
-static_assert(alignof(short) == 2, "alignof short is wrong");
-
-static_assert(alignof(int) == 4, "sizeof int is wrong");
-static_assert(alignof(int) == 4, "alignof int is wrong");
-
-static_assert(sizeof(long) == 4, "sizeof long is wrong");
-static_assert(sizeof(long) == 4, "alignof long is wrong");
-
-static_assert(sizeof(long long) == 8, "sizeof long long is wrong wrong");
-static_assert(alignof(long long) == 8, "alignof long long is wrong wrong");
-
-static_assert(sizeof(void*) == 4, "sizeof void * is wrong");
-static_assert(alignof(void*) == 4, "alignof void * is wrong");
-
-static_assert(sizeof(float) == 4, "sizeof float is wrong");
-static_assert(alignof(float) == 4, "alignof float is wrong");
-
-static_assert(sizeof(double) == 8, "sizeof double is wrong");
-static_assert(alignof(double) == 8, "alignof double is wrong");
-
-static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
-static_assert(alignof(long double) == 8, "alignof long double is wrong");
-
-static_assert(sizeof(va_list) == 16, "sizeof va_list is wrong");
-static_assert(alignof(va_list) == 4, "alignof va_list is wrong");
-
-static_assert(sizeof(size_t) == 4, "sizeof size_t is wrong");
-static_assert(alignof(size_t) == 4, "alignof size_t is wrong");

Copied: cfe/trunk/test/Frontend/invalid-o-level.c (from r194916, cfe/trunk/test/Driver/invalid-o-level.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/invalid-o-level.c?p2=cfe/trunk/test/Frontend/invalid-o-level.c&p1=cfe/trunk/test/Driver/invalid-o-level.c&r1=194916&r2=194919&rev=194919&view=diff
==============================================================================
    (empty)

Copied: cfe/trunk/test/Frontend/mips-long-double.c (from r194916, cfe/trunk/test/Driver/mips-long-double.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/mips-long-double.c?p2=cfe/trunk/test/Frontend/mips-long-double.c&p1=cfe/trunk/test/Driver/mips-long-double.c&r1=194916&r2=194919&rev=194919&view=diff
==============================================================================
    (empty)

Copied: cfe/trunk/test/Frontend/x86_64-nacl-types.cpp (from r194916, cfe/trunk/test/Driver/x86_64-nacl-types.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/x86_64-nacl-types.cpp?p2=cfe/trunk/test/Frontend/x86_64-nacl-types.cpp&p1=cfe/trunk/test/Driver/x86_64-nacl-types.cpp&r1=194916&r2=194919&rev=194919&view=diff
==============================================================================
    (empty)





More information about the cfe-commits mailing list