[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-16 Thread Sean Callanan via cfe-commits
spyffe closed this revision.
spyffe added a comment.

Committed r287129


Repository:
  rL LLVM

https://reviews.llvm.org/D26571



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-15 Thread Chris Bieneman via cfe-commits
beanz accepted this revision.
beanz added a comment.

LGTM! Thanks for doing this Sean!


Repository:
  rL LLVM

https://reviews.llvm.org/D26571



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-15 Thread Aleksei Sidorin via cfe-commits
a.sidorin added a comment.

@spyffe : It seems to be OK.


Repository:
  rL LLVM

https://reviews.llvm.org/D26571



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-14 Thread Sean Callanan via cfe-commits
spyffe added a reviewer: beanz.
spyffe updated this revision to Diff 77928.
spyffe added a comment.

Updated the locations so the structure is now

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

The naming of "test.c" is no longer a requirement but only a convention.  Also 
`lit.site.cfg` is no longer required because we no longer do anything unusual 
from `lit`'s perspective.


Repository:
  rL LLVM

https://reviews.llvm.org/D26571

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

Index: var.c
===
--- var.c
+++ var.c
@@ -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
Index: typedef.c
===
--- typedef.c
+++ typedef.c
@@ -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
Index: struct.c
===
--- struct.c
+++ struct.c
@@ -1,42 +0,0 @@
-// RUN: %clang_cc1 

[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-14 Thread Aleksei Sidorin via cfe-commits
a.sidorin accepted this revision.
a.sidorin added a comment.
This revision is now accepted and ready to land.

Looks good, thank you!


Repository:
  rL LLVM

https://reviews.llvm.org/D26571



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26571: Clean up layout of ASTMerge tests

2016-11-11 Thread Sean Callanan via cfe-commits
spyffe created this revision.
spyffe added a reviewer: a.sidorin.
spyffe added a subscriber: cfe-commits.
spyffe set the repository for this revision to rL LLVM.

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/a1.c
  a/a2.c

for all existing tests.  I have also eliminated interdependencies (by 
replicating the input files for each test that uses them) and made a little 
`lit.cfg` that makes sure that lit only processes 
`test.c`/`test.m`/`test.cpp`/`test.mm`.


Repository:
  rL LLVM

https://reviews.llvm.org/D26571

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