forked from OSchip/llvm-project
Add 'not' to commands that are expected to fail.
This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
This commit is contained in:
parent
18ce7e4761
commit
925213b0fa
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -arcmt-check -verify %s
|
||||
// RUN: %clang_cc1 -arcmt-check -verify %t.invalid 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -arcmt-check -verify %t.invalid 2>&1 | FileCheck %s
|
||||
|
||||
#if 0
|
||||
// expected-error {{should be ignored}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/category1.m
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/category2.m
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: category2.m:18:1: error: instance method 'method2' has incompatible result types in different translation units ('float' vs. 'int')
|
||||
// CHECK: category1.m:16:1: note: instance method 'method2' also declared here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/class-template1.cpp
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/class-template2.cpp
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: class-template1.cpp:7:14: error: non-type template parameter declared with incompatible types in different translation units ('int' vs. 'long')
|
||||
// CHECK: class-template2.cpp:7:15: note: declared here with type 'long'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/enum1.c
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/enum2.c
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: enum1.c:9:6: warning: type 'enum E2' has incompatible definitions in different translation units
|
||||
// CHECK: enum1.c:11:3: note: enumerator 'E2Enumerator2' with value 3 here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/function1.c
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/function2.c
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
|
||||
|
||||
// CHECK: function2.c:3:6: error: external function 'f1' declared with incompatible types in different translation units ('void (Int, double)' vs. 'void (int, float)')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/interface1.m
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/interface2.m
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: interface2.m:16:9: error: instance variable 'ivar2' declared with incompatible types in different translation units ('float' vs. 'int')
|
||||
// CHECK: interface1.m:16:7: note: declared here with type 'int'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/namespace1.cpp
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/namespace2.cpp
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: namespace2.cpp:16:17: error: external variable 'z' declared with incompatible types in different translation units ('double' vs. 'float')
|
||||
// CHECK: namespace1.cpp:16:16: note: declared here with type 'float'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/property1.m
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/property2.m
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: property2.m:12:26: error: property 'Prop1' declared with incompatible types in different translation units ('int' vs. 'float')
|
||||
// CHECK: property1.m:10:28: note: declared here with type 'float'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/struct1.c
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/struct2.c
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: struct1.c:13:8: warning: type 'struct S1' has incompatible definitions in different translation units
|
||||
// CHECK: struct1.c:15:7: note: field 'field2' has type 'int' here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/typedef1.c
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/typedef2.c
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: typedef2.c:4:10: error: external variable 'x2' declared with incompatible types in different translation units ('Typedef2' (aka 'double') vs. 'Typedef2' (aka 'int'))
|
||||
// CHECK: typedef1.c:4:10: note: declared here with type 'Typedef2' (aka 'int')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/var1.c
|
||||
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/var2.c
|
||||
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: var2.c:2:9: error: external variable 'x1' declared with incompatible types in different translation units ('double *' vs. 'float **')
|
||||
// CHECK: var1.c:2:9: note: declared here with type 'float **'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// REQUIRES: arm-registered-target
|
||||
// RUN: %clang_cc1 -triple armv7 %s -S -o /dev/null 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple armv7 %s -S -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
// rdar://13446483
|
||||
typedef __attribute__((neon_vector_type(2))) long long int64x2_t;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -emit-llvm-bc -o %t.bc %s
|
||||
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NO-BC %s
|
||||
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s 2>&1 | FileCheck -check-prefix=CHECK-BC %s
|
||||
// RUN: not %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s 2>&1 | FileCheck -check-prefix=CHECK-BC %s
|
||||
|
||||
int f(void);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm %s -o - -verify | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm %s -o - -verify | FileCheck %s
|
||||
|
||||
// CHECK: @weakvar = weak global
|
||||
// CHECK: @__weakvar_alias = common global
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++11 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++11 | FileCheck %s
|
||||
|
||||
// FIXME: The padding in all these objects should be zero-initialized.
|
||||
namespace StructUnion {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++1y | FileCheck %s
|
||||
// RUN: not %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++1y | FileCheck %s
|
||||
|
||||
struct A {
|
||||
constexpr A() : n(1) {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: not %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
|
||||
|
||||
// CHECK: @a = global i32 10
|
||||
int a = 10;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-linux | FileCheck --check-prefix=CHECKGEN %s
|
||||
//RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-apple-ios3.0 -target-abi apcs-gnu | FileCheck --check-prefix=CHECKARM %s
|
||||
//RUN: %clang_cc1 %s -emit-llvm -o - -DPR12784_WORKAROUND -triple=x86_64-pc-win32 -cxx-abi microsoft | FileCheck --check-prefix=CHECKMS %s
|
||||
//RUN: not %clang_cc1 %s -emit-llvm -o - -DPR12784_WORKAROUND -triple=x86_64-pc-win32 -cxx-abi microsoft | FileCheck --check-prefix=CHECKMS %s
|
||||
|
||||
// FIXME: Add checks to ensure that Microsoft destructors do not return 'this'
|
||||
// once PR12784 is resolved
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
|
||||
// RUN: not %clang_cc1 -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
|
||||
|
||||
void h();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -emit-llvm-only -std=c++1y -g %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -emit-llvm-only -std=c++1y -g %s 2>&1 | FileCheck %s
|
||||
|
||||
struct foo {
|
||||
auto func(); // CHECK: error: debug information for auto is not yet supported
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s
|
||||
|
||||
typedef __typeof(sizeof(int)) size_t;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux | FileCheck -check-prefix LINUX %s
|
||||
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -cxx-abi microsoft | FileCheck -check-prefix WIN32 %s
|
||||
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 -cxx-abi microsoft | FileCheck -check-prefix WIN64 %s
|
||||
// RUN: not %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -cxx-abi microsoft | FileCheck -check-prefix WIN32 %s
|
||||
// RUN: not %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 -cxx-abi microsoft | FileCheck -check-prefix WIN64 %s
|
||||
|
||||
struct Empty {};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin -verify -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin -verify -emit-llvm -o - %s | FileCheck %s
|
||||
void t1() {
|
||||
// CHECK: define void @_Z2t1v
|
||||
// CHECK: [[REFLOAD:%.*]] = load i32** @a, align 8
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang -ObjC -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: %clang -x objective-c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: %clang -x objective-c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: %clang -x c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
|
||||
// RUN: %clang -x c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
|
||||
// RUN: %clang -x objective-c -target x86_64-apple-darwin11 -mmacosx-version-min=10.5 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix UNSUPPORTED %s
|
||||
// RUN: not %clang -ObjC -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -x objective-c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -x objective-c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -x c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
|
||||
// RUN: not %clang -x c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
|
||||
// RUN: not %clang -x objective-c -target x86_64-apple-darwin11 -mmacosx-version-min=10.5 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix UNSUPPORTED %s
|
||||
|
||||
// Just to test clang is working.
|
||||
# foo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: mkdir %t
|
||||
// RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
|
||||
// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
|
||||
// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
|
||||
// RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
|
||||
// RUN: -internal-isystem /tmp/ -internal-externc-isystem /tmp/ \
|
||||
|
@ -9,7 +9,7 @@
|
|||
// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
|
||||
// REQUIRES: crash-recovery
|
||||
|
||||
// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
|
||||
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
#pragma clang __debug parser_crash
|
||||
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// RUN: %clang -c -gstabs %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gstabs+ %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gcoff %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gxcoff %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gxcoff+ %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gvms %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gstabs1 %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gcoff2 %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gxcoff3 %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gvms0 %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -c -gtoggle %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gstabs %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gstabs+ %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gcoff %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gxcoff %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gxcoff+ %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gvms %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gstabs1 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gcoff2 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gxcoff3 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gvms0 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -c -gtoggle %s 2>&1 | FileCheck %s
|
||||
//
|
||||
// CHECK: error: unsupported option
|
||||
|
|
|
@ -108,19 +108,19 @@
|
|||
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin{{/|\\}}hexagon-as"{{.*}} "-march=v4"
|
||||
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin{{/|\\}}hexagon-ld"{{.*}} "-mv4"
|
||||
|
||||
// RUN: %clang -march=hexagonv2 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -march=hexagonv2 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// RUN: %clang -mcpu=hexagonv2 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -mcpu=hexagonv2 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// RUN: %clang -mv2 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -mv2 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// CHECK-UNKNOWN-V2: error: unknown target CPU 'hexagonv2'
|
||||
|
||||
// RUN: %clang -march=hexagonv3 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -march=hexagonv3 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// RUN: %clang -mcpu=hexagonv3 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -mcpu=hexagonv3 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// RUN: %clang -mv3 -target hexagon-unknown-elf \
|
||||
// RUN: not %clang -mv3 -target hexagon-unknown-elf \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// CHECK-UNKNOWN-V3: error: unknown target CPU 'hexagonv3'
|
||||
|
||||
|
|
|
@ -108,19 +108,19 @@
|
|||
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin{{/|\\}}hexagon-as"{{.*}} "-march=v4"
|
||||
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin{{/|\\}}hexagon-ld"{{.*}} "-mv4"
|
||||
|
||||
// RUN: %clang -march=hexagonv2 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -march=hexagonv2 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// RUN: %clang -mcpu=hexagonv2 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -mcpu=hexagonv2 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// RUN: %clang -mv2 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -mv2 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
|
||||
// CHECK-UNKNOWN-V2: error: unknown target CPU 'hexagonv2'
|
||||
|
||||
// RUN: %clang -march=hexagonv3 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -march=hexagonv3 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// RUN: %clang -mcpu=hexagonv3 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -mcpu=hexagonv3 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// RUN: %clang -mv3 -target hexagon-unknown-linux \
|
||||
// RUN: not %clang -mv3 -target hexagon-unknown-linux \
|
||||
// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
|
||||
// CHECK-UNKNOWN-V3: error: unknown target CPU 'hexagonv3'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang -no-integrated-as %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -no-integrated-as %s 2>&1 | FileCheck %s
|
||||
// CHECK: error: unknown type name 'invalid'
|
||||
// CHECK-NOT: clang: error: assembler command failed
|
||||
// CHECK-NOT: clang: error: linker command failed
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang -target le32-unknown-nacl -ccc-echo %s -emit-llvm-only -c 2>&1 | FileCheck %s -check-prefix=ECHO
|
||||
// RUN: not %clang -target le32-unknown-nacl -ccc-echo %s -emit-llvm-only -c 2>&1 | FileCheck %s -check-prefix=ECHO
|
||||
// RUN: %clang -target le32-unknown-nacl %s -emit-llvm -S -c -o - | FileCheck %s
|
||||
// RUN: %clang -target le32-unknown-nacl %s -emit-llvm -S -c -pthread -o - | FileCheck %s -check-prefix=THREADS
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clangxx -nostdinc++ %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clangxx -nostdinc++ %s 2>&1 | FileCheck %s
|
||||
// XFAIL: win32
|
||||
// CHECK: file not found
|
||||
#include <vector>
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
// RUN: %clang -target powerpc64-linux-gnu -faltivec -fsyntax-only %s
|
||||
// RUN: %clang -target powerpc64-linux-gnu -maltivec -fsyntax-only %s
|
||||
|
||||
// RUN: %clang -target i386-pc-win32 -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target x86_64-unknown-freebsd -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target armv6-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target armv7-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target mips-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target mips64-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang -target sparc-unknown-solaris -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target i386-pc-win32 -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target x86_64-unknown-freebsd -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target armv6-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target armv7-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target mips-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target mips64-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -target sparc-unknown-solaris -faltivec -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: invalid argument '-faltivec' only allowed with 'ppc/ppc64'
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// RUN: %clang -std=c++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
|
||||
// RUN: %clang -std=gnu++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX98 %s
|
||||
// RUN: %clang -std=c++03 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
|
||||
// RUN: %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
|
||||
// RUN: %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
|
||||
// RUN: %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
|
||||
// RUN: %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
|
||||
// RUN: %clang -std=c++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Y %s
|
||||
// RUN: %clang -std=gnu++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Y %s
|
||||
// RUN: not %clang -std=c++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
|
||||
// RUN: not %clang -std=gnu++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX98 %s
|
||||
// RUN: not %clang -std=c++03 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
|
||||
// RUN: not %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
|
||||
// RUN: not %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
|
||||
// RUN: not %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
|
||||
// RUN: not %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
|
||||
// RUN: not %clang -std=c++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Y %s
|
||||
// RUN: not %clang -std=gnu++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Y %s
|
||||
|
||||
void f(int n) {
|
||||
typeof(n)();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ -fobjc-arc %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ -fobjc-arc %s 2>&1 | FileCheck %s
|
||||
// rdar://12788838
|
||||
|
||||
id obj;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// rdar://10723084
|
||||
|
||||
void f0() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: cp %s %t
|
||||
// RUN: not %clang_cc1 -x c++ -std=c++11 -fixit %t
|
||||
// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++11 %t
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
|
||||
namespace ClassSpecifier {
|
||||
class [[]] [[]]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// RUN: cp %S/fixit-include.h %T
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fixit %t
|
||||
// RUN: %clang_cc1 -Wall -pedantic %t
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
|
||||
#include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}}
|
||||
// CHECK: fix-it:{{.*}}:{8:10-8:27}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// rdar://11311333
|
||||
|
||||
@interface NSView @end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
|
||||
// rdar://11376372
|
||||
|
||||
@class NSObject;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck -check-prefix=CHECK-MACHINE %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck -check-prefix=CHECK-MACHINE %s
|
||||
|
||||
struct Foo {
|
||||
int bar;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -verify -x c++ %s
|
||||
// RUN: %clang_cc1 -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
|
||||
|
||||
struct S {
|
||||
int n;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
|
||||
// RUN: cp %s %t
|
||||
// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ %t
|
||||
// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ %t
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -std=c++11 2>&1 %s | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -std=c++11 2>&1 %s | FileCheck -strict-whitespace %s
|
||||
|
||||
struct A {
|
||||
unsigned int a;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fdiagnostics-parseable-fixits -x c++ -std=c++11 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fdiagnostics-parseable-fixits -x c++ -std=c++11 %s 2>&1 | FileCheck %s
|
||||
|
||||
// test that the diagnostics produced by this code do not include fixit hints
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
|
||||
// RUN: cp %s %t
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fixit -x c %t
|
||||
// RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x c %t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: cp %s %t-1.cpp
|
||||
// RUN: cp %s %t-2.cpp
|
||||
// RUN: clang-format 2>&1 >/dev/null -offset=1 -length=0 %t-1.cpp %t-2.cpp |FileCheck %s
|
||||
// RUN: not clang-format 2>&1 >/dev/null -offset=1 -length=0 %t-1.cpp %t-2.cpp |FileCheck %s
|
||||
// CHECK: error: "-offset" and "-length" can only be used for single file.
|
||||
|
||||
int i ;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: %clang_cc1 -S -o - %s 2>&1 | FileCheck %s
|
||||
; RUN: not %clang_cc1 -S -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
target triple = "x86_64-apple-darwin10"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
|
||||
|
||||
#if __has_include bar.h
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -verify -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
|
||||
// RUN: %clang_cc1 -verify -E -frewrite-includes -P -DFIRST -I %S/Inputs %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -verify -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -verify -E -frewrite-includes -P -DFIRST -I %S/Inputs %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
|
||||
// STARTCOMPARE
|
||||
#define A(a,b) a ## b
|
||||
A(1,2)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -Wfatal-errors -verify %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -Wfatal-errors -verify %s 2>&1 | FileCheck %s
|
||||
|
||||
#error first fatal
|
||||
// expected-error@-1 {{first fatal}}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// RUN: %clang_cc1 -DTEST1 -verify %s
|
||||
// RUN: %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
|
||||
// RUN: %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: %clang_cc1 -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
|
||||
// RUN: %clang_cc1 -DTEST5 -verify %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
|
||||
// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
|
||||
// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: not %clang_cc1 -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
|
||||
// RUN: not %clang_cc1 -DTEST5 -verify %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
|
||||
|
||||
// expected-warning@ malformed
|
||||
// expected-error@7 1 {{missing or invalid line number}}
|
||||
|
@ -109,14 +109,14 @@ unexpected b; // expected-error@33 1-1 {{unknown type}}
|
|||
#endif
|
||||
|
||||
#if 0
|
||||
// RUN: %clang_cc1 -verify %t.invalid 2>&1 | FileCheck -check-prefix=CHECK6 %s
|
||||
// RUN: not %clang_cc1 -verify %t.invalid 2>&1 | FileCheck -check-prefix=CHECK6 %s
|
||||
|
||||
// CHECK6: error: no expected directives found: consider use of 'expected-no-diagnostics'
|
||||
// CHECK6-NEXT: error: 'error' diagnostics seen but not expected:
|
||||
// CHECK6-NEXT: (frontend): error reading '{{.*}}verify.c.tmp.invalid'
|
||||
// CHECK6-NEXT: 2 errors generated.
|
||||
|
||||
// RUN: echo -e '//expected-error@2{{1}}\n#error 2' | %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK7 %s
|
||||
// RUN: echo -e '//expected-error@2{{1}}\n#error 2' | not %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK7 %s
|
||||
|
||||
// CHECK7: error: 'error' diagnostics expected but not seen:
|
||||
// CHECK7-NEXT: Line 2 (directive at <stdin>:1): 1
|
||||
|
@ -126,7 +126,7 @@ unexpected b; // expected-error@33 1-1 {{unknown type}}
|
|||
#endif
|
||||
|
||||
#ifdef TEST8
|
||||
// RUN: %clang_cc1 -DTEST8 -verify %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
|
||||
// RUN: not %clang_cc1 -DTEST8 -verify %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
|
||||
|
||||
// expected-warning@nonexistant-file:1 {{ }}
|
||||
// expected-error@-1 {{file 'nonexistant-file' could not be located}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if 0
|
||||
// RUN: %clang_cc1 -verify %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -verify %s 2>&1 | FileCheck %s
|
||||
|
||||
// Please note that all comments are inside "#if 0" blocks so that
|
||||
// VerifyDiagnosticConsumer sees no comments while processing this
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// diagnostics are generated in relation to the mis-use and non-use of the
|
||||
// 'expected-no-diagnostics' directive.
|
||||
|
||||
// RUN: %clang_cc1 -DTEST1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: not %clang_cc1 -DTEST1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
|
||||
#ifdef TEST1
|
||||
// expected-no-diagnostics
|
||||
// expected-note {{}}
|
||||
|
@ -12,7 +12,7 @@
|
|||
// CHECK1-NEXT: 1 error generated.
|
||||
#endif
|
||||
|
||||
// RUN: %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
|
||||
// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
|
||||
#ifdef TEST2
|
||||
#warning X
|
||||
// expected-warning@-1 {{X}}
|
||||
|
@ -23,8 +23,8 @@
|
|||
// CHECK2-NEXT: 1 error generated.
|
||||
#endif
|
||||
|
||||
// RUN: %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: not %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK3 %s
|
||||
#ifdef TEST3
|
||||
// no directives
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: c-index-test -test-load-source all %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
|
||||
// CHECK: annotate-comments-unterminated.c:9:5: VarDecl=x:{{.*}} RawComment=[/** Aaa. */]{{.*}} BriefComment=[Aaa.]
|
||||
// CHECK: annotate-comments-unterminated.c:11:5: VarDecl=y:{{.*}} RawComment=[/**< Bbb. */]{{.*}} BriefComment=[Bbb.]
|
||||
|
|
|
@ -33,22 +33,22 @@
|
|||
//
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-para-kind-01.xml
|
||||
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-01.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-02.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-03.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-04.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-05.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-06.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-07.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-08.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-09.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-10.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-11.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-12.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-13.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-01.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-02.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-03.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-04.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-05.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-06.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-07.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-08.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-09.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-10.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-11.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-12.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-function-13.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
//
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-01.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-02.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-01.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
// RUN: not xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/invalid-para-kind-02.xml 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
|
||||
// CHECK-INVALID: fails to validate
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: touch %t.c
|
||||
// RUN: c-index-test -write-pch %t.pch %t.c
|
||||
// RUN: cp %s %t.c
|
||||
// RUN: c-index-test -test-load-tu %t.pch local 2>&1 | FileCheck %s
|
||||
// RUN: not c-index-test -test-load-tu %t.pch local 2>&1 | FileCheck %s
|
||||
|
||||
// rdar://11558355
|
||||
// Unfortunately this would crash reliably only via valgrind.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// RUN: c-index-test -write-pch %t.h.pch %S/targeted-top.h
|
||||
// RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
|
||||
// RUN: -Xclang -error-on-deserialized-decl=NestedVar1
|
||||
// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
|
||||
// RUN: not env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
|
||||
// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 2>&1 \
|
||||
// RUN: | FileCheck %s
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ void foo(void) {
|
|||
// CHECK-INDEX: [indexDeclaration]: kind: function | name: foo
|
||||
// CHECK-INDEX: [indexEntityReference]: kind: function | name: erroneous
|
||||
|
||||
// RUN: %clang -fsyntax-only %s -include %t.h 2>&1 | FileCheck -check-prefix=PCH-ERR %s
|
||||
// RUN: not %clang -fsyntax-only %s -include %t.h 2>&1 | FileCheck -check-prefix=PCH-ERR %s
|
||||
// PCH-ERR: error: PCH file contains compiler errors
|
||||
|
||||
// RUN: c-index-test -write-pch %t.pch foobar.c 2>&1 | FileCheck -check-prefix=NONEXISTENT %s
|
||||
// RUN: not c-index-test -write-pch %t.pch foobar.c 2>&1 | FileCheck -check-prefix=NONEXISTENT %s
|
||||
// NONEXISTENT: Unable to load translation unit
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang-cc1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang-cc1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// IMPORTANT: This test case intentionally DOES NOT use --disable-free. It
|
||||
// tests that we are properly reclaiming the ASTs and we do not have a double free.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 %s -D__TIME__=1234 -U__DATE__ -E 2>&1 | FileCheck %s --check-prefix=CHECK-OUT
|
||||
// RUN: %clang_cc1 %s -D__TIME__=1234 -U__DATE__ -E 2>&1 | FileCheck %s --check-prefix=CHECK-WARN
|
||||
// RUN: %clang_cc1 %s -D__TIME__=1234 -U__DATE__ -E 2>&1 -pedantic-errors | FileCheck %s --check-prefix=CHECK-ERR
|
||||
// RUN: not %clang_cc1 %s -D__TIME__=1234 -U__DATE__ -E 2>&1 -pedantic-errors | FileCheck %s --check-prefix=CHECK-ERR
|
||||
|
||||
// CHECK-WARN: <command line>:{{.*}} warning: redefining builtin macro
|
||||
// CHECK-WARN: <command line>:{{.*}} warning: undefining builtin macro
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -std=c++11 -E %s 2>&1 | grep 'error: raw string missing terminating delimiter )foo"'
|
||||
// RUN: not %clang_cc1 -std=c++11 -E %s 2>&1 | grep 'error: raw string missing terminating delimiter )foo"'
|
||||
|
||||
const char *str = R"foo(abc
|
||||
def)bar";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
void foo() {
|
||||
(void)"\q \u123z \x \U \U123 \U12345 \u123 \xyzzy \777 \U"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | not grep keyXXXX
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | not grep keyXXXX
|
||||
// This should not show keyXXXX in the caret diag output. This once
|
||||
// happened because the two tokens ended up in the scratch buffer and
|
||||
// the caret diag from the scratch buffer included the previous token.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fmessage-length 60 %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fmessage-length 0 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 60 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 0 %s 2>&1 | FileCheck %s
|
||||
|
||||
struct B { void f(); };
|
||||
struct D1 : B {};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang -fsyntax-only -fmacro-backtrace-limit=0 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang -fsyntax-only -fmacro-backtrace-limit=0 %s 2>&1 | FileCheck %s
|
||||
|
||||
#define FOO 1+"hi"
|
||||
#define BAR FOO
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
// RUN: %clang_cc1 %s -Wno-extra-tokens 2>&1 | not grep diagnostic
|
||||
|
||||
// -Werror can map all warnings to error.
|
||||
// RUN: %clang_cc1 %s -Werror 2>&1 | grep "error:"
|
||||
// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
|
||||
|
||||
// -Werror can map this one warning to error.
|
||||
// RUN: %clang_cc1 %s -Werror=extra-tokens 2>&1 | grep "error:"
|
||||
// RUN: not %clang_cc1 %s -Werror=extra-tokens 2>&1 | grep "error:"
|
||||
|
||||
// Mapping unrelated diags to errors doesn't affect this one.
|
||||
// RUN: %clang_cc1 %s -Werror=trigraphs 2>&1 | grep "warning:"
|
||||
|
@ -16,7 +16,7 @@
|
|||
// RUN: %clang_cc1 %s -pedantic 2>&1 | grep "warning:"
|
||||
|
||||
// This should emit an error with -pedantic-errors.
|
||||
// RUN: %clang_cc1 %s -pedantic-errors 2>&1 | grep "error:"
|
||||
// RUN: not %clang_cc1 %s -pedantic-errors 2>&1 | grep "error:"
|
||||
|
||||
// This should emit a warning, because -Wfoo overrides -pedantic*.
|
||||
// RUN: %clang_cc1 %s -pedantic-errors -Wextra-tokens 2>&1 | grep "warning:"
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
// RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
|
||||
|
||||
// -Werror can map all warnings to error.
|
||||
// RUN: %clang_cc1 %s -Werror 2>&1 | grep "error:"
|
||||
// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
|
||||
|
||||
// -Werror can map this one warning to error.
|
||||
// RUN: %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:"
|
||||
// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:"
|
||||
|
||||
// -Wno-error= overrides -Werror. rdar://3158301
|
||||
// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -pedantic-errors %s 2>&1 | FileCheck %s --check-prefix=PRESUMED
|
||||
// RUN: %clang_cc1 -fsyntax-only -pedantic-errors -fno-diagnostics-use-presumed-location %s 2>&1 | FileCheck %s --check-prefix=SPELLING
|
||||
// RUN: not %clang_cc1 -fsyntax-only -pedantic-errors %s 2>&1 | FileCheck %s --check-prefix=PRESUMED
|
||||
// RUN: not %clang_cc1 -fsyntax-only -pedantic-errors -fno-diagnostics-use-presumed-location %s 2>&1 | FileCheck %s --check-prefix=SPELLING
|
||||
|
||||
#line 100
|
||||
#define X(y) y
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fcolor-diagnostics %s 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fcolor-diagnostics -fdiagnostics-show-template-tree %s 2>&1 | FileCheck %s -check-prefix=TREE
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fcolor-diagnostics %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fcolor-diagnostics -fdiagnostics-show-template-tree %s 2>&1 | FileCheck %s -check-prefix=TREE
|
||||
// REQUIRES: ansi-escape-sequences
|
||||
template<typename> struct foo {};
|
||||
void func(foo<int>);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s -std=c++98 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s -std=c++98 2>&1 | FileCheck %s
|
||||
|
||||
namespace PR14342 {
|
||||
template<typename T, char a> struct X {};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-NOTREE
|
||||
// RUN: %clang_cc1 -fsyntax-only %s -fno-elide-type -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-NOTREE
|
||||
// RUN: %clang_cc1 -fsyntax-only %s -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-TREE
|
||||
// RUN: %clang_cc1 -fsyntax-only %s -fno-elide-type -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-TREE
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-NOTREE
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s -fno-elide-type -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-NOTREE
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-TREE
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s -fno-elide-type -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-TREE
|
||||
|
||||
// PR9548 - "no known conversion from 'vector<string>' to 'vector<string>'"
|
||||
// vector<string> refers to two different types here. Make sure the message
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
// CHECK: {{ERR_DNS_SERVER_REQUIRES_TCP$}}
|
||||
|
||||
// http://llvm.org/PR12674
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -verify %s 2>&1 | FileCheck %s
|
||||
|
||||
// Test the -verify flag. Each of the "x = y;" lines will produce a
|
||||
// "use of undeclared identifier 'y'" error message.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// error and three notes emitted
|
||||
void foo(int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// error and note emitted
|
||||
struct s1{};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
|
||||
// RUN: %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
// RUN: %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
|
||||
|
||||
#include "Inputs/include.h"
|
||||
int test() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: | FileCheck %s -check-prefix=BASE
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-option %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=OPTION
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-option -Werror %s 2>&1 \
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-option -Werror %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=OPTION_ERROR
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c89 -pedantic -fdiagnostics-show-option %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=OPTION_PEDANTIC
|
||||
|
@ -10,7 +10,7 @@
|
|||
// RUN: | FileCheck %s -check-prefix=CATEGORY_ID
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-category name %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=CATEGORY_NAME
|
||||
// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-show-option -fdiagnostics-show-category name -Werror %s 2>&1 \
|
||||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-option -fdiagnostics-show-category name -Werror %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=OPTION_ERROR_CATEGORY
|
||||
|
||||
void test(int x, int y) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 %s -fmessage-length 40 2>&1 | FileCheck -strict-whitespace %s
|
||||
// RUN: not %clang_cc1 %s -fmessage-length 40 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
|
||||
|
||||
@import DependsOnModule;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
// CHECK: fatal error: could not build module 'DependsOnModule'
|
||||
// CHECK-NOT: error:
|
||||
|
||||
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s
|
||||
// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s
|
||||
extern int Module;
|
||||
|
||||
// CHECK-REDEF: In module 'DependsOnModule' imported from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL
|
||||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N
|
||||
// RUN: not %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL
|
||||
// RUN: not %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N
|
||||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
|
||||
|
||||
@import cxx_templates_a;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s
|
||||
// FIXME: When we have a syntax for modules in C, use that.
|
||||
@import MutuallyRecursive1;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
|
||||
|
||||
@import Module;
|
||||
@import DependsOnModule;
|
||||
|
|
|
@ -21,6 +21,6 @@
|
|||
#endif
|
||||
|
||||
// Also check that libclang does not create a PCH with such an error.
|
||||
// RUN: c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t %s \
|
||||
// RUN: -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
|
||||
// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \
|
||||
// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
|
||||
// CHECK: Unable to write PCH file
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
|
||||
// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
|
||||
// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
|
||||
|
||||
// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -fdisable-module-hash %s -DFAILURE 2> %t.out
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_right %S/Inputs/module.map
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros %S/Inputs/module.map
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t %s
|
||||
// RUN: %clang_cc1 -E -fmodules -x objective-c -fmodules-cache-path=%t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
|
||||
// RUN: not %clang_cc1 -E -fmodules -x objective-c -fmodules-cache-path=%t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
|
||||
// FIXME: When we have a syntax for modules in C, use that.
|
||||
// These notes come from headers in modules, and are bogus.
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s
|
||||
|
||||
// Test error when pch's -fobjc-arc state is different.
|
||||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR1 %s
|
||||
// RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR1 %s
|
||||
// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -x objective-c-header -o %t %S/Inputs/arc.h
|
||||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR2 %s
|
||||
// RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR2 %s
|
||||
|
||||
array0 a0;
|
||||
array1 a1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-empty.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-EMPTY %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-dir.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-empty.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-EMPTY %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-dir.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s
|
||||
|
||||
// The purpose of this test is to verify that various invalid PCH files are
|
||||
// reported as such.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 %s -emit-pch -o %t.pch
|
||||
// RUN: %clang_cc1 %s -emit-llvm %s -include-pch %t.pch -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s -emit-llvm %s -include-pch %t.pch -o - | FileCheck %s
|
||||
|
||||
#ifndef HEADER
|
||||
#define HEADER
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Test this without pch.
|
||||
// RUN: %clang_cc1 -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5"
|
||||
// RUN: not %clang_cc1 -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5"
|
||||
|
||||
// Test with pch.
|
||||
// RUN: %clang_cc1 -emit-pch -o %t %S/line-directive.h
|
||||
// RUN: %clang_cc1 -include-pch %t -fsyntax-only %s 2>&1|grep "25:5"
|
||||
// RUN: not %clang_cc1 -include-pch %t -fsyntax-only %s 2>&1|grep "25:5"
|
||||
|
||||
double x; // expected-error{{redefinition of 'x' with a different type}}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: cp %s %t.dir/t.c
|
||||
// RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch
|
||||
// RUN: echo >> %t.dir/header2.h
|
||||
// RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s
|
||||
|
||||
#include "header2.h"
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Test this without pch.
|
||||
// RUN: %clang_cc1 -include %S/objcxx-ivar-class.h -verify %s -emit-llvm -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 -include %S/objcxx-ivar-class.h -verify %s -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// Test with pch.
|
||||
// RUN: %clang_cc1 -x objective-c++-header -emit-pch -o %t %S/objcxx-ivar-class.h
|
||||
// RUN: %clang_cc1 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// CHECK: [C position]
|
||||
// CHECK: call {{.*}} @_ZN1SC1ERKS_
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Test this without pch.
|
||||
// RUN: %clang_cc1 -include %S/pragma-weak.h %s -verify -emit-llvm -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 -include %S/pragma-weak.h %s -verify -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// Test with pch.
|
||||
// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak.h
|
||||
// RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// CHECK: @weakvar = weak global i32 0
|
||||
int weakvar;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Check that using the preamble option actually skips the preamble.
|
||||
|
||||
// RUN: %clang_cc1 -emit-pch -o %t %S/Inputs/preamble.h -DFOO=f
|
||||
// RUN: %clang_cc1 -include-pch %t -preamble-bytes=317,1 -DFOO=f -verify %s -emit-llvm -o - | FileCheck %s
|
||||
// RUN: not %clang_cc1 -include-pch %t -preamble-bytes=317,1 -DFOO=f -verify %s -emit-llvm -o - | FileCheck %s
|
||||
|
||||
float f(int); // Not an error, because we skip this via the preamble!
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o %t %S/pth.h
|
||||
// RUN: %clang_cc1 -triple i386-unknown-unknown -include-pth %t -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -triple i386-unknown-unknown -include-pth %t -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
#error This is the only diagnostic
|
||||
|
||||
// CHECK: This is the only diagnostic
|
||||
// CHECK: 1 error generated.
|
||||
// CHECK: 1 error generated.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// %clang_cc1 -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
|
||||
|
||||
// RUN: %clang_cc1 -x c++-header %s.h -emit-pch -o %t.pch
|
||||
// RUN: %clang_cc1 %s -include-pch %t.pch -remap-file "%s.h;%s.remap.h" -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s -include-pch %t.pch -remap-file "%s.h;%s.remap.h" -fsyntax-only 2>&1 | FileCheck %s
|
||||
|
||||
const char *str = STR;
|
||||
int ge = zool;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -std=c++11 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 -std=c++11 %s 2>&1 | FileCheck %s
|
||||
|
||||
// PR11000: Don't crash.
|
||||
class tuple<>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s 2>&1 | FileCheck %s
|
||||
// REQUIRES: crash-recovery
|
||||
|
||||
#prag\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only %s 2>&1|FileCheck %s
|
||||
// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
|
||||
|
||||
// <rdar://problem/9221993>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 %s 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s 2>&1 | FileCheck %s
|
||||
|
||||
// Just shouldn't crash. -verify suppresses the crash, so don't use it.
|
||||
// PR13417
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// RUN: %clang_cc1 %s -fsyntax-only -DHUGE 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -fsyntax-only -fbracket-depth 299 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s -fsyntax-only -DHUGE 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s -fsyntax-only 2>&1 | FileCheck %s
|
||||
// RUN: not %clang_cc1 %s -fsyntax-only -fbracket-depth 299 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -fsyntax-only -fbracket-depth 300
|
||||
// RUN: %clang %s -fsyntax-only -fbracket-depth=299 2>&1 | FileCheck %s
|
||||
// RUN: not %clang %s -fsyntax-only -fbracket-depth=299 2>&1 | FileCheck %s
|
||||
// RUN: %clang %s -fsyntax-only -fbracket-depth=300
|
||||
|
||||
void foo(void) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue