summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-09 19:03:51 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-09 19:03:51 +0000
commit3155f573f5ad55a4838d7ea73bfa819ef6be82d3 (patch)
tree26212e7eec6d7423539bed5ea08f9cce24f1aca7 /clang/test
parent7e4a4759295d6335f6e545466bf1933258227ad9 (diff)
downloadbcm5719-llvm-3155f573f5ad55a4838d7ea73bfa819ef6be82d3.tar.gz
bcm5719-llvm-3155f573f5ad55a4838d7ea73bfa819ef6be82d3.zip
Turn access control on by default in -cc1.
Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. llvm-svn: 100880
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/class.access/class.access.base/p1.cpp2
-rw-r--r--clang/test/CXX/class.access/class.access.base/p5.cpp2
-rw-r--r--clang/test/CXX/class.access/class.access.nest/p1.cpp2
-rw-r--r--clang/test/CXX/class.access/class.friend/p1.cpp2
-rw-r--r--clang/test/CXX/class.access/class.protected/p1.cpp2
-rw-r--r--clang/test/CXX/class.access/p4.cpp2
-rw-r--r--clang/test/CXX/class.access/p6.cpp2
-rw-r--r--clang/test/CXX/class/class.local/p2.cpp2
-rw-r--r--clang/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp2
-rw-r--r--clang/test/CXX/conv/conv.mem/p4.cpp2
-rw-r--r--clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp2
-rw-r--r--clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp1
-rw-r--r--clang/test/CXX/expr/expr.unary/expr.delete/p5.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp6
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp2
-rw-r--r--clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp2
-rw-r--r--clang/test/CodeGenCXX/assign-operator.cpp2
-rw-r--r--clang/test/CodeGenCXX/constructor-init-reference.cpp2
-rw-r--r--clang/test/CodeGenCXX/constructors.cpp2
-rw-r--r--clang/test/CodeGenCXX/default-destructor-nested.cpp2
-rw-r--r--clang/test/CodeGenCXX/instantiate-init-list.cpp2
-rw-r--r--clang/test/CodeGenCXX/mangle.cpp2
-rw-r--r--clang/test/CodeGenCXX/new-operator-phi.cpp2
-rw-r--r--clang/test/CodeGenCXX/operator-new.cpp1
-rw-r--r--clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp1
-rw-r--r--clang/test/CodeGenCXX/template-instantiation.cpp1
-rw-r--r--clang/test/CodeGenCXX/virt-template-vtable.cpp1
-rw-r--r--clang/test/FixIt/typo.cpp1
-rw-r--r--clang/test/SemaCXX/access-base-class.cpp2
-rw-r--r--clang/test/SemaCXX/access-control-check.cpp2
-rw-r--r--clang/test/SemaCXX/conditional-expr.cpp2
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp3
-rw-r--r--clang/test/SemaCXX/cstyle-cast.cpp2
-rw-r--r--clang/test/SemaCXX/direct-initializer.cpp2
-rw-r--r--clang/test/SemaCXX/functional-cast.cpp2
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp2
-rw-r--r--clang/test/SemaCXX/new-delete.cpp2
-rw-r--r--clang/test/SemaCXX/overloaded-operator.cpp1
-rw-r--r--clang/test/SemaCXX/static-cast.cpp2
-rw-r--r--clang/test/SemaCXX/virtual-override.cpp2
-rw-r--r--clang/test/SemaTemplate/dependent-names.cpp4
-rw-r--r--clang/test/SemaTemplate/instantiate-local-class.cpp4
-rw-r--r--clang/test/SemaTemplate/instantiate-member-class.cpp5
-rw-r--r--clang/test/SemaTemplate/instantiate-member-initializers.cpp1
-rw-r--r--clang/test/SemaTemplate/instantiate-using-decl.cpp2
-rw-r--r--clang/test/SemaTemplate/qualified-id.cpp1
46 files changed, 56 insertions, 39 deletions
diff --git a/clang/test/CXX/class.access/class.access.base/p1.cpp b/clang/test/CXX/class.access/class.access.base/p1.cpp
index 1bbcedb9a1e..09884316f9c 100644
--- a/clang/test/CXX/class.access/class.access.base/p1.cpp
+++ b/clang/test/CXX/class.access/class.access.base/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++0x [class.access.base]p1(a):
// If a class is declared to be a base class for another class using
diff --git a/clang/test/CXX/class.access/class.access.base/p5.cpp b/clang/test/CXX/class.access/class.access.base/p5.cpp
index 96037e7de2b..938d9fbe9bf 100644
--- a/clang/test/CXX/class.access/class.access.base/p5.cpp
+++ b/clang/test/CXX/class.access/class.access.base/p5.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -faccess-control -verify %s
+// RUN: %clang_cc1 -verify %s
namespace test0 {
struct A {
diff --git a/clang/test/CXX/class.access/class.access.nest/p1.cpp b/clang/test/CXX/class.access/class.access.nest/p1.cpp
index d2644c6ef47..eceffcf991b 100644
--- a/clang/test/CXX/class.access/class.access.nest/p1.cpp
+++ b/clang/test/CXX/class.access/class.access.nest/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// Derived from GNU's std::string
namespace test0 {
diff --git a/clang/test/CXX/class.access/class.friend/p1.cpp b/clang/test/CXX/class.access/class.friend/p1.cpp
index 22266cd8f8f..7ea4f078d20 100644
--- a/clang/test/CXX/class.access/class.friend/p1.cpp
+++ b/clang/test/CXX/class.access/class.friend/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++'0x [class.friend] p1:
// A friend of a class is a function or class that is given permission to use
diff --git a/clang/test/CXX/class.access/class.protected/p1.cpp b/clang/test/CXX/class.access/class.protected/p1.cpp
index 949475cc66a..6ff630c9969 100644
--- a/clang/test/CXX/class.access/class.protected/p1.cpp
+++ b/clang/test/CXX/class.access/class.protected/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace test0 {
class A {
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp
index 434d8e4fc11..9bed7cd8fea 100644
--- a/clang/test/CXX/class.access/p4.cpp
+++ b/clang/test/CXX/class.access/p4.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++0x [class.access]p4:
diff --git a/clang/test/CXX/class.access/p6.cpp b/clang/test/CXX/class.access/p6.cpp
index aaf510a6d11..d51d75d05d6 100644
--- a/clang/test/CXX/class.access/p6.cpp
+++ b/clang/test/CXX/class.access/p6.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++0x [class.access]p6:
// All access controls in [class.access] affect the ability to
diff --git a/clang/test/CXX/class/class.local/p2.cpp b/clang/test/CXX/class/class.local/p2.cpp
index 2b1359c3d8d..db4c90f564f 100644
--- a/clang/test/CXX/class/class.local/p2.cpp
+++ b/clang/test/CXX/class/class.local/p2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -faccess-control
+// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A { };
diff --git a/clang/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp b/clang/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp
index f5fbf7a08c2..c81e4ef1b1b 100644
--- a/clang/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp
+++ b/clang/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp
@@ -50,7 +50,7 @@ namespace test1 {
}
namespace test2 {
- class Unrelated {
+ struct Unrelated {
void foo();
};
diff --git a/clang/test/CXX/conv/conv.mem/p4.cpp b/clang/test/CXX/conv/conv.mem/p4.cpp
index 42f6343e069..e0748d89236 100644
--- a/clang/test/CXX/conv/conv.mem/p4.cpp
+++ b/clang/test/CXX/conv/conv.mem/p4.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
struct Base {
int data;
diff --git a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
index 89e9c897d22..3581f79b0ad 100644
--- a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
+++ b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// We have to avoid ADL for this test.
diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp
index 00234ac5fd1..9ab0b489a2c 100644
--- a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp
+++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
class C {
+public:
void f(int i = 3); // expected-note{{here}}
void g(int i, int j = 99);
};
diff --git a/clang/test/CXX/expr/expr.unary/expr.delete/p5.cpp b/clang/test/CXX/expr/expr.unary/expr.delete/p5.cpp
index 4b2b5ae7cbd..2fa30e59dca 100644
--- a/clang/test/CXX/expr/expr.unary/expr.delete/p5.cpp
+++ b/clang/test/CXX/expr/expr.unary/expr.delete/p5.cpp
@@ -11,7 +11,7 @@ class T0 { ~T0(); };
// The trivial case, inside a template instantiation.
template<typename T>
-class T1_A { T *x; ~T1_A() { delete x; } }; // expected-warning {{deleting pointer to incomplete type}}
+struct T1_A { T *x; ~T1_A() { delete x; } }; // expected-warning {{deleting pointer to incomplete type}}
class T1_B; // expected-note {{forward declaration}}
void f0() { T1_A<T1_B> x; } // expected-note {{in instantiation of member function}}
diff --git a/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
index cfa14f996bb..e344eedfd6f 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
@@ -1,13 +1,13 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-template<int I, int J, class T> class X {
+template<int I, int J, class T> struct X {
static const int value = 0;
};
-template<int I, int J> class X<I, J, int> {
+template<int I, int J> struct X<I, J, int> {
static const int value = 1;
};
-template<int I> class X<I, I, int> {
+template<int I> struct X<I, I, int> {
static const int value = 2;
};
diff --git a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp
index 597e06d292b..03e51321bb2 100644
--- a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -faccess-control -verify -emit-llvm-only %s
+// RUN: %clang_cc1 -verify -emit-llvm-only %s
namespace test0 {
template <typename T> struct Num {
diff --git a/clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp b/clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp
index d375beb10af..818407102cf 100644
--- a/clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp
+++ b/clang/test/CXX/temp/temp.spec/temp.inst/p11.cpp
@@ -5,7 +5,7 @@ namespace test0 {
template<typename T> unsigned f0() {
return T::MaxSize; // expected-error {{'int' cannot be used prior to '::'}}
};
- template<typename T> class A {
+ template<typename T> struct A {
void Allocate(unsigned Alignment
= f0<T>()) // expected-note {{in instantiation}}
{}
diff --git a/clang/test/CodeGenCXX/assign-operator.cpp b/clang/test/CodeGenCXX/assign-operator.cpp
index cb8867f2f6a..805fe8df698 100644
--- a/clang/test/CodeGenCXX/assign-operator.cpp
+++ b/clang/test/CodeGenCXX/assign-operator.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -emit-llvm-only -verify
class x {
-int operator=(int);
+public: int operator=(int);
};
void a() {
x a;
diff --git a/clang/test/CodeGenCXX/constructor-init-reference.cpp b/clang/test/CodeGenCXX/constructor-init-reference.cpp
index c2f41e1f0cb..5e751597651 100644
--- a/clang/test/CodeGenCXX/constructor-init-reference.cpp
+++ b/clang/test/CodeGenCXX/constructor-init-reference.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -emit-llvm -o - %s | grep "store i32\* @x, i32\*\*"
int x;
-class A {
+struct A {
int& y;
A() : y(x) {}
};
diff --git a/clang/test/CodeGenCXX/constructors.cpp b/clang/test/CodeGenCXX/constructors.cpp
index 2c95c91e111..e0709055cdb 100644
--- a/clang/test/CodeGenCXX/constructors.cpp
+++ b/clang/test/CodeGenCXX/constructors.cpp
@@ -12,7 +12,7 @@ struct ValueClass {
/* Test basic functionality. */
-class A {
+struct A {
A(struct Undeclared &);
A(ValueClass);
Member mem;
diff --git a/clang/test/CodeGenCXX/default-destructor-nested.cpp b/clang/test/CodeGenCXX/default-destructor-nested.cpp
index 86942743d4e..565a7279c56 100644
--- a/clang/test/CodeGenCXX/default-destructor-nested.cpp
+++ b/clang/test/CodeGenCXX/default-destructor-nested.cpp
@@ -2,7 +2,7 @@
// PR6294
class A {
- virtual ~A();
+public: virtual ~A();
};
class B {
class C;
diff --git a/clang/test/CodeGenCXX/instantiate-init-list.cpp b/clang/test/CodeGenCXX/instantiate-init-list.cpp
index 676d2994e7e..49c6f51c775 100644
--- a/clang/test/CodeGenCXX/instantiate-init-list.cpp
+++ b/clang/test/CodeGenCXX/instantiate-init-list.cpp
@@ -5,7 +5,7 @@ struct F {
};
void G();
template<class T> class A {
- A();
+public: A();
};
template<class T> A<T>::A() {
static F f = { G };
diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp
index ec9c08c0cca..ad57c199c42 100644
--- a/clang/test/CodeGenCXX/mangle.cpp
+++ b/clang/test/CodeGenCXX/mangle.cpp
@@ -450,7 +450,7 @@ namespace test7 {
// CHECK: define weak_odr void @_ZN5test81AILZNS_1B5valueEEE3incEv
namespace test8 {
template <int &counter> class A { void inc() { counter++; } };
- class B { static int value; };
+ class B { public: static int value; };
template class A<B::value>;
}
// CHECK: declare void @_ZN5test91fIiNS_3barEEEvRKNT0_3baz1XE
diff --git a/clang/test/CodeGenCXX/new-operator-phi.cpp b/clang/test/CodeGenCXX/new-operator-phi.cpp
index 38467ad31f9..49859acf4fa 100644
--- a/clang/test/CodeGenCXX/new-operator-phi.cpp
+++ b/clang/test/CodeGenCXX/new-operator-phi.cpp
@@ -2,7 +2,7 @@
// PR5454
#include <stddef.h>
-class X {static void * operator new(size_t size) throw(); X(int); };
+struct X {static void * operator new(size_t size) throw(); X(int); };
int a(), b();
void b(int x)
{
diff --git a/clang/test/CodeGenCXX/operator-new.cpp b/clang/test/CodeGenCXX/operator-new.cpp
index da64fc1b2d4..f718faebef0 100644
--- a/clang/test/CodeGenCXX/operator-new.cpp
+++ b/clang/test/CodeGenCXX/operator-new.cpp
@@ -6,6 +6,7 @@
class teste {
int A;
+public:
teste() : A(2) {}
};
diff --git a/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp b/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
index 921113a1484..41ae08470a3 100644
--- a/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
+++ b/clang/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
@@ -4,6 +4,7 @@ class A
{
union { void *d; };
+public:
A() : d(0) { }
};
diff --git a/clang/test/CodeGenCXX/template-instantiation.cpp b/clang/test/CodeGenCXX/template-instantiation.cpp
index 416c0a1a207..4a3857542d0 100644
--- a/clang/test/CodeGenCXX/template-instantiation.cpp
+++ b/clang/test/CodeGenCXX/template-instantiation.cpp
@@ -40,6 +40,7 @@ namespace test1 {
namespace test2 {
template<typename T1>
class C {
+ public:
virtual ~C();
void zedbar(double) {
}
diff --git a/clang/test/CodeGenCXX/virt-template-vtable.cpp b/clang/test/CodeGenCXX/virt-template-vtable.cpp
index 76a1240731b..b968f38c826 100644
--- a/clang/test/CodeGenCXX/virt-template-vtable.cpp
+++ b/clang/test/CodeGenCXX/virt-template-vtable.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
template<class T> class A {
+public:
A() {}
virtual void a() {}
};
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index efc9ba890c6..dc6789fa861 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/test/FixIt/typo.cpp
@@ -2,6 +2,7 @@
// RUN: %clang_cc1 -fsyntax-only -fixit -o - %s | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ -
namespace std {
template<typename T> class basic_string { // expected-note 2{{'basic_string' declared here}}
+ public:
int find(const char *substr); // expected-note{{'find' declared here}}
static const int npos = -1; // expected-note{{'npos' declared here}}
};
diff --git a/clang/test/SemaCXX/access-base-class.cpp b/clang/test/SemaCXX/access-base-class.cpp
index 25fd9e52aa2..85516902163 100644
--- a/clang/test/SemaCXX/access-base-class.cpp
+++ b/clang/test/SemaCXX/access-base-class.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace T1 {
class A { };
diff --git a/clang/test/SemaCXX/access-control-check.cpp b/clang/test/SemaCXX/access-control-check.cpp
index 1db6704909d..4540e99d8a3 100644
--- a/clang/test/SemaCXX/access-control-check.cpp
+++ b/clang/test/SemaCXX/access-control-check.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
class M {
int iM;
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp
index 49bcd99fb69..cb78a2e65f2 100644
--- a/clang/test/SemaCXX/conditional-expr.cpp
+++ b/clang/test/SemaCXX/conditional-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control -std=c++0x -Wsign-compare %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -Wsign-compare %s
// C++ rules for ?: are a lot stricter than C rules, and have to take into
// account more conversion options.
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index 96dfa8ba526..8b23e130094 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify %s
class A {
int m;
+public:
A() : A::m(17) { } // expected-error {{member initializer 'm' does not name a non-static data member or base class}}
A(int);
};
@@ -125,7 +126,7 @@ struct Q {
// A silly class used to demonstrate field-is-uninitialized in constructors with
// multiple params.
-class TwoInOne { TwoInOne(TwoInOne a, TwoInOne b) {} };
+class TwoInOne { public: TwoInOne(TwoInOne a, TwoInOne b) {} };
class InitializeUsingSelfTest {
bool A;
char* B;
diff --git a/clang/test/SemaCXX/cstyle-cast.cpp b/clang/test/SemaCXX/cstyle-cast.cpp
index 6a28f4c2c87..ccb25f00c24 100644
--- a/clang/test/SemaCXX/cstyle-cast.cpp
+++ b/clang/test/SemaCXX/cstyle-cast.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A {};
diff --git a/clang/test/SemaCXX/direct-initializer.cpp b/clang/test/SemaCXX/direct-initializer.cpp
index d30642b5c3e..54cd6cacc0d 100644
--- a/clang/test/SemaCXX/direct-initializer.cpp
+++ b/clang/test/SemaCXX/direct-initializer.cpp
@@ -10,7 +10,7 @@ void f() {
}
class Y {
- explicit Y(float);
+public: explicit Y(float);
};
class X { // expected-note{{candidate constructor (the implicit copy constructor)}}
diff --git a/clang/test/SemaCXX/functional-cast.cpp b/clang/test/SemaCXX/functional-cast.cpp
index 4e0486c79ac..3b088645a65 100644
--- a/clang/test/SemaCXX/functional-cast.cpp
+++ b/clang/test/SemaCXX/functional-cast.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// ------------ not interpreted as C-style cast ------------
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index cff04ab17a0..59a8e8c45dc 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -194,7 +194,7 @@ somens::a a3 = a2; // expected-error {{no viable conversion}}
// typedefs and using declarations.
namespace test1 {
namespace ns {
- class Counter { static int count; };
+ class Counter { public: static int count; };
typedef Counter counter;
}
using ns::counter;
diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp
index ae77e704f50..50aba47410a 100644
--- a/clang/test/SemaCXX/new-delete.cpp
+++ b/clang/test/SemaCXX/new-delete.cpp
@@ -182,6 +182,7 @@ void f(X8 *x8) {
}
class X9 {
+public:
static void operator delete(void*, int); // expected-note {{'operator delete' declared here}}
static void operator delete(void*, float); // expected-note {{'operator delete' declared here}}
};
@@ -216,6 +217,7 @@ static void* f(void* g)
}
class X14 {
+public:
static void operator delete(void*, const size_t);
};
diff --git a/clang/test/SemaCXX/overloaded-operator.cpp b/clang/test/SemaCXX/overloaded-operator.cpp
index 89f181469fd..82f000b805d 100644
--- a/clang/test/SemaCXX/overloaded-operator.cpp
+++ b/clang/test/SemaCXX/overloaded-operator.cpp
@@ -88,6 +88,7 @@ enum pr5244_bar
class pr5244_baz
{
+public:
pr5244_bar quux;
};
diff --git a/clang/test/SemaCXX/static-cast.cpp b/clang/test/SemaCXX/static-cast.cpp
index a5dd7e214dc..48f641aa997 100644
--- a/clang/test/SemaCXX/static-cast.cpp
+++ b/clang/test/SemaCXX/static-cast.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A {};
struct B : public A {}; // Single public base.
struct C1 : public virtual B {}; // Single virtual base.
diff --git a/clang/test/SemaCXX/virtual-override.cpp b/clang/test/SemaCXX/virtual-override.cpp
index 68871358265..e07531f6436 100644
--- a/clang/test/SemaCXX/virtual-override.cpp
+++ b/clang/test/SemaCXX/virtual-override.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s -std=c++0x
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
namespace T1 {
class A {
diff --git a/clang/test/SemaTemplate/dependent-names.cpp b/clang/test/SemaTemplate/dependent-names.cpp
index a2d3c56501e..77961069c5a 100644
--- a/clang/test/SemaTemplate/dependent-names.cpp
+++ b/clang/test/SemaTemplate/dependent-names.cpp
@@ -18,15 +18,18 @@ template<class T> class R : Q<T> {T current;};
namespace test0 {
template <class T> class Base {
+ public:
void instance_foo();
static void static_foo();
class Inner {
+ public:
void instance_foo();
static void static_foo();
};
};
template <class T> class Derived1 : Base<T> {
+ public:
void test0() {
Base<T>::static_foo();
Base<T>::instance_foo();
@@ -49,6 +52,7 @@ namespace test0 {
};
template <class T> class Derived2 : Base<T>::Inner {
+ public:
void test0() {
Base<T>::static_foo();
Base<T>::instance_foo(); // expected-error {{call to non-static member function without an object argument}}
diff --git a/clang/test/SemaTemplate/instantiate-local-class.cpp b/clang/test/SemaTemplate/instantiate-local-class.cpp
index 72ad90a04f2..d57ba8a6828 100644
--- a/clang/test/SemaTemplate/instantiate-local-class.cpp
+++ b/clang/test/SemaTemplate/instantiate-local-class.cpp
@@ -13,11 +13,11 @@ template void f0<int>();
// PR5764
namespace PR5764 {
- class X {
+ struct X {
template <typename T>
void Bar() {
typedef T ValueType;
- class Y {
+ struct Y {
Y() { V = ValueType(); }
ValueType V;
diff --git a/clang/test/SemaTemplate/instantiate-member-class.cpp b/clang/test/SemaTemplate/instantiate-member-class.cpp
index 938c57b75e9..f1bdf3e1e6d 100644
--- a/clang/test/SemaTemplate/instantiate-member-class.cpp
+++ b/clang/test/SemaTemplate/instantiate-member-class.cpp
@@ -40,9 +40,9 @@ X<void>::D::E e2; // expected-note{{in instantiation of member class 'X<void>::D
// Redeclarations.
namespace test1 {
template <typename T> struct Registry {
- class node;
+ struct node;
static node *Head;
- class node {
+ struct node {
node(int v) { Head = this; }
};
};
@@ -64,6 +64,7 @@ namespace test2 {
template <typename T> class B {
class Foo;
class Foo {
+ public:
typedef int X;
};
typename Foo::X x;
diff --git a/clang/test/SemaTemplate/instantiate-member-initializers.cpp b/clang/test/SemaTemplate/instantiate-member-initializers.cpp
index e0594347f26..ca94bef2265 100644
--- a/clang/test/SemaTemplate/instantiate-member-initializers.cpp
+++ b/clang/test/SemaTemplate/instantiate-member-initializers.cpp
@@ -21,6 +21,7 @@ B<int> b0; // expected-note {{in instantiation of member function 'B<int>::B' re
template <class T> struct AA { AA(int); };
template <class T> class BB : public AA<T> {
+public:
BB() : AA<T>(1) {}
};
BB<int> x;
diff --git a/clang/test/SemaTemplate/instantiate-using-decl.cpp b/clang/test/SemaTemplate/instantiate-using-decl.cpp
index a4394aa21f6..257904490da 100644
--- a/clang/test/SemaTemplate/instantiate-using-decl.cpp
+++ b/clang/test/SemaTemplate/instantiate-using-decl.cpp
@@ -38,7 +38,7 @@ namespace test1 {
using Base2::Visit;
};
- class Knot : JoinVisitor<Knot> {
+ class Knot : public JoinVisitor<Knot> {
};
void test() {
diff --git a/clang/test/SemaTemplate/qualified-id.cpp b/clang/test/SemaTemplate/qualified-id.cpp
index 2e3a826ce89..29eab89d84f 100644
--- a/clang/test/SemaTemplate/qualified-id.cpp
+++ b/clang/test/SemaTemplate/qualified-id.cpp
@@ -21,6 +21,7 @@ namespace test1 {
namespace test2 {
class Impl {
+ public:
int foo();
};
template <class T> class Magic : public Impl {
OpenPOWER on IntegriCloud