// 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
// 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}}
// 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) { }
// RUN: %clang_cc1 -emit-html -o %t %s
+// -emit-html requires rewriter.
+// REQUIRES: rewriter
+
#include "c-language-features.inc"
--- /dev/null
+if config.root.clang_rewriter == 0:
+ config.unsupported = True
--- /dev/null
+if config.root.clang_rewriter == 0:
+ config.unsupported = True
// RUN: %clang_cc1 %s -emit-html -o - | grep ">< 10; }"
+// REQUIRES: rewriter
int a(int x) { return x
< 10; }
// RUN: %clang_cc1 %s -emit-html -o -
+// REQUIRES: rewriter
// rdar://6562329
#line 42 "foo.c"
// 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};
// 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};
// 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 '::'}}
// 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();
// 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; }
// 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)
// 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
// 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
// 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
// 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}}
// 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);
// 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;
// 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)
// 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)
# 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")