On 16/07/2014 18:06, Alp Toker wrote:

On 16/07/2014 18:04, NAKAMURA Takumi wrote:
IMO, I think rewriter could be mandatory. Then you may roll back my changes. ;)

Yeah, let's make it mandatory.

I've reverted these in r213159, and will follow up shortly to make it a core feature.

Thanks for making the changes though, in principle the reverted commits were all correct if we were to keep the flag.

Alp.



There's one detail -- the Objective-C rewriters *are* big and heavy, and currently included in this flag.

I think we can just put them behind the ARCMT feature flag, which will take on a new meaning of enabling/disabling all four Objective-C migration and rewriter tools.




2014-07-17 0:01 GMT+09:00 Alp Toker <[email protected]>:
I was just about to make a commit making the rewriter mandatory actually.

It's only 500 lines of code -- I have no idea why it's conventionalized.

Now that you've gone ahead and done this I guess my change to make it a core
feature can wait...

Alp.





On 16/07/2014 16:36, NAKAMURA Takumi wrote:
Author: chapuni
Date: Wed Jul 16 08:36:39 2014
New Revision: 213148

URL: http://llvm.org/viewvc/llvm-project?rev=213148&view=rev
Log:
clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.

Added:
      cfe/trunk/test/Format/lit.local.cfg
      cfe/trunk/test/Frontend/Rewriter/lit.local.cfg
Modified:
cfe/trunk/test/CXX/basic/basic.start/basic.start.main/p2.cpp
cfe/trunk/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
      cfe/trunk/test/CXX/temp/temp.spec/no-body.cpp
      cfe/trunk/test/Coverage/html-print.c
      cfe/trunk/test/Misc/emit-html-insert.c
      cfe/trunk/test/Misc/emit-html.c
      cfe/trunk/test/Parser/brackets.c
      cfe/trunk/test/Parser/brackets.cpp
      cfe/trunk/test/Parser/colon-colon-parentheses.cpp
      cfe/trunk/test/Parser/cxx-extra-semi.cpp
      cfe/trunk/test/Parser/nested-namespaces-recovery.cpp
      cfe/trunk/test/Preprocessor/ignore-pragmas.c
      cfe/trunk/test/Sema/format-strings-fixit-ssize_t.c
      cfe/trunk/test/Sema/format-strings-fixit.c
      cfe/trunk/test/Sema/format-strings-no-fixit.c
cfe/trunk/test/Sema/warn-documentation-almost-trailing.c
      cfe/trunk/test/Sema/warn-strncat-size.c
      cfe/trunk/test/SemaCXX/delete.cpp
      cfe/trunk/test/SemaObjC/cocoa-api-usage.m
      cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed
      cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/CXX/basic/basic.start/basic.start.main/p2.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.start/basic.start.main/p2.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/CXX/basic/basic.start/basic.start.main/p2.cpp
(original)
+++ cfe/trunk/test/CXX/basic/basic.start/basic.start.main/p2.cpp Wed Jul
16 08:36:39 2014
@@ -10,6 +10,7 @@
   // RUN: cp %s %t
// RUN: %clang_cc1 -x c++ %s -std=c++11 -fsyntax-only -verify -DTEST9
   // RUN: not %clang_cc1 -x c++ %t -std=c++11 -fixit -DTEST9
+// REQUIRES: rewriter
   // RUN: %clang_cc1 -x c++ %t -std=c++11 -fsyntax-only -DTEST9
     // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST10

Modified:
cfe/trunk/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp?rev=213148&r1=213147&r2=213148&view=diff

============================================================================== --- cfe/trunk/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
(original)
+++ cfe/trunk/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
Wed Jul 16 08:36:39 2014
@@ -2,6 +2,7 @@
   // RUN: cp %s %t
   // RUN: not %clang_cc1 --std=c++1y -x c++ -fixit %t -DFIXING
   // RUN: %clang_cc1 --std=c++1y -x c++ %t -DFIXING
+// REQUIRES: rewriter
     template<typename T>
T pi = T(3.1415926535897932385); // expected-note {{template is declared
here}}

Modified: cfe/trunk/test/CXX/temp/temp.spec/no-body.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.spec/no-body.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.spec/no-body.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.spec/no-body.cpp Wed Jul 16 08:36:39 2014
@@ -2,6 +2,7 @@
   // RUN: cp %s %t
   // RUN: not %clang_cc1 -x c++ -fixit %t -DFIXING
   // RUN: %clang_cc1 -x c++ %t -DFIXING
+// REQUIRES: rewriter
     template<typename T> void f(T) { }
   template<typename T> void g(T) { }

Modified: cfe/trunk/test/Coverage/html-print.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/html-print.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Coverage/html-print.c (original)
+++ cfe/trunk/test/Coverage/html-print.c Wed Jul 16 08:36:39 2014
@@ -1,3 +1,6 @@
   // RUN: %clang_cc1 -emit-html -o %t %s
   +// -emit-html requires rewriter.
+// REQUIRES: rewriter
+
   #include "c-language-features.inc"

Added: cfe/trunk/test/Format/lit.local.cfg
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/lit.local.cfg?rev=213148&view=auto

==============================================================================
--- cfe/trunk/test/Format/lit.local.cfg (added)
+++ cfe/trunk/test/Format/lit.local.cfg Wed Jul 16 08:36:39 2014
@@ -0,0 +1,2 @@
+if config.root.clang_rewriter == 0:
+    config.unsupported = True

Added: cfe/trunk/test/Frontend/Rewriter/lit.local.cfg
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/Rewriter/lit.local.cfg?rev=213148&view=auto

==============================================================================
--- cfe/trunk/test/Frontend/Rewriter/lit.local.cfg (added)
+++ cfe/trunk/test/Frontend/Rewriter/lit.local.cfg Wed Jul 16 08:36:39
2014
@@ -0,0 +1,2 @@
+if config.root.clang_rewriter == 0:
+    config.unsupported = True

Modified: cfe/trunk/test/Misc/emit-html-insert.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/emit-html-insert.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Misc/emit-html-insert.c (original)
+++ cfe/trunk/test/Misc/emit-html-insert.c Wed Jul 16 08:36:39 2014
@@ -1,4 +1,5 @@
   // RUN: %clang_cc1 %s -emit-html -o - | grep ">&lt; 10; }"
+// REQUIRES: rewriter
     int a(int x) { return x
   < 10; }

Modified: cfe/trunk/test/Misc/emit-html.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/emit-html.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Misc/emit-html.c (original)
+++ cfe/trunk/test/Misc/emit-html.c Wed Jul 16 08:36:39 2014
@@ -1,4 +1,5 @@
   // RUN: %clang_cc1 %s -emit-html -o -
+// REQUIRES: rewriter
     // rdar://6562329
   #line 42 "foo.c"

Modified: cfe/trunk/test/Parser/brackets.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/brackets.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Parser/brackets.c (original)
+++ cfe/trunk/test/Parser/brackets.c Wed Jul 16 08:36:39 2014
@@ -3,6 +3,7 @@
   // RUN: not %clang_cc1 -fixit %t -x c -DFIXIT
   // RUN: %clang_cc1 -fsyntax-only %t -x c -DFIXIT
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s
2>&1 | FileCheck %s -strict-whitespace
+// REQUIRES: rewriter
     void test1() {
     int a[] = {0,1,1,2,3};

Modified: cfe/trunk/test/Parser/brackets.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/brackets.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Parser/brackets.cpp (original)
+++ cfe/trunk/test/Parser/brackets.cpp Wed Jul 16 08:36:39 2014
@@ -3,6 +3,7 @@
   // RUN: not %clang_cc1 -fixit %t -x c++ -DFIXIT
   // RUN: %clang_cc1 -fsyntax-only %t -x c++ -DFIXIT
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s
2>&1 | FileCheck %s -strict-whitespace
+// REQUIRES: rewriter
     void test1() {
     int a[] = {0,1,1,2,3};

Modified: cfe/trunk/test/Parser/colon-colon-parentheses.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/colon-colon-parentheses.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Parser/colon-colon-parentheses.cpp (original)
+++ cfe/trunk/test/Parser/colon-colon-parentheses.cpp Wed Jul 16 08:36:39
2014
@@ -2,6 +2,7 @@
   // RUN: cp %s %t
   // RUN: not %clang_cc1 -x c++ -fixit %t
   // RUN: %clang_cc1 -x c++ %t
+// REQUIRES: rewriter
     struct S { static int a,b,c;};
   int S::(a);  // expected-error{{unexpected parenthesis after '::'}}

Modified: cfe/trunk/test/Parser/cxx-extra-semi.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-extra-semi.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Parser/cxx-extra-semi.cpp (original)
+++ cfe/trunk/test/Parser/cxx-extra-semi.cpp Wed Jul 16 08:36:39 2014
@@ -4,6 +4,7 @@
   // RUN: cp %s %t
   // RUN: %clang_cc1 -x c++ -Wextra-semi -fixit %t
   // RUN: %clang_cc1 -x c++ -Wextra-semi -Werror %t
+// REQUIRES: rewriter
     class A {
     void A1();

Modified: cfe/trunk/test/Parser/nested-namespaces-recovery.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/nested-namespaces-recovery.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Parser/nested-namespaces-recovery.cpp (original)
+++ cfe/trunk/test/Parser/nested-namespaces-recovery.cpp Wed Jul 16
08:36:39 2014
@@ -2,6 +2,7 @@
   // RUN: %clang_cc1 -fsyntax-only -verify %s
   // RUN: not %clang_cc1 -x c++ -fixit %t
   // RUN: %clang_cc1 -x c++ %t
+// REQUIRES: rewriter
     namespace foo1::foo2::foo3 { // expected-error {{nested namespace
definition must define each namespace separately}}
     int foo(int x) { return x; }

Modified: cfe/trunk/test/Preprocessor/ignore-pragmas.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/ignore-pragmas.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/ignore-pragmas.c (original)
+++ cfe/trunk/test/Preprocessor/ignore-pragmas.c Wed Jul 16 08:36:39 2014
@@ -3,6 +3,7 @@
   // RUN: %clang -M -Wall %s -Xclang -verify
   // RUN: %clang -E -frewrite-includes %s -Wall -Xclang -verify
   // RUN: %clang -E -dD -dM %s -Wall -Xclang -verify
+// REQUIRES: rewriter
   // expected-no-diagnostics
     #pragma GCC visibility push (default)

Modified: cfe/trunk/test/Sema/format-strings-fixit-ssize_t.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings-fixit-ssize_t.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Sema/format-strings-fixit-ssize_t.c (original)
+++ cfe/trunk/test/Sema/format-strings-fixit-ssize_t.c Wed Jul 16 08:36:39
2014
@@ -2,6 +2,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -pedantic -Wall -fixit
%t
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -pedantic
-Wall -Werror %t
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -E -o - %t | FileCheck
%s
+// REQUIRES: rewriter
     /* This is a test of the various code modification hints that are
      provided as part of warning or extension diagnostics. All of the

Modified: cfe/trunk/test/Sema/format-strings-fixit.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings-fixit.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Sema/format-strings-fixit.c (original)
+++ cfe/trunk/test/Sema/format-strings-fixit.c Wed Jul 16 08:36:39 2014
@@ -2,6 +2,7 @@
   // RUN: %clang_cc1 -pedantic -Wall -fixit %t
   // RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror %t
   // RUN: %clang_cc1 -E -o - %t | FileCheck %s
+// REQUIRES: rewriter
     /* This is a test of the various code modification hints that are
      provided as part of warning or extension diagnostics. All of the

Modified: cfe/trunk/test/Sema/format-strings-no-fixit.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings-no-fixit.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Sema/format-strings-no-fixit.c (original)
+++ cfe/trunk/test/Sema/format-strings-no-fixit.c Wed Jul 16 08:36:39 2014
@@ -1,6 +1,7 @@
   // RUN: cp %s %t
   // RUN: %clang_cc1 -fsyntax-only -fixit %t
   // RUN: %clang_cc1 -E -o - %t | FileCheck %s
+// REQUIRES: rewriter
     /* This is a test of the various code modification hints that are
      provided as part of warning or extension diagnostics. Only

Modified: cfe/trunk/test/Sema/warn-documentation-almost-trailing.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation-almost-trailing.c?rev=213148&r1=213147&r2=213148&view=diff

============================================================================== --- cfe/trunk/test/Sema/warn-documentation-almost-trailing.c (original) +++ cfe/trunk/test/Sema/warn-documentation-almost-trailing.c Wed Jul 16
08:36:39 2014
@@ -3,6 +3,7 @@
   // RUN: cp %s %t
   // RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fixit %t
   // RUN: %clang_cc1 -fsyntax-only -Wdocumentation -Werror %t
+// REQUIRES: rewriter
     struct a {
     int x; //< comment // expected-warning {{not a Doxygen trailing
comment}}

Modified: cfe/trunk/test/Sema/warn-strncat-size.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-strncat-size.c?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/Sema/warn-strncat-size.c (original)
+++ cfe/trunk/test/Sema/warn-strncat-size.c Wed Jul 16 08:36:39 2014
@@ -2,6 +2,7 @@
// RUN: %clang_cc1 -DUSE_BUILTINS -Wstrncat-size -verify -fsyntax-only
%s
   // RUN: %clang_cc1 -fsyntax-only -Wstrncat-size -fixit -x c %s
// RUN: %clang_cc1 -DUSE_BUILTINS -fsyntax-only -Wstrncat-size -fixit -x
c %s
+// REQUIRES: rewriter
     typedef __SIZE_TYPE__ size_t;
   size_t strlen (const char *s);

Modified: cfe/trunk/test/SemaCXX/delete.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/delete.cpp?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/delete.cpp Wed Jul 16 08:36:39 2014
@@ -2,6 +2,7 @@
   // RUN: cp %s %t
   // RUN: %clang_cc1 -fixit -x c++ %t
   // RUN: %clang_cc1 -E -o - %t | FileCheck %s
+// REQUIRES: rewriter
     void f(int a[10][20]) {
     // CHECK: delete[] a;

Modified: cfe/trunk/test/SemaObjC/cocoa-api-usage.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/cocoa-api-usage.m?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa-api-usage.m (original)
+++ cfe/trunk/test/SemaObjC/cocoa-api-usage.m Wed Jul 16 08:36:39 2014
@@ -3,6 +3,7 @@
   // RUN: cp %s %t.m
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %t.m -fixit
-Wobjc-cocoa-api
   // RUN: diff %s.fixed %t.m
+// REQUIRES: rewriter
     typedef signed char BOOL;
   #define nil ((void*) 0)

Modified: cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed (original)
+++ cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed Wed Jul 16 08:36:39
2014
@@ -3,6 +3,7 @@
   // RUN: cp %s %t.m
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %t.m -fixit
-Wobjc-cocoa-api
   // RUN: diff %s.fixed %t.m
+// REQUIRES: rewriter
     typedef signed char BOOL;
   #define nil ((void*) 0)

Modified: cfe/trunk/test/lit.cfg
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=213148&r1=213147&r2=213148&view=diff

==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Jul 16 08:36:39 2014
@@ -335,6 +335,9 @@ for pattern in [r"\bFileCheck\b",
   # Set available features we allow tests to conditionalize on.
   #
   # Enabled/disabled features
+if config.clang_rewriter != 0:
+    config.available_features.add("rewriter")
+
   if config.clang_staticanalyzer != 0:
       config.available_features.add("staticanalyzer")


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

--
http://www.nuanti.com
the browser experts



--
http://www.nuanti.com
the browser experts

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to