[cfe-commits] r100880 - in /cfe/trunk: lib/Driver/ lib/Frontend/ test/CXX/class.access/ test/CXX/class.access/class.access.base/ test/CXX/class.access/class.access.nest/ test/CXX/class.access/class.friend/ test/CXX/class.access/class.protected/ test/CXX/class/class.local/ test/CXX/class/class.mfct/class.mfct.non-static/ test/CXX/conv/conv.mem/ test/CXX/dcl.dcl/basic.namespace/namespace.udecl/ test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/ test/CXX/expr/expr.unary/expr.delete/ test/CXX/temp/temp.decls/temp.class.spec/t...

John McCall rjmccall at apple.com
Fri Apr 9 12:03:51 PDT 2010


Author: rjmccall
Date: Fri Apr  9 14:03:51 2010
New Revision: 100880

URL: http://llvm.org/viewvc/llvm-project?rev=100880&view=rev
Log:
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.


Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/test/CXX/class.access/class.access.base/p1.cpp
    cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp
    cfe/trunk/test/CXX/class.access/class.access.nest/p1.cpp
    cfe/trunk/test/CXX/class.access/class.friend/p1.cpp
    cfe/trunk/test/CXX/class.access/class.protected/p1.cpp
    cfe/trunk/test/CXX/class.access/p4.cpp
    cfe/trunk/test/CXX/class.access/p6.cpp
    cfe/trunk/test/CXX/class/class.local/p2.cpp
    cfe/trunk/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp
    cfe/trunk/test/CXX/conv/conv.mem/p4.cpp
    cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
    cfe/trunk/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp
    cfe/trunk/test/CXX/expr/expr.unary/expr.delete/p5.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p1.cpp
    cfe/trunk/test/CXX/temp/temp.spec/temp.inst/p11.cpp
    cfe/trunk/test/CodeGenCXX/assign-operator.cpp
    cfe/trunk/test/CodeGenCXX/constructor-init-reference.cpp
    cfe/trunk/test/CodeGenCXX/constructors.cpp
    cfe/trunk/test/CodeGenCXX/default-destructor-nested.cpp
    cfe/trunk/test/CodeGenCXX/instantiate-init-list.cpp
    cfe/trunk/test/CodeGenCXX/mangle.cpp
    cfe/trunk/test/CodeGenCXX/new-operator-phi.cpp
    cfe/trunk/test/CodeGenCXX/operator-new.cpp
    cfe/trunk/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
    cfe/trunk/test/CodeGenCXX/template-instantiation.cpp
    cfe/trunk/test/CodeGenCXX/virt-template-vtable.cpp
    cfe/trunk/test/FixIt/typo.cpp
    cfe/trunk/test/SemaCXX/access-base-class.cpp
    cfe/trunk/test/SemaCXX/access-control-check.cpp
    cfe/trunk/test/SemaCXX/conditional-expr.cpp
    cfe/trunk/test/SemaCXX/constructor-initializer.cpp
    cfe/trunk/test/SemaCXX/cstyle-cast.cpp
    cfe/trunk/test/SemaCXX/direct-initializer.cpp
    cfe/trunk/test/SemaCXX/functional-cast.cpp
    cfe/trunk/test/SemaCXX/nested-name-spec.cpp
    cfe/trunk/test/SemaCXX/new-delete.cpp
    cfe/trunk/test/SemaCXX/overloaded-operator.cpp
    cfe/trunk/test/SemaCXX/static-cast.cpp
    cfe/trunk/test/SemaCXX/virtual-override.cpp
    cfe/trunk/test/SemaTemplate/dependent-names.cpp
    cfe/trunk/test/SemaTemplate/instantiate-local-class.cpp
    cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp
    cfe/trunk/test/SemaTemplate/instantiate-member-initializers.cpp
    cfe/trunk/test/SemaTemplate/instantiate-using-decl.cpp
    cfe/trunk/test/SemaTemplate/qualified-id.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr  9 14:03:51 2010
@@ -1153,10 +1153,10 @@
   }
 
   // -fno-access-control is default (for now).
-  if (Args.hasFlag(options::OPT_faccess_control,
-                   options::OPT_fno_access_control,
-                   false))
-    CmdArgs.push_back("-faccess-control");
+  if (Args.hasFlag(options::OPT_fno_access_control,
+                   options::OPT_faccess_control,
+                   true))
+    CmdArgs.push_back("-fno-access-control");
 
   // -fexceptions=0 is default.
   if (needsExceptions(Args, InputType, getToolChain().getTriple()))

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Apr  9 14:03:51 2010
@@ -524,9 +524,8 @@
   }
   if (Opts.ObjCGCBitmapPrint)
     Res.push_back("-print-ivar-layout");
-  // FIXME: Don't forget to update when the default changes!
-  if (Opts.AccessControl)
-    Res.push_back("-faccess-control");
+  if (!Opts.AccessControl)
+    Res.push_back("-fno-access-control");
   if (!Opts.CharIsSigned)
     Res.push_back("-fno-signed-char");
   if (Opts.ShortWChar)
@@ -1188,7 +1187,7 @@
   Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding;
   Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
   Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
-  Opts.AccessControl = Args.hasArg(OPT_faccess_control);
+  Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
   Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
   Opts.MathErrno = Args.hasArg(OPT_fmath_errno);
   Opts.InstantiationDepth = getLastArgIntValue(Args, OPT_ftemplate_depth, 99,

Modified: cfe/trunk/test/CXX/class.access/class.access.base/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.access.base/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.access.base/p1.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.access.base/p1.cpp Fri Apr  9 14:03:51 2010
@@ -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

Modified: cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -faccess-control -verify %s
+// RUN: %clang_cc1 -verify %s
 
 namespace test0 {
   struct A {

Modified: cfe/trunk/test/CXX/class.access/class.access.nest/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.access.nest/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.access.nest/p1.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.access.nest/p1.cpp Fri Apr  9 14:03:51 2010
@@ -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 {

Modified: cfe/trunk/test/CXX/class.access/class.friend/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.friend/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.friend/p1.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.friend/p1.cpp Fri Apr  9 14:03:51 2010
@@ -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

Modified: cfe/trunk/test/CXX/class.access/class.protected/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.protected/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.protected/p1.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.protected/p1.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 namespace test0 {
   class A {

Modified: cfe/trunk/test/CXX/class.access/p4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/p4.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/p4.cpp (original)
+++ cfe/trunk/test/CXX/class.access/p4.cpp Fri Apr  9 14:03:51 2010
@@ -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:
 

Modified: cfe/trunk/test/CXX/class.access/p6.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/p6.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/p6.cpp (original)
+++ cfe/trunk/test/CXX/class.access/p6.cpp Fri Apr  9 14:03:51 2010
@@ -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

Modified: cfe/trunk/test/CXX/class/class.local/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.local/p2.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class/class.local/p2.cpp (original)
+++ cfe/trunk/test/CXX/class/class.local/p2.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -faccess-control
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 struct A { };
 

Modified: cfe/trunk/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp (original)
+++ cfe/trunk/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp Fri Apr  9 14:03:51 2010
@@ -50,7 +50,7 @@
 }
 
 namespace test2 {
-  class Unrelated {
+  struct Unrelated {
     void foo();
   };
 

Modified: cfe/trunk/test/CXX/conv/conv.mem/p4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/conv/conv.mem/p4.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/conv/conv.mem/p4.cpp (original)
+++ cfe/trunk/test/CXX/conv/conv.mem/p4.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 struct Base {
   int data;

Modified: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp (original)
+++ cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp Fri Apr  9 14:03:51 2010
@@ -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.
 

Modified: cfe/trunk/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp (original)
+++ cfe/trunk/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp Fri Apr  9 14:03:51 2010
@@ -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);
 };

Modified: cfe/trunk/test/CXX/expr/expr.unary/expr.delete/p5.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/expr/expr.unary/expr.delete/p5.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/expr/expr.unary/expr.delete/p5.cpp (original)
+++ cfe/trunk/test/CXX/expr/expr.unary/expr.delete/p5.cpp Fri Apr  9 14:03:51 2010
@@ -11,7 +11,7 @@
 
 // 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}}
 

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp Fri Apr  9 14:03:51 2010
@@ -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;
 };
 

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p1.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p1.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.friend/p1.cpp Fri Apr  9 14:03:51 2010
@@ -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 {

Modified: cfe/trunk/test/CXX/temp/temp.spec/temp.inst/p11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.spec/temp.inst/p11.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.spec/temp.inst/p11.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.spec/temp.inst/p11.cpp Fri Apr  9 14:03:51 2010
@@ -5,7 +5,7 @@
   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}}
     {}

Modified: cfe/trunk/test/CodeGenCXX/assign-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/assign-operator.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/assign-operator.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/assign-operator.cpp Fri Apr  9 14:03:51 2010
@@ -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;

Modified: cfe/trunk/test/CodeGenCXX/constructor-init-reference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/constructor-init-reference.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/constructor-init-reference.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/constructor-init-reference.cpp Fri Apr  9 14:03:51 2010
@@ -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) {}
 };

Modified: cfe/trunk/test/CodeGenCXX/constructors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/constructors.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/constructors.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/constructors.cpp Fri Apr  9 14:03:51 2010
@@ -12,7 +12,7 @@
 
 
 /* Test basic functionality. */
-class A {
+struct A {
   A(struct Undeclared &);
   A(ValueClass);
   Member mem;

Modified: cfe/trunk/test/CodeGenCXX/default-destructor-nested.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/default-destructor-nested.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/default-destructor-nested.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/default-destructor-nested.cpp Fri Apr  9 14:03:51 2010
@@ -2,7 +2,7 @@
 // PR6294
 
 class A {
-  virtual ~A();
+public: virtual ~A();
 };
 class B {
   class C;

Modified: cfe/trunk/test/CodeGenCXX/instantiate-init-list.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/instantiate-init-list.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/instantiate-init-list.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/instantiate-init-list.cpp Fri Apr  9 14:03:51 2010
@@ -5,7 +5,7 @@
 };
 void G();
 template<class T> class A {
-  A();
+public: A();
 };
 template<class T> A<T>::A() {
   static F f = { G };

Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle.cpp Fri Apr  9 14:03:51 2010
@@ -450,7 +450,7 @@
 // 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

Modified: cfe/trunk/test/CodeGenCXX/new-operator-phi.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/new-operator-phi.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/new-operator-phi.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/new-operator-phi.cpp Fri Apr  9 14:03:51 2010
@@ -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)
 {

Modified: cfe/trunk/test/CodeGenCXX/operator-new.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/operator-new.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/operator-new.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/operator-new.cpp Fri Apr  9 14:03:51 2010
@@ -6,6 +6,7 @@
 
 class teste {
   int A;
+public:
   teste() : A(2) {}
 };
 

Modified: cfe/trunk/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp Fri Apr  9 14:03:51 2010
@@ -4,6 +4,7 @@
 {
     union { void *d; };
 
+public:
     A() : d(0) { }
 };
 

Modified: cfe/trunk/test/CodeGenCXX/template-instantiation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/template-instantiation.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/template-instantiation.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/template-instantiation.cpp Fri Apr  9 14:03:51 2010
@@ -40,6 +40,7 @@
 namespace test2 {
   template<typename T1>
   class C {
+  public:
     virtual ~C();
     void zedbar(double) {
     }

Modified: cfe/trunk/test/CodeGenCXX/virt-template-vtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/virt-template-vtable.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/virt-template-vtable.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/virt-template-vtable.cpp Fri Apr  9 14:03:51 2010
@@ -1,6 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
 
 template<class T> class A {
+public:
   A() {}
   virtual void a() {}
 };

Modified: cfe/trunk/test/FixIt/typo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/typo.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/typo.cpp (original)
+++ cfe/trunk/test/FixIt/typo.cpp Fri Apr  9 14:03:51 2010
@@ -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}}
   };

Modified: cfe/trunk/test/SemaCXX/access-base-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/access-base-class.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/access-base-class.cpp (original)
+++ cfe/trunk/test/SemaCXX/access-base-class.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 namespace T1 {
   
 class A { };

Modified: cfe/trunk/test/SemaCXX/access-control-check.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/access-control-check.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/access-control-check.cpp (original)
+++ cfe/trunk/test/SemaCXX/access-control-check.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 class M {
   int iM;

Modified: cfe/trunk/test/SemaCXX/conditional-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/conditional-expr.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/conditional-expr.cpp (original)
+++ cfe/trunk/test/SemaCXX/conditional-expr.cpp Fri Apr  9 14:03:51 2010
@@ -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.

Modified: cfe/trunk/test/SemaCXX/constructor-initializer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/constructor-initializer.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/constructor-initializer.cpp (original)
+++ cfe/trunk/test/SemaCXX/constructor-initializer.cpp Fri Apr  9 14:03:51 2010
@@ -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 @@
 
 // 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;

Modified: cfe/trunk/test/SemaCXX/cstyle-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cstyle-cast.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cstyle-cast.cpp (original)
+++ cfe/trunk/test/SemaCXX/cstyle-cast.cpp Fri Apr  9 14:03:51 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 
 struct A {};
 

Modified: cfe/trunk/test/SemaCXX/direct-initializer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/direct-initializer.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/direct-initializer.cpp (original)
+++ cfe/trunk/test/SemaCXX/direct-initializer.cpp Fri Apr  9 14:03:51 2010
@@ -10,7 +10,7 @@
 }
 
 class Y { 
-  explicit Y(float);
+public: explicit Y(float);
 };
 
 class X { // expected-note{{candidate constructor (the implicit copy constructor)}}

Modified: cfe/trunk/test/SemaCXX/functional-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/functional-cast.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/functional-cast.cpp (original)
+++ cfe/trunk/test/SemaCXX/functional-cast.cpp Fri Apr  9 14:03:51 2010
@@ -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 ------------
 

Modified: cfe/trunk/test/SemaCXX/nested-name-spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/nested-name-spec.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/nested-name-spec.cpp (original)
+++ cfe/trunk/test/SemaCXX/nested-name-spec.cpp Fri Apr  9 14:03:51 2010
@@ -194,7 +194,7 @@
 // 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;

Modified: cfe/trunk/test/SemaCXX/new-delete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/new-delete.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/new-delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/new-delete.cpp Fri Apr  9 14:03:51 2010
@@ -182,6 +182,7 @@
 }
 
 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 @@
 }
 
 class X14 {
+public:
   static void operator delete(void*, const size_t);
 };
 

Modified: cfe/trunk/test/SemaCXX/overloaded-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overloaded-operator.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/overloaded-operator.cpp (original)
+++ cfe/trunk/test/SemaCXX/overloaded-operator.cpp Fri Apr  9 14:03:51 2010
@@ -88,6 +88,7 @@
 
 class pr5244_baz
 {
+public:
     pr5244_bar quux;
 };
 

Modified: cfe/trunk/test/SemaCXX/static-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/static-cast.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/static-cast.cpp (original)
+++ cfe/trunk/test/SemaCXX/static-cast.cpp Fri Apr  9 14:03:51 2010
@@ -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.

Modified: cfe/trunk/test/SemaCXX/virtual-override.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/virtual-override.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/virtual-override.cpp (original)
+++ cfe/trunk/test/SemaCXX/virtual-override.cpp Fri Apr  9 14:03:51 2010
@@ -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 {

Modified: cfe/trunk/test/SemaTemplate/dependent-names.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/dependent-names.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/dependent-names.cpp (original)
+++ cfe/trunk/test/SemaTemplate/dependent-names.cpp Fri Apr  9 14:03:51 2010
@@ -18,15 +18,18 @@
 
 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 @@
   };
 
   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}}

Modified: cfe/trunk/test/SemaTemplate/instantiate-local-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-local-class.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-local-class.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-local-class.cpp Fri Apr  9 14:03:51 2010
@@ -13,11 +13,11 @@
 
 // PR5764
 namespace PR5764 {
-  class X {
+  struct X {
     template <typename T>
     void Bar() {
       typedef T ValueType;
-      class Y {
+      struct Y {
         Y() { V = ValueType(); }
 
         ValueType V;

Modified: cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp Fri Apr  9 14:03:51 2010
@@ -40,9 +40,9 @@
 // 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 @@
   template <typename T> class B {
     class Foo;
     class Foo {
+    public:
       typedef int X;
     };
     typename Foo::X x;

Modified: cfe/trunk/test/SemaTemplate/instantiate-member-initializers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-member-initializers.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-member-initializers.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-member-initializers.cpp Fri Apr  9 14:03:51 2010
@@ -21,6 +21,7 @@
 
 template <class T> struct AA { AA(int); };
 template <class T> class BB : public AA<T> {
+public:
   BB() : AA<T>(1) {}
 };
 BB<int> x;

Modified: cfe/trunk/test/SemaTemplate/instantiate-using-decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-using-decl.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-using-decl.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-using-decl.cpp Fri Apr  9 14:03:51 2010
@@ -38,7 +38,7 @@
     using Base2::Visit;
   };
 
-  class Knot : JoinVisitor<Knot> {
+  class Knot : public JoinVisitor<Knot> {
   };
 
   void test() {

Modified: cfe/trunk/test/SemaTemplate/qualified-id.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/qualified-id.cpp?rev=100880&r1=100879&r2=100880&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/qualified-id.cpp (original)
+++ cfe/trunk/test/SemaTemplate/qualified-id.cpp Fri Apr  9 14:03:51 2010
@@ -21,6 +21,7 @@
 
 namespace test2 {
   class Impl {
+  public:
     int foo();
   };
   template <class T> class Magic : public Impl {





More information about the cfe-commits mailing list