r287129 - Fixed layout of test/ASTMerge.

Sean Callanan via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 10:21:01 PST 2016


Author: spyffe
Date: Wed Nov 16 12:21:00 2016
New Revision: 287129

URL: http://llvm.org/viewvc/llvm-project?rev=287129&view=rev
Log:
Fixed layout of test/ASTMerge.

As outlined in a previous RFC, the test/ASTMerge/Inputs folder is getting full and the tests are starting to become interdependent. This is undesirable because

- it makes it harder to write new tests
- it makes it harder to figure out at a glance what old tests are doing, and
- it adds the risk of breaking one test while changing a different one, because of the interdependencies.

To fix this, according to the conversation in the RFC, I have changed the layout from

a.c
Inputs/a1.c
Inputs/a2.c

to

a/test.c
a/Inputs/a1.c
a/Inputs/a2.c
for all existing tests. I have also eliminated interdependencies by replicating the input files for each test that uses them.

https://reviews.llvm.org/D26571

Added:
    cfe/trunk/test/ASTMerge/anonymous-fields/
    cfe/trunk/test/ASTMerge/anonymous-fields/Inputs/
    cfe/trunk/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields1.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/anonymous-fields1.cpp
    cfe/trunk/test/ASTMerge/anonymous-fields/Inputs/anonymous-fields2.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/anonymous-fields2.cpp
    cfe/trunk/test/ASTMerge/anonymous-fields/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/anonymous-fields.cpp
    cfe/trunk/test/ASTMerge/asm/
    cfe/trunk/test/ASTMerge/asm/Inputs/
    cfe/trunk/test/ASTMerge/asm/Inputs/asm-function.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/asm-function.cpp
    cfe/trunk/test/ASTMerge/asm/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/asm.cpp
    cfe/trunk/test/ASTMerge/category/
    cfe/trunk/test/ASTMerge/category/Inputs/
    cfe/trunk/test/ASTMerge/category/Inputs/category1.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/category1.m
    cfe/trunk/test/ASTMerge/category/Inputs/category2.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/category2.m
    cfe/trunk/test/ASTMerge/category/test.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/category.m
    cfe/trunk/test/ASTMerge/class/
    cfe/trunk/test/ASTMerge/class-template/
    cfe/trunk/test/ASTMerge/class-template/Inputs/
    cfe/trunk/test/ASTMerge/class-template/Inputs/class-template1.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/class-template1.cpp
    cfe/trunk/test/ASTMerge/class-template/Inputs/class-template2.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/class-template2.cpp
    cfe/trunk/test/ASTMerge/class-template/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/class-template.cpp
    cfe/trunk/test/ASTMerge/class/Inputs/
    cfe/trunk/test/ASTMerge/class/Inputs/class1.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/class1.cpp
    cfe/trunk/test/ASTMerge/class/Inputs/class2.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/class2.cpp
    cfe/trunk/test/ASTMerge/class/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/class.cpp
    cfe/trunk/test/ASTMerge/class2/
    cfe/trunk/test/ASTMerge/class2/Inputs/
    cfe/trunk/test/ASTMerge/class2/Inputs/class3.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/class3.cpp
    cfe/trunk/test/ASTMerge/class2/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/class2.cpp
    cfe/trunk/test/ASTMerge/codegen-body/
    cfe/trunk/test/ASTMerge/codegen-body/Inputs/
    cfe/trunk/test/ASTMerge/codegen-body/Inputs/body1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/body1.c
    cfe/trunk/test/ASTMerge/codegen-body/Inputs/body2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/body2.c
    cfe/trunk/test/ASTMerge/codegen-body/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/codegen-body.c
    cfe/trunk/test/ASTMerge/codegen-exprs/
    cfe/trunk/test/ASTMerge/codegen-exprs/Inputs/
    cfe/trunk/test/ASTMerge/codegen-exprs/Inputs/exprs1.c
      - copied unchanged from r286635, cfe/trunk/test/ASTMerge/Inputs/exprs1.c
    cfe/trunk/test/ASTMerge/codegen-exprs/Inputs/exprs2.c
      - copied unchanged from r286635, cfe/trunk/test/ASTMerge/Inputs/exprs2.c
    cfe/trunk/test/ASTMerge/codegen-exprs/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/codegen-exprs.c
    cfe/trunk/test/ASTMerge/enum/
    cfe/trunk/test/ASTMerge/enum/Inputs/
    cfe/trunk/test/ASTMerge/enum/Inputs/enum1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/enum1.c
    cfe/trunk/test/ASTMerge/enum/Inputs/enum2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/enum2.c
    cfe/trunk/test/ASTMerge/enum/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/enum.c
    cfe/trunk/test/ASTMerge/exprs/
    cfe/trunk/test/ASTMerge/exprs-cpp/
    cfe/trunk/test/ASTMerge/exprs-cpp/Inputs/
    cfe/trunk/test/ASTMerge/exprs-cpp/Inputs/exprs3.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/exprs3.cpp
    cfe/trunk/test/ASTMerge/exprs-cpp/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/exprs.cpp
    cfe/trunk/test/ASTMerge/exprs/Inputs/
    cfe/trunk/test/ASTMerge/exprs/Inputs/exprs1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/exprs1.c
    cfe/trunk/test/ASTMerge/exprs/Inputs/exprs2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/exprs2.c
    cfe/trunk/test/ASTMerge/exprs/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/exprs.c
    cfe/trunk/test/ASTMerge/function/
    cfe/trunk/test/ASTMerge/function/Inputs/
    cfe/trunk/test/ASTMerge/function/Inputs/function1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/function1.c
    cfe/trunk/test/ASTMerge/function/Inputs/function2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/function2.c
    cfe/trunk/test/ASTMerge/function/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/function.c
    cfe/trunk/test/ASTMerge/inheritance/
    cfe/trunk/test/ASTMerge/inheritance/Inputs/
    cfe/trunk/test/ASTMerge/inheritance/Inputs/inheritance-base.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/inheritance-base.cpp
    cfe/trunk/test/ASTMerge/inheritance/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/inheritance.cpp
    cfe/trunk/test/ASTMerge/init-ctors/
    cfe/trunk/test/ASTMerge/init-ctors/Inputs/
    cfe/trunk/test/ASTMerge/init-ctors/Inputs/init-ctors-classes.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/init-ctors-classes.cpp
    cfe/trunk/test/ASTMerge/init-ctors/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/init-ctors.cpp
    cfe/trunk/test/ASTMerge/interface/
    cfe/trunk/test/ASTMerge/interface/Inputs/
    cfe/trunk/test/ASTMerge/interface/Inputs/interface1.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/interface1.m
    cfe/trunk/test/ASTMerge/interface/Inputs/interface2.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/interface2.m
    cfe/trunk/test/ASTMerge/interface/test.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/interface.m
    cfe/trunk/test/ASTMerge/macro/
    cfe/trunk/test/ASTMerge/macro/Inputs/
    cfe/trunk/test/ASTMerge/macro/Inputs/macro.modulemap
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/macro.modulemap
    cfe/trunk/test/ASTMerge/macro/Inputs/macro1.h
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/macro1.h
    cfe/trunk/test/ASTMerge/macro/Inputs/macro1.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/macro1.m
    cfe/trunk/test/ASTMerge/macro/Inputs/macro2.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/macro2.m
    cfe/trunk/test/ASTMerge/macro/test.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/macro.m
    cfe/trunk/test/ASTMerge/namespace/
    cfe/trunk/test/ASTMerge/namespace/Inputs/
    cfe/trunk/test/ASTMerge/namespace/Inputs/namespace1.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/namespace1.cpp
    cfe/trunk/test/ASTMerge/namespace/Inputs/namespace2.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/namespace2.cpp
    cfe/trunk/test/ASTMerge/namespace/test.cpp
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/namespace.cpp
    cfe/trunk/test/ASTMerge/property/
    cfe/trunk/test/ASTMerge/property/Inputs/
    cfe/trunk/test/ASTMerge/property/Inputs/property1.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/property1.m
    cfe/trunk/test/ASTMerge/property/Inputs/property2.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/property2.m
    cfe/trunk/test/ASTMerge/property/test.m
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/property.m
    cfe/trunk/test/ASTMerge/struct/
    cfe/trunk/test/ASTMerge/struct/Inputs/
    cfe/trunk/test/ASTMerge/struct/Inputs/struct1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/struct1.c
    cfe/trunk/test/ASTMerge/struct/Inputs/struct2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/struct2.c
    cfe/trunk/test/ASTMerge/struct/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/struct.c
    cfe/trunk/test/ASTMerge/typedef/
    cfe/trunk/test/ASTMerge/typedef/Inputs/
    cfe/trunk/test/ASTMerge/typedef/Inputs/typedef1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/typedef1.c
    cfe/trunk/test/ASTMerge/typedef/Inputs/typedef2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/typedef2.c
    cfe/trunk/test/ASTMerge/typedef/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/typedef.c
    cfe/trunk/test/ASTMerge/var/
    cfe/trunk/test/ASTMerge/var/Inputs/
    cfe/trunk/test/ASTMerge/var/Inputs/var1.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/var1.c
    cfe/trunk/test/ASTMerge/var/Inputs/var1.h
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/var1.h
    cfe/trunk/test/ASTMerge/var/Inputs/var2.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/Inputs/var2.c
    cfe/trunk/test/ASTMerge/var/test.c
      - copied unchanged from r287128, cfe/trunk/test/ASTMerge/var.c
Removed:
    cfe/trunk/test/ASTMerge/Inputs/
    cfe/trunk/test/ASTMerge/anonymous-fields.cpp
    cfe/trunk/test/ASTMerge/asm.cpp
    cfe/trunk/test/ASTMerge/category.m
    cfe/trunk/test/ASTMerge/class-template.cpp
    cfe/trunk/test/ASTMerge/class.cpp
    cfe/trunk/test/ASTMerge/class2.cpp
    cfe/trunk/test/ASTMerge/codegen-body.c
    cfe/trunk/test/ASTMerge/codegen-exprs.c
    cfe/trunk/test/ASTMerge/enum.c
    cfe/trunk/test/ASTMerge/exprs.c
    cfe/trunk/test/ASTMerge/exprs.cpp
    cfe/trunk/test/ASTMerge/function.c
    cfe/trunk/test/ASTMerge/inheritance.cpp
    cfe/trunk/test/ASTMerge/init-ctors.cpp
    cfe/trunk/test/ASTMerge/interface.m
    cfe/trunk/test/ASTMerge/macro.m
    cfe/trunk/test/ASTMerge/namespace.cpp
    cfe/trunk/test/ASTMerge/property.m
    cfe/trunk/test/ASTMerge/struct.c
    cfe/trunk/test/ASTMerge/typedef.c
    cfe/trunk/test/ASTMerge/var.c

Removed: cfe/trunk/test/ASTMerge/anonymous-fields.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/anonymous-fields.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/anonymous-fields.cpp (original)
+++ cfe/trunk/test/ASTMerge/anonymous-fields.cpp (removed)
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/anonymous-fields1.cpp
-// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/anonymous-fields2.cpp
-// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
-// expected-no-diagnostics

Removed: cfe/trunk/test/ASTMerge/asm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/asm.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/asm.cpp (original)
+++ cfe/trunk/test/ASTMerge/asm.cpp (removed)
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/asm-function.cpp
-// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-void testAsmImport() {
-  asmFunc(12, 42);
-}

Removed: cfe/trunk/test/ASTMerge/category.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/category.m?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/category.m (original)
+++ cfe/trunk/test/ASTMerge/category.m (removed)
@@ -1,11 +0,0 @@
-// 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: 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
-// CHECK: category2.m:26:1: error: instance method 'method3' has incompatible result types in different translation units ('float' vs. 'int')
-// CHECK: category1.m:24:1: note: instance method 'method3' also declared here
-// CHECK: category2.m:48:1: error: instance method 'blah' has incompatible result types in different translation units ('int' vs. 'float')
-// CHECK: category1.m:46:1: note: instance method 'blah' also declared here
-// CHECK: 3 errors generated.

Removed: cfe/trunk/test/ASTMerge/class-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/class-template.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/class-template.cpp (original)
+++ cfe/trunk/test/ASTMerge/class-template.cpp (removed)
@@ -1,24 +0,0 @@
-// 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: 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'
-
-// CHECK: class-template1.cpp:10:14: error: template parameter has different kinds in different translation units
-// CHECK: class-template2.cpp:10:10: note: template parameter declared here
-
-// CHECK: class-template1.cpp:16:23: error: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int')
-// CHECK: class-template2.cpp:16:23: note: declared here with type 'int'
-
-// CHECK: class-template1.cpp:19:10: error: template parameter has different kinds in different translation units
-// CHECK: class-template2.cpp:19:10: note: template parameter declared here
-
-// CHECK: class-template2.cpp:25:20: error: external variable 'x0r' declared with incompatible types in different translation units ('X0<double> *' vs. 'X0<float> *')
-// CHECK: class-template1.cpp:24:19: note: declared here with type 'X0<float> *'
-
-// CHECK: class-template1.cpp:32:8: warning: type 'X0<wchar_t>' has incompatible definitions in different translation units
-// CHECK: class-template1.cpp:33:7: note: field 'member' has type 'int' here
-// CHECK: class-template2.cpp:34:9: note: field 'member' has type 'float' here
-
-// CHECK: 1 warning and 5 errors generated.

Removed: cfe/trunk/test/ASTMerge/class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/class.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/class.cpp (original)
+++ cfe/trunk/test/ASTMerge/class.cpp (removed)
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/class1.cpp
-// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/class2.cpp
-// RUN: %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 %s 2>&1 -Wno-odr -Werror
-
-// CHECK: class1.cpp:6:8: warning: type 'B' has incompatible definitions in different translation units
-// CHECK: class1.cpp:7:9: note: field 'y' has type 'float' here
-// CHECK: class2.cpp:7:7: note: field 'y' has type 'int' here
-
-// FIXME: we should also complain about mismatched types on the method
-
-// CHECK: class1.cpp:18:6: warning: type 'E' has incompatible definitions in different translation units
-// CHECK: class1.cpp:19:3: note: enumerator 'b' with value 1 here
-// CHECK: class2.cpp:12:3: note: enumerator 'a' with value 0 here

Removed: cfe/trunk/test/ASTMerge/class2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/class2.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/class2.cpp (original)
+++ cfe/trunk/test/ASTMerge/class2.cpp (removed)
@@ -1,9 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/class3.cpp
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-class C3 {
-  int method_1(C2 *x) {
-    return x->x;
-  }
-};

Removed: cfe/trunk/test/ASTMerge/codegen-body.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/codegen-body.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/codegen-body.c (original)
+++ cfe/trunk/test/ASTMerge/codegen-body.c (removed)
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c
-// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c
-// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
-// expected-no-diagnostics
-

Removed: cfe/trunk/test/ASTMerge/codegen-exprs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/codegen-exprs.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/codegen-exprs.c (original)
+++ cfe/trunk/test/ASTMerge/codegen-exprs.c (removed)
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.1.ast %S/Inputs/exprs1.c
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.2.ast %S/Inputs/exprs2.c
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-

Removed: cfe/trunk/test/ASTMerge/enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/enum.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/enum.c (original)
+++ cfe/trunk/test/ASTMerge/enum.c (removed)
@@ -1,25 +0,0 @@
-// 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: 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
-// CHECK: enum2.c:11:3: note: enumerator 'E2Enumerator2' with value 4 here
-// CHECK: enum2.c:13:3: error: external variable 'x2' declared with incompatible types in different translation units ('enum E2' vs. 'enum E2')
-// CHECK: enum1.c:13:3: note: declared here with type 'enum E2'
-// CHECK: enum1.c:16:6: warning: type 'enum E3' has incompatible definitions in different translation units
-// CHECK: enum1.c:18:3: note: enumerator 'E3Enumerator2' with value 3 here
-// CHECK: enum2.c:18:3: note: enumerator 'E3Enumerator' with value 3 here
-// CHECK: enum2.c:20:3: error: external variable 'x3' declared with incompatible types in different translation units ('enum E3' vs. 'enum E3')
-// CHECK: enum1.c:20:3: note: declared here with type 'enum E3'
-// CHECK: enum1.c:23:6: warning: type 'enum E4' has incompatible definitions in different translation units
-// CHECK: enum1.c:26:3: note: enumerator 'E4Enumerator3' with value 2 here
-// CHECK: enum2.c:23:6: note: no corresponding enumerator here
-// CHECK: enum2.c:26:3: error: external variable 'x4' declared with incompatible types in different translation units ('enum E4' vs. 'enum E4')
-// CHECK: enum1.c:27:3: note: declared here with type 'enum E4'
-// CHECK: enum1.c:30:6: warning: type 'enum E5' has incompatible definitions in different translation units
-// CHECK: enum2.c:33:3: note: enumerator 'E5Enumerator4' with value 3 here
-// CHECK: enum1.c:30:6: note: no corresponding enumerator here
-// CHECK: enum2.c:34:3: error: external variable 'x5' declared with incompatible types in different translation units ('enum E5' vs. 'enum E5')
-// CHECK: enum1.c:34:3: note: declared here with type 'enum E5'
-// CHECK: 4 warnings and 4 errors generated

Removed: cfe/trunk/test/ASTMerge/exprs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/exprs.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/exprs.c (original)
+++ cfe/trunk/test/ASTMerge/exprs.c (removed)
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.1.ast %S/Inputs/exprs1.c
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -o %t.2.ast %S/Inputs/exprs2.c
-// RUN: %clang_cc1 -triple %itanium_abi_triple -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-

Removed: cfe/trunk/test/ASTMerge/exprs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/exprs.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/exprs.cpp (original)
+++ cfe/trunk/test/ASTMerge/exprs.cpp (removed)
@@ -1,45 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/exprs3.cpp
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-static_assert(Ch1 == 'a');
-static_assert(Ch2 == 'b');
-static_assert(Ch3 == 'c');
-
-static_assert(Ch4 == L'd');
-static_assert(Ch5 == L'e');
-static_assert(Ch6 == L'f');
-
-static_assert(C1 == 12);
-static_assert(C2 == 13);
-
-static_assert(C3 == 12);
-static_assert(C4 == 13);
-
-static_assert(C5 == 22L);
-static_assert(C6 == 23L);
-
-static_assert(C7 == 66LL);
-static_assert(C8 == 67ULL);
-
-static_assert(bval1 == true);
-static_assert(bval2 == false);
-
-static_assert(ExpressionTrait == false);
-
-static_assert(ArrayRank == 2);
-static_assert(ArrayExtent == 20);
-
-void testImport(int *x, const S1 &cs1, S1 &s1) {
-  testNewThrowDelete();
-  testArrayElement(nullptr, 12);
-  testTernaryOp(0, 1, 2);
-  testConstCast(cs1);
-  testStaticCast(s1);
-  testReinterpretCast(s1);
-  testDynamicCast(s1);
-  testScalarInit(42);
-  testOffsetOf();
-  testDefaultArg(12);
-  useTemplateType();
-}

Removed: cfe/trunk/test/ASTMerge/function.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/function.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/function.c (original)
+++ cfe/trunk/test/ASTMerge/function.c (removed)
@@ -1,15 +0,0 @@
-// 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: 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)' (aka 'void (int, double)') vs. 'void (int, float)')
-// CHECK: function1.c:2:6: note: declared here with type 'void (int, float)'
-// CHECK: function2.c:5:6: error: external function 'f3' declared with incompatible types in different translation units ('void (int)' vs. 'void (void)')
-// CHECK: function1.c:4:6: note: declared here with type 'void (void)'
-// CHECK: 2 errors generated
-
-// expected-error at Inputs/function2.c:3 {{external function 'f1' declared with incompatible types}}
-// expected-note at Inputs/function1.c:2 {{declared here}}
-// expected-error at Inputs/function2.c:5 {{external function 'f3' declared with incompatible types}}
-// expected-note at Inputs/function1.c:4 {{declared here}}

Removed: cfe/trunk/test/ASTMerge/inheritance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/inheritance.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/inheritance.cpp (original)
+++ cfe/trunk/test/ASTMerge/inheritance.cpp (removed)
@@ -1,8 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/inheritance-base.cpp
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-class B : public A {
-  B(int _a) : A(_a) {
-  }
-};

Removed: cfe/trunk/test/ASTMerge/init-ctors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/init-ctors.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/init-ctors.cpp (original)
+++ cfe/trunk/test/ASTMerge/init-ctors.cpp (removed)
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/init-ctors-classes.cpp
-// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++1z -ast-merge %t.1.ast -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-class B {
-  int method_1() {
-    A a(0);
-    return a.x;
-  }
-};

Removed: cfe/trunk/test/ASTMerge/interface.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/interface.m?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/interface.m (original)
+++ cfe/trunk/test/ASTMerge/interface.m (removed)
@@ -1,22 +0,0 @@
-// 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: 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'
-// CHECK: interface1.m:21:12: error: class 'I4' has incompatible superclasses
-// CHECK: interface1.m:21:17: note: inherits from superclass 'I2' here
-// CHECK: interface2.m:21:17: note: inherits from superclass 'I1' here
-// CHECK: interface2.m:33:1: error: class method 'foo' has incompatible result types in different translation units ('float' vs. 'int')
-// CHECK: interface1.m:34:1: note: class method 'foo' also declared here
-// CHECK: interface2.m:39:19: error: class method 'bar:' has a parameter with a different types in different translation units ('float' vs. 'int')
-// CHECK: interface1.m:40:17: note: declared here with type 'int'
-// CHECK: interface2.m:45:1: error: class method 'bar:' is variadic in one translation unit and not variadic in another
-// CHECK: interface1.m:46:1: note: class method 'bar:' also declared here
-// CHECK: interface2.m:57:20: error: instance method 'bar:' has a parameter with a different types in different translation units ('double' vs. 'float')
-// CHECK: interface1.m:58:19: note: declared here with type 'float'
-// CHECK: interface1.m:100:17: error: class 'I15' has incompatible superclasses
-// CHECK: interface1.m:100:17: note: inherits from superclass 'I12' here
-// CHECK: interface2.m:99:17: note: inherits from superclass 'I11' here
-// CHECK: 8 errors generated
-

Removed: cfe/trunk/test/ASTMerge/macro.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/macro.m?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/macro.m (original)
+++ cfe/trunk/test/ASTMerge/macro.m (removed)
@@ -1,6 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir -p %t/cache
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/macro.modulemap -I%S/Inputs -emit-pch -o %t.1.ast %S/Inputs/macro1.m
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/macro.modulemap -I%S/Inputs -emit-pch -o %t.2.ast %S/Inputs/macro2.m
-// RUN: %clang_cc1 -fmodules -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
-// expected-no-diagnostics

Removed: cfe/trunk/test/ASTMerge/namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/namespace.cpp?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/namespace.cpp (original)
+++ cfe/trunk/test/ASTMerge/namespace.cpp (removed)
@@ -1,6 +0,0 @@
-// 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: 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'

Removed: cfe/trunk/test/ASTMerge/property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/property.m?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/property.m (original)
+++ cfe/trunk/test/ASTMerge/property.m (removed)
@@ -1,13 +0,0 @@
-// 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: 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'
-// CHECK: property2.m:12:26: error: instance method 'Prop1' has incompatible result types in different translation units ('int' vs. 'float')
-// CHECK: property1.m:10:28: note: instance method 'Prop1' also declared here
-// CHECK: property1.m:28:21: error: property 'Prop2' is synthesized to different ivars in different translation units ('ivar3' vs. 'ivar2')
-// CHECK: property2.m:29:21: note: property is synthesized to ivar 'ivar2' here
-// CHECK: property1.m:29:10: error: property 'Prop3' is implemented with @dynamic in one translation but @synthesize in another translation unit
-// CHECK: property2.m:31:13: note: property 'Prop3' is implemented with @synthesize here
-// CHECK: 4 errors generated.

Removed: cfe/trunk/test/ASTMerge/struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/struct.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/struct.c (original)
+++ cfe/trunk/test/ASTMerge/struct.c (removed)
@@ -1,42 +0,0 @@
-// 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: 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
-// CHECK: struct2.c:12:9: note: field 'field2' has type 'float' here
-// CHECK: struct2.c:15:11: error: external variable 'x1' declared with incompatible types in different translation units ('struct S1' vs. 'struct S1')
-// CHECK: struct1.c:18:11: note: declared here with type 'struct S1'
-// CHECK: struct1.c:21:8: warning: type 'struct S2' has incompatible definitions in different translation units
-// CHECK: struct2.c:18:7: note: 'S2' is a union here
-// CHECK: struct2.c:18:30: error: external variable 'x2' declared with incompatible types in different translation units ('union S2' vs. 'struct S2')
-// CHECK: struct1.c:21:31: note: declared here with type 'struct S2'
-// CHECK: struct1.c:24:8: warning: type 'struct S3' has incompatible definitions in different translation units
-// CHECK: struct1.c:24:36: note: field 'd' has type 'double' here
-// CHECK: struct2.c:21:8: note: no corresponding field here
-// CHECK: struct2.c:21:31: error: external variable 'x3' declared with incompatible types in different translation units ('struct S3' vs. 'struct S3')
-// CHECK: struct1.c:24:41: note: declared here with type 'struct S3'
-// CHECK: struct1.c:27:8: warning: type 'struct S4' has incompatible definitions in different translation units
-// CHECK: struct2.c:24:26: note: field 'f' has type 'float' here
-// CHECK: struct1.c:27:8: note: no corresponding field here
-// CHECK: struct2.c:24:31: error: external variable 'x4' declared with incompatible types in different translation units ('struct S4' vs. 'struct S4')
-// CHECK: struct1.c:27:22: note: declared here with type 'struct S4'
-// CHECK: struct1.c:33:8: warning: type 'struct S6' has incompatible definitions in different translation units
-// CHECK: struct1.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 8 here
-// CHECK: struct2.c:30:33: note: field 'j' is not a bit-field
-// CHECK: struct2.c:30:38: error: external variable 'x6' declared with incompatible types in different translation units ('struct S6' vs. 'struct S6')
-// CHECK: struct1.c:33:42: note: declared here with type 'struct S6'
-// CHECK: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units
-// CHECK: struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here
-// CHECK: struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here
-// CHECK: struct2.c:33:43: error: external variable 'x7' declared with incompatible types in different translation units ('struct S7' vs. 'struct S7')
-// CHECK: struct1.c:36:42: note: declared here with type 'struct S7'
-// CHECK: struct1.c:56:10: warning: type 'struct DeeperError' has incompatible definitions in different translation units
-// CHECK: struct1.c:56:35: note: field 'f' has type 'int' here
-// CHECK: struct2.c:53:37: note: field 'f' has type 'float' here
-// CHECK: struct1.c:54:8: warning: type 'struct DeepError' has incompatible definitions in different translation units
-// CHECK: struct1.c:56:41: note: field 'Deeper' has type 'struct DeeperError *' here
-// CHECK: struct2.c:53:43: note: field 'Deeper' has type 'struct DeeperError *' here
-// CHECK: struct2.c:54:3: error: external variable 'xDeep' declared with incompatible types in different translation units ('struct DeepError' vs. 'struct DeepError')
-// CHECK: struct1.c:57:3: note: declared here with type 'struct DeepError'
-// CHECK: 8 warnings and 7 errors generated

Removed: cfe/trunk/test/ASTMerge/typedef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/typedef.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/typedef.c (original)
+++ cfe/trunk/test/ASTMerge/typedef.c (removed)
@@ -1,7 +0,0 @@
-// 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: 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')
-// CHECK: 1 error

Removed: cfe/trunk/test/ASTMerge/var.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ASTMerge/var.c?rev=287128&view=auto
==============================================================================
--- cfe/trunk/test/ASTMerge/var.c (original)
+++ cfe/trunk/test/ASTMerge/var.c (removed)
@@ -1,12 +0,0 @@
-// 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: 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 **'
-// CHECK: var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double')
-// CHECK: In file included from{{.*}}var1.c:3:
-// CHECK: var1.h:1:8: note: declared here with type 'double'
-// CHECK: error: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]')
-// CHECK: var1.c:7:5: note: declared here with type 'int [18]'
-// CHECK: 3 errors




More information about the cfe-commits mailing list