r207936 - Split out header integration tests
Alp Toker
alp at nuanti.com
Sun May 4 06:00:32 PDT 2014
Author: alp
Date: Sun May 4 08:00:32 2014
New Revision: 207936
URL: http://llvm.org/viewvc/llvm-project?rev=207936&view=rev
Log:
Split out header integration tests
These are somewhat arbitrary tests that check if "thing goes fine" when
processing various platform-specific headers.
Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure
tests live.
File moves only.
Added:
cfe/trunk/test/Integration/
cfe/trunk/test/Integration/carbon.c
- copied, changed from r207933, cfe/trunk/test/Headers/carbon.c
cfe/trunk/test/Integration/cocoa-pch.m
- copied, changed from r207933, cfe/trunk/test/PCH/cocoa.m
cfe/trunk/test/Integration/cocoa.m
- copied, changed from r207933, cfe/trunk/test/Headers/cocoa.m
cfe/trunk/test/Misc/warn-sysheader.cpp
- copied, changed from r207933, cfe/trunk/test/Headers/warn-sysheader.cpp
Removed:
cfe/trunk/test/Headers/carbon.c
cfe/trunk/test/Headers/cocoa.m
cfe/trunk/test/Headers/warn-sysheader.cpp
cfe/trunk/test/PCH/cocoa.m
Removed: cfe/trunk/test/Headers/carbon.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/carbon.c?rev=207935&view=auto
==============================================================================
--- cfe/trunk/test/Headers/carbon.c (original)
+++ cfe/trunk/test/Headers/carbon.c (removed)
@@ -1,4 +0,0 @@
-// RUN: %clang -fsyntax-only %s
-#ifdef __APPLE__
-#include <Carbon/Carbon.h>
-#endif
Removed: cfe/trunk/test/Headers/cocoa.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/cocoa.m?rev=207935&view=auto
==============================================================================
--- cfe/trunk/test/Headers/cocoa.m (original)
+++ cfe/trunk/test/Headers/cocoa.m (removed)
@@ -1,5 +0,0 @@
-// RUN: %clang -arch x86_64 %s -fsyntax-only -Xclang -print-stats
-#ifdef __APPLE__
-#include <Cocoa/Cocoa.h>
-#endif
-
Removed: cfe/trunk/test/Headers/warn-sysheader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/warn-sysheader.cpp?rev=207935&view=auto
==============================================================================
--- cfe/trunk/test/Headers/warn-sysheader.cpp (original)
+++ cfe/trunk/test/Headers/warn-sysheader.cpp (removed)
@@ -1,33 +0,0 @@
-// Test that -Wsystem-headers works with default and custom mappings like -Werror.
-// Keep run lines at the bottom for line number stability.
-
-#ifdef IS_SYSHEADER
-#pragma clang system_header
-
-int f() { return (int)0; } // Use the old-style-cast warning as an arbitrary "ordinary" diagnostic for the purpose of testing.
-
-#warning "custom message"
-
-#if defined(A) || defined(B)
-// expected-warning at 9 {{"custom message"}}
-#elif defined(C)
-// expected-warning at 7 {{use of old-style cast}}
-// expected-warning at 9 {{"custom message"}}
-#elif defined(D)
-// expected-error at 7 {{use of old-style cast}}
-// expected-error at 9 {{"custom message"}}
-#elif defined(E)
-// expected-error at 7 {{use of old-style cast}}
-// expected-warning at 9 {{"custom message"}}
-#endif
-
-#else
-#define IS_SYSHEADER
-#include __FILE__
-#endif
-
-// RUN: %clang_cc1 -verify -fsyntax-only -DA %s
-// RUN: %clang_cc1 -verify -fsyntax-only -DB -Wold-style-cast %s
-// RUN: %clang_cc1 -verify -fsyntax-only -DC -Wold-style-cast -Wsystem-headers %s
-// RUN: %clang_cc1 -verify -fsyntax-only -DD -Wold-style-cast -Wsystem-headers -Werror %s
-// RUN: %clang_cc1 -verify -fsyntax-only -DE -Wold-style-cast -Wsystem-headers -Werror=old-style-cast %s
Copied: cfe/trunk/test/Integration/carbon.c (from r207933, cfe/trunk/test/Headers/carbon.c)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Integration/carbon.c?p2=cfe/trunk/test/Integration/carbon.c&p1=cfe/trunk/test/Headers/carbon.c&r1=207933&r2=207936&rev=207936&view=diff
==============================================================================
(empty)
Copied: cfe/trunk/test/Integration/cocoa-pch.m (from r207933, cfe/trunk/test/PCH/cocoa.m)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Integration/cocoa-pch.m?p2=cfe/trunk/test/Integration/cocoa-pch.m&p1=cfe/trunk/test/PCH/cocoa.m&r1=207933&r2=207936&rev=207936&view=diff
==============================================================================
(empty)
Copied: cfe/trunk/test/Integration/cocoa.m (from r207933, cfe/trunk/test/Headers/cocoa.m)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Integration/cocoa.m?p2=cfe/trunk/test/Integration/cocoa.m&p1=cfe/trunk/test/Headers/cocoa.m&r1=207933&r2=207936&rev=207936&view=diff
==============================================================================
(empty)
Copied: cfe/trunk/test/Misc/warn-sysheader.cpp (from r207933, cfe/trunk/test/Headers/warn-sysheader.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warn-sysheader.cpp?p2=cfe/trunk/test/Misc/warn-sysheader.cpp&p1=cfe/trunk/test/Headers/warn-sysheader.cpp&r1=207933&r2=207936&rev=207936&view=diff
==============================================================================
(empty)
Removed: cfe/trunk/test/PCH/cocoa.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cocoa.m?rev=207935&view=auto
==============================================================================
--- cfe/trunk/test/PCH/cocoa.m (original)
+++ cfe/trunk/test/PCH/cocoa.m (removed)
@@ -1,7 +0,0 @@
-// RUN: %clang -arch x86_64 -x objective-c-header %s -o %t.h.pch
-// RUN: touch %t.empty.m
-// RUN: %clang -arch x86_64 -fsyntax-only %t.empty.m -include %t.h -Xclang -ast-dump 2>&1 > /dev/null
-#ifdef __APPLE__
-#include <Cocoa/Cocoa.h>
-#endif
-
More information about the cfe-commits
mailing list