• Home
  • History
  • Annotate
  • only in /external/clang/test/CXX/class.access/
History log of /external/clang/test/CXX/class.access/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
lass.access.base/p1.cpp
4.cpp
6.cpp
ce6426feda94ca716ee7743b71961850740eb08d 08-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> Issue a diagnostic if we see a templated friend declaration that we do not
support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194273 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p3-cxx0x.cpp
b5c7768a74936d4e2c7a484570a638cb74702d8b 19-Oct-2013 Kaelyn Uhrain <rikka@google.com> Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.

Now that CorrectTypo knows how to correctly search classes for typo
correction candidates, there is no good reason to only replace an
existing CXXScopeSpecifier if it refers to a namespace. While the actual
enablement was a matter of changing a single comparison, the fallout
from enabling the functionality required a lot more code changes
(including my two previous commits).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193020 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
6.cpp
4e9686b1f9947f1747b4f4316deb2087a7f56282 09-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement [class.friend]p11's special name lookup rules for friend declarations
of local classes. We were previously handling this by performing qualified
lookup within a function declaration(!!); replace it with the proper scope
lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188050 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p11.cpp
aa4bc18240c03b5ed7952aa5e013c081f8733ed3 30-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r185229, reverted in r185256, with a tweak: further ignore the
standard's rule that an extern "C" declaration conflicts with any entity in the
global scope with the same name. Now we only care if the global scope entity is
a variable declaration (and so might have the same mangled name as the extern
"C" declaration). This has been reported as a standard defect.

Original commit message:

PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185281 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
6e428a446ed7cc170346430afa7be54e83b2d28c 29-Jun-2013 Timur Iskhodzhanov <timurrrr@google.com> Revert r185229 as it breaks compilation of <windows.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185256 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
5eab8d733ce7867fda4e6d5f5afa6dfe8a105c79 29-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185229 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
8ff7e32f9480bf00d8d8476c650907853d1cc354 21-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Add a couple more tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184501 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p6.cpp
6698be8a6930730df5e61c941197e72682196187 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix some confusing diagnostic wording. s/implicit default/implicit/ if we're
not actually talking about a default constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183885 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
714b509bb4f8be76e6616944551efe7a6e8358cd 27-Feb-2013 John McCall <rjmccall@apple.com> Don't crash when diagnosing path-constrained protected
access to a private member to which we have special access.

rdar://12926092

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176146 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p5.cpp
637619b915888ead5576d19508644e4eb9024078 22-Feb-2013 John McCall <rjmccall@apple.com> Only suppress instance context if a member is actually
accessible in its declaring class; otherwise we might
fail to apply [class.protected] when considering
accessibility in derived classes.

Noticed by inspection; <rdar://13270329>.

I had an existing test wrong. Here's why it's wrong:

Follow the rules (and notation) of [class.access]p5.
The naming class (N) is B and the context (R) is D::getX.
- 'x' as a member of B is protected, but R does not occur
in a member or friend of a class derived from B.
- There does exist a base class of B, A, which is accessible
from R, and 'x' is accessible at R when named in A because
'x' as a member of A is protected and R occurs in a member
of a class, D, that is derived from A; however, by
[class.protected], the class of the object expression must
be equal to or derived from that class, and A does not
derive from D.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175858 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
ce6a10eaadd152f05103dfffe22ac20ef2c04615 06-Feb-2013 Nick Lewycky <nicholas@mxc.ca> Don't check whether a friend declaration is correctly formed when instantiating,
we already checked it when parsing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174486 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p3-cxx0x.cpp
8e8fb3be5bd78f0564444eca02b404566a5f3b5d 19-Oct-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1-cxx11.cpp
d6f80daa84164ceeb8900da07f43b6a150edf713 20-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> Per C++11 [class.friend]p3, the 'friend' keyword must appear first in a
non-function friend declaration. Patch by Josh Magee!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164273 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p3-cxx0x.cpp
8bddeb57d134c0e5f14e319271aa9015886a8ac7 25-Aug-2012 John McCall <rjmccall@apple.com> When computing the effective context for access control,
make sure we walk up the DC chain for the current context,
rather than allowing ourselves to get switched over to the
canonical DC chain. Fixes PR13642.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162616 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
lass.protected/p1.cpp
40b2e19cae6ab85407856c70f76278f9efbeeb7c 23-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> When disambiguating an expression-statement from a declaraton-statement, if the
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162464 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
1f2e1a96bec2ba6418ae7f2d2b525a3575203b6a 10-Aug-2012 John McCall <rjmccall@apple.com> Check access to friend declarations. There's a number of different
things going on here that were problematic:
- We were missing the actual access check, or rather, it was suppressed
on account of being a redeclaration lookup.
- The access check would naturally happen during delay, which isn't
appropriate in this case.
- We weren't actually emitting dependent diagnostics associated with
class templates, which was unfortunate.
- Access was being propagated incorrectly for friend method declarations
that couldn't be matched at parse-time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161652 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
lass.friend/p9-cxx0x.cpp
63f557804b76bf765aea58e5a46503e47e21f7c1 09-Apr-2012 John McCall <rjmccall@apple.com> My original patch missed the virtual-base case for destroying
base-class subojects.

Incidentally, thinking about virtual bases makes it clear to me that
we're not appropriately computing the access to the virtual base's
member because we're not computing the best possible access to the
virtual base at all; in fact, we're basically assuming it's public.
I'll file a separate PR about that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154346 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
12d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6 09-Apr-2012 John McCall <rjmccall@apple.com> Fix the access check performed as part of the determination of whether
to define a special member function as deleted so that it properly
establishes an object context for the accesses to the base subobject
members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154343 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1-cxx11.cpp
b9abd87283ac6e929b7e12a577663bc99e61d020 07-Apr-2012 John McCall <rjmccall@apple.com> Fix several problems with protected access control:
- The [class.protected] restriction is non-trivial for any instance
member, even if the access lacks an object (for example, if it's
a pointer-to-member constant). In this case, it is equivalent to
requiring the naming class to equal the context class.
- The [class.protected] restriction applies to accesses to constructors
and destructors. A protected constructor or destructor can only be
used to create or destroy a base subobject, as a direct result.
- Several places were dropping or misapplying object information.

The standard could really be much clearer about what the object type is
supposed to be in some of these accesses. Usually it's easy enough to
find a reasonable answer, but still, the standard makes a very confident
statement about accesses to instance members only being possible in
either pointer-to-member literals or member access expressions, which
just completely ignores concepts like constructor and destructor
calls, using declarations, unevaluated field references, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154248 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
4.cpp
42aceadbc3806868cee8ac576347d258ac99e1f6 18-Mar-2012 Douglas Gregor <dgregor@apple.com> Diagnose tag and class template declarations with qualified
declarator-ids that occur at class scope. Fixes PR8019.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153002 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc 15-Dec-2011 Richard Trieu <rtrieu@google.com> Modify how the -verify flag works. Currently, the verification string and
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:

// expect-error{{candidate function has different number of parameters}}

will match the following error messages from Clang:

candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters

It will also match these other error messages:

candidate function
function has different number of parameters
number of parameters

This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:

87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p3-cxx0x.cpp
b3df1386680b3830d2f4d300d4d7eaba134135fc 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Switch diagnostic text from "C++0x" over to "C++11".

We'd also like for "C++11" or "c++11" to be used for the warning
groups, but without removing the old warning flags. Patches welcome;
I've run out of time to work on this today.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141801 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p2-cxx03.cpp
883af83bd6f9b0b60b8c7a78b8682eb8ab40a4a8 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement the restrictions in C++ [class.friend]p6, which disallow
defining a friend function with a qualified name or in a local
class. Fixes PR9853.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141524 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p6.cpp
ac57f0b9097e04f70a631549383a2944f74ad844 10-Oct-2011 Douglas Gregor <dgregor@apple.com> The effective context of a friend function is its lexical
context. Fixes PR9103.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141520 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
lass.protected/p1.cpp
ca82a82082edc982a1fb5fcfef2dd2c8cf9bc824 21-Sep-2011 John McCall <rjmccall@apple.com> Enforce access control for conversion operators used in contextual
conversions (rather than just call-arguments).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140244 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
82713174914bdb927a254c5ee188e35fd79c4948 26-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Update our diagnostics to properly account for move operations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132096 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
1e55e91a257c4ddd4364656b048a3c345c366804 20-May-2011 Matt Beaumont-Gay <matthewbg@google.com> Undo enough of r131143 to make private copy ctor diags say "copy constructor" again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131706 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
44054452c416a622b8f19a6d157a0affc05b9aa8 10-May-2011 Douglas Gregor <dgregor@apple.com> Tweak the diagnostics for the C++0x extensions to friend types to note
that they are C++0x extensions, and put them in the appropriate
group. We already support most of the semantics. Addresses
<rdar://problem/9407525>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131153 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p2-cxx03.cpp
f961ea5716867b5e426fb2136edd6d1f04c3a7ca 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Re-do R131114 without breaking code.

I've edited one diagnostic which would print "copy constructor" for copy
constructors and "constructor" for any other constructor. If anyone is
extremely enamored with this, it can be reinstated with a simple boolean
flag rather than calling getSpecialMember, which is inappropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131143 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
abea951c34876a5374d0e3678c7989b225c5c895 28-Feb-2011 Anders Carlsson <andersca@mac.com> Add -fcxx-exceptions to all tests that use C++ exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126599 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
e41721e7dfabcc15cb50be9075a4153f1ad648ea 19-Feb-2011 Anders Carlsson <andersca@mac.com> Pass -fexceptions to all tests that use try/catch/throw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126037 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
4bfd680597862e437fcba739dce58531d0b15d6e 15-Feb-2011 John McCall <rjmccall@apple.com> Handle delayed access in local declarations. PR9229.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125609 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
b25b295fdfc443bdf060e860a21f6f01d9fbdc18 15-Feb-2011 John McCall <rjmccall@apple.com> Return a declaration to the parser when creating a field in C++ so that
the parser will complete the declarator with a valid decl and thus trigger
delayed diagnostics for it. It certainly looks like we were intentionally
returning null here, but I couldn't find any good reason for it, and there
wasn't a comment, so farewell to all that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125556 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
417d39f300da40067600863c2733fdeb513fb4d2 15-Feb-2011 John McCall <rjmccall@apple.com> Don't crash on hierarchy static_casts which appear in variable initializers.
PR9221.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125532 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
f5ba7e089daadcd60b0f6e31d932be8bb6045281 14-Feb-2011 John McCall <rjmccall@apple.com> Change the context correctly when instantiating a static data member definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125517 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 14-Feb-2011 John McCall <rjmccall@apple.com> When parsing an out-of-line member function declaration, we must delay
access-control diagnostics which arise from the portion of the declarator
following the scope specifier, just in case access is granted by
friending the individual method. This can also happen with in-line
member function declarations of class templates due to templated-scope
friend declarations.

We were really playing fast-and-loose before with this sort of thing,
and it turned out to work because *most* friend functions are in file
scope. Making us delay regardless of context exposed several bugs with
how we were manipulating delay. I ended up needing a concept of a
context that's independent of the declarations in which it appears,
and then I actually had to make some things save contexts correctly,
but delay should be much cleaner now.

I also encapsulated all the delayed-diagnostics machinery in a single
subobject of Sema; this is a pattern we might want to consider rolling
out to other components of Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
83eecbefa4931b95231c9f2a61fb7b9b15e00eec 20-Jan-2011 Douglas Gregor <dgregor@apple.com> When building a user-defined conversion sequence, keep track of the
declaration that name lookup actually found, so that we can use it for
access checking later on. Fixes <rdar://problem/8876150>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123867 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
aa56a66abb61e9f42b48ae88e43328aba10c9148 20-Oct-2010 John McCall <rjmccall@apple.com> Access control polish: drop the note on the original declaration and
say 'implicitly' when it was implicit. Resolves PR 7930 and my peace of mind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116916 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
4.cpp
29ae6e5fb001deddd831e66faf143ecd9e50f67c 13-Oct-2010 John McCall <rjmccall@apple.com> Support friend function declarations in local classes correctly.
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something. I'm still not certain how
this is useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p11.cpp
98efb9f6df133f5508d260c4510c6c3bd70f34ad 12-Oct-2010 Eli Friedman <eli.friedman@gmail.com> PR8325: don't do destructor checking when a pointer is thrown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116336 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
fe24e05a87e48fa3318b65d1a92c542107639fd9 03-Sep-2010 John McCall <rjmccall@apple.com> Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
restrictions. The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.

There are corner cases where this can be wrong, but I'm not concerned.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
4.cpp
326c8c7d6e6996c82a1da55c1c3cd6cb4b89a584 28-Aug-2010 John McCall <rjmccall@apple.com> That's not the right direction to compute notional accessibility in at all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112360 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
8c77bcb072e7fd089f39fd7e079b6d767bf583fa 28-Aug-2010 John McCall <rjmccall@apple.com> When checking access control for an instance member access on
an object of type I, if the current access target is protected
when named in a class N, consider the friends of the classes P
where I <= P <= N and where a notional member of N would be
non-forbidden in P.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112358 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
8ba6691248004e1a726ba5f29d717950f8054507 13-Aug-2010 John McCall <rjmccall@apple.com> Work around a crash when checking access to injected class names
qua templates. The current fix suppresses the access check entirely
in this case; to do better, we'd need to be able to say that a
particular lookup result came from a particular injected class name,
which is not easy to do with the current representation of LookupResult.
This is on my known-problems list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111009 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
b8592063413d277f6583715c9a890bd58440c1d1 13-Aug-2010 John McCall <rjmccall@apple.com> Perform access control when template lookup finds a class template.
This is *really* hacky.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
c9068d7dd94d439cec66c421115d15303e481025 16-Jul-2010 John McCall <rjmccall@apple.com> Treat template parameters as part of the declaration-specifiers for the
purpose of access control. Fixes PR7644.

I can't actually find anything directly justifying this, but it seems obvious.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
63ef464c3fad1e8b9f9360baa6c81f974b712e90 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
0b495cdb1939f8b9e8a470e138dba5204872c38c 25-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.

Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106840 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.dcl/p1.cpp
5ed9b93c596c3926b6680b47de28c8ff6a8ff4b7 03-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make sure to check the accessibility of and mark the destructor for the
operand of a throw expression. Fixes PR7281.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105408 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
76ef658c703faf72c00f324fb9edc03169718e3e 28-May-2010 Douglas Gregor <dgregor@apple.com> When we complain about a member being inaccessible due to a constraint
along an access path, add another note pointing at the member we
actually found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104937 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p1.cpp
lass.access.base/p5.cpp
lass.friend/p1.cpp
lass.protected/p1.cpp
4.cpp
9da9cdfd5ac5fcbb8c6a9fc38938e845e53af1ed 28-May-2010 John McCall <rjmccall@apple.com> When filtering out previous declarations of friend functions, consider the
lookup context, not the direct semantic context. Fixes PR7230.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104917 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
238058c372cfb7bdaf489f51171eb1380ebfd6a6 18-May-2010 Douglas Gregor <dgregor@apple.com> I hate this commit.

Revert much of the implementation of C++98/03 [temp.friend]p5 in
r103943 and its follow-ons r103948 and r103952. While our
implementation was technically correct, other compilers don't seem to
implement this paragraph (which forces the instantiation of friend
functions defined in a class template when a class template
specialization is instantiated), and doing so broke a bunch of Boost
libraries.

Since this behavior has changed in C++0x (which instantiates the
friend function definitions when they are used), we're going to skip
the nowhere-implemented C++98/03 semantics and go straight to the
C++0x semantics.

This commit is a band-aid to get Boost up and running again. It
doesn't really fix PR6952 (which this commit un-fixes), but it does
deal with the way Boost.Units abuses this particular paragraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104014 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
ac7c2c8a9d47df7d652364af3043c41816a18fa4 17-May-2010 Douglas Gregor <dgregor@apple.com> C++98/03 [temp.friend]p4 requires that inline function definitions
within class templates be instantiated along with each class template
specialization, even if the functions are not used. Do so, as a baby
step toward PR6952.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103943 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
c63d2c8469d6b96712b324f76b4af07e1852313f 12-May-2010 Douglas Gregor <dgregor@apple.com> When we emit an error during the implicit definition of a special
member function (default constructor, copy constructor, copy
assignment operator, destructor), emit a note showing where that
implicit definition was required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103619 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
380c2139959d8608782292984b457640a143a70d 11-May-2010 Daniel Dunbar <daniel@zuster.org> Speculatively revert r103497, "Do not mark the virtual members of an
implicitly-instantiated class as ...", which seems to have broken bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103515 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
bbbe074566a8defed299ff676bc65b3631861768 11-May-2010 Douglas Gregor <dgregor@apple.com> Do not mark the virtual members of an implicitly-instantiated class as
referenced unless we see one of them defined (or the key function
defined, if it as one) or if we need the vtable for something. Fixes
PR7114.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
01ebd9d1883e82c4188325900a4eb9c1e16353bb 04-May-2010 John McCall <rjmccall@apple.com> An access is permitted if the current template instantiates to the appropriate
class. Add some conservative support for the idea. Fixes PR 7024.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102999 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
06a9f3680d22529a2fcf20c52d71cf221d99d910 01-May-2010 Douglas Gregor <dgregor@apple.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
7576a65d25f3d604cec57e357b17ead8b3bbfa16 29-Apr-2010 John McCall <rjmccall@apple.com> Test case for r102578.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102580 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
f5813826802c2e76cdc13cae834ebfd4518d74a6 29-Apr-2010 John McCall <rjmccall@apple.com> Properly switch into the declaring scope of a template when performing
template argument deduction or (more importantly) the final substitution
required by such deduction. Makes access control magically work in these
cases.

Fixes PR6967.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102572 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
4154e0b1a5d03cbe4836e381c7d6187b7a0a200c 25-Apr-2010 Douglas Gregor <dgregor@apple.com> When we create a temporary of class type that we don't immediately
bind, check accessibility of the destructor and mark the declaration
as referenced. Fixes a bunch of Boost.Regex failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102287 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
0d6b1640eb4d1a4a0203235cfdfcdaf3335af36d 23-Apr-2010 John McCall <rjmccall@apple.com> Recommit my change to how C++ does elaborated type lookups, now with
two bugfixes which fix selfhost and (hopefully) the nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
00b40d3f2fb8b2f9043daf3dd4558bff98346b3c 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
d04efc98d08731e31bd73f430803acc5ffa9040a 23-Apr-2010 John McCall <rjmccall@apple.com> C++ doesn't really use "namespaces" for different kinds of names the same
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.

Fixes PR 6885 as well some spectrum of unfiled bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
711f34adb886cce8ba86c7b1b6513a1eaaf63bb5 21-Apr-2010 Anders Carlsson <andersca@mac.com> Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
9a68a67c6ae4982001815cc04f69b8781058263a 21-Apr-2010 Anders Carlsson <andersca@mac.com> Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
630eb01b2568d0958118eb1a0ded02bebecb2b0f 18-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Fix the access checking of function and function template argument types,
return types, and default arguments. This fixes PR6855 along with several
similar cases where we rejected valid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101706 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
77e8b11524187f81548450e9e2ad9dd0e7200909 13-Apr-2010 John McCall <rjmccall@apple.com> Support befriending members of class template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101173 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
3d04336baf091b16e9d8f85b48b82dafd2695874 13-Apr-2010 John McCall <rjmccall@apple.com> Allow classes to befriend implicitly-declared members. Fixes PR6207 for
members of non-templated classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101122 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
9ea6397bf4ff53768ef4bdc0945965103a22e98c 13-Apr-2010 John McCall <rjmccall@apple.com> Don't try to find a scope corresponding to the search DC for an unfound
friend declaration; this used to be important but is now just a waste of time
plus an unreasonable assertion. Fixes PR6174.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101112 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
7002f4c03c2d0544f4e8bea8d3a5636519081e35 09-Apr-2010 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p1.cpp
lass.access.base/p5.cpp
lass.access.nest/p1.cpp
lass.friend/p1.cpp
lass.protected/p1.cpp
4.cpp
6.cpp
06245bfb3ae40bb24a8bfb17eafeb266a4daf5ca 07-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve handling of friend types in several ways:
- When instantiating a friend type template, perform semantic
analysis on the resulting type.
- Downgrade the errors concerning friend type declarations that do
not refer to classes to ExtWarns in C++98/03. C++0x allows
practically any type to be befriended, and ignores the friend
declaration if the type is not a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p2-cxx03.cpp
lass.friend/p3-cxx0x.cpp
c91cc66e92b084acd1fdbaa1c3c74242741b3d46 07-Apr-2010 John McCall <rjmccall@apple.com> Check access for the implicit calls to destructors that occur when we
have a temporary object in C++.

Also fix a tag mismatch that Doug noticed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100593 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
161755a09898c95d21bfff33707da9ca41cd53c5 06-Apr-2010 John McCall <rjmccall@apple.com> Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
lass.protected/p1.cpp
7bbe5f6bfc2e9c79c7c692a1cf03de56662aa14b 02-Apr-2010 John McCall <rjmccall@apple.com> Check in a motivating test for the revised access semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100159 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p5.cpp
db73c684ba61fed4087af488e8610657ec638c17 02-Apr-2010 John McCall <rjmccall@apple.com> Correct the calculation of access to more closely model the wording in
the standard.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100155 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p5.cpp
6bb8017bb9e828d118e15e59d71c66bba323c364 30-Mar-2010 John McCall <rjmccall@apple.com> Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation. This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
2cc2675d426af23476a9722c08c1b6c5266bd653 27-Mar-2010 John McCall <rjmccall@apple.com> Accumulate all functions and classes that the effective context is
nested within, and suddenly local classes start working. Wouldn't be
necessary if I hadn't used local classes in Clang in the first place.
Or, well, wouldn't be necessary yet. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99709 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
7c3745af0a171bd62605177e53fc0fce3ff6ab25 26-Mar-2010 Gabor Greif <ggreif@gmail.com> add a slight variation of test3, where
argument list seems to be different, but in fact
is semantically equivalent; check that we do not error here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99617 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
9c127392efe91dadacbe28ca16b8a9a5fa7990b3 26-Mar-2010 Douglas Gregor <dgregor@apple.com> Do not mark the destructor of a function parameter's type. Fixes PR6709.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99615 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
d325daa506338ab86f9dd468b48fd010673f49a6 26-Mar-2010 John McCall <rjmccall@apple.com> Reapply r99596 with a fix: link an instantiated friend function to its
pattern if it has a body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
90f97892eb8b2ecfcf633c9df01e2504686d4d96 25-Mar-2010 John McCall <rjmccall@apple.com> When finishing a function definition, leave the function definition *after*
doing all the cleanup tasks and checks. This gives us the proper context for
checking access to base and member destructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99559 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
e06c1a13172bd6ef38fe927d72198ab3f97c0b4a 25-Mar-2010 John McCall <rjmccall@apple.com> Fix a very minor oversight in privileges-elevation: we were only considering
friendship for a derived class if the base class specifier was non-public,
and thus not considering friendship for non-public members of public bases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99554 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
c1b621daf98d83075a466c6f4ad9904dc845dd09 24-Mar-2010 John McCall <rjmccall@apple.com> Walk out of enums when determining effective context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99391 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
7aceaf8cee77c98478e8934dc283910292711a7e 19-Mar-2010 John McCall <rjmccall@apple.com> When elevating access along an inheritance path, initialize the computed
access to the (elevated) access of the accessed declaration, if applicable,
rather than plunking that access onto the end after we've calculated the
inheritance access.

Also, being a friend of a derived class gives you public access to its
members (subject to later modification by further inheritance); it does
not simply ignore a single location of restricted inheritance.

Also, when computing the best unprivileged path to a subobject, preserve
the information that the worst path might be AS_none (forbidden) rather
than a minimum of AS_private.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98899 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
4.cpp
90c8c57bcd84083df85f76aac2aa62acb85eb077 18-Mar-2010 John McCall <rjmccall@apple.com> from code inspection, we were treating placement news with one argument as
non-placement news when selecting the corresponding operator delete; this is
fixed.
Access and ambiguity control for calls to operator new and delete. Also AFAICT



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98818 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
10f2873c0df7f662bfdb9a3e8bc834b68c1ead48 18-Mar-2010 John McCall <rjmccall@apple.com> Redeclaration lookups for parameter names should be flagged as redeclaration lookups
so they don't trigger diagnostics like (say) access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98806 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
88b6c71e3f0e68d094efcf880910caf424b46cbf 17-Mar-2010 John McCall <rjmccall@apple.com> Grant nested classes the access privileges of their enclosing classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98710 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.nest/p1.cpp
ef027fe748894522653558d9475a220482395094 16-Mar-2010 John McCall <rjmccall@apple.com> Perform access control for the implicit calls to base and member destructors
that occur in constructors (on the unwind path).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98681 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
b020748a9954c995f2e616f50bb9ed4fe2df1f72 16-Mar-2010 John McCall <rjmccall@apple.com> Access control for implicit calls to copy assignment operators and copy
constructors from implicitly-defined members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98614 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
6c790eac94101407acfd2c664400924cab45c0b1 16-Mar-2010 John McCall <rjmccall@apple.com> Perform access control even for the implicit destructor calls from implicit
destructor definitions. Remove some code duplication.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98611 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
58e6f34e4d2c668562e1c391162ee9de7b05fbb2 16-Mar-2010 John McCall <rjmccall@apple.com> Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98609 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
b05b5f35f114505182b076aa70002843c0669beb 15-Mar-2010 John McCall <rjmccall@apple.com> Remember access paths for visible conversion decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98539 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
ceef4ce492c6725180438da69e6621fa0833f523 12-Mar-2010 John McCall <rjmccall@apple.com> Add an extra test to this test-case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98322 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
d60e22e601852ae1345f01514318a0951dc09f89 12-Mar-2010 John McCall <rjmccall@apple.com> Implement basic support for friend types and functions in non-dependent
contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
7c2342dd4c9947806842e5aca3d2bb2e542853c9 10-Mar-2010 John McCall <rjmccall@apple.com> When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
7bf3600f56342dc434dad994d0c71068e5d3b5c7 01-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Fix the lookup of names used in a friend declaration to not attempt to
re-declare them. This fixes PR6317. Also add the beginnings of an interesting
test case for p1 of [class.friend] which also covers PR6317.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97499 91177308-0d34-0410-b5e6-96231b3b80d8
lass.friend/p1.cpp
6b2accb4793e16b2e93a8c2589f5df702231f17a 10-Feb-2010 John McCall <rjmccall@apple.com> Improve access control diagnostics. Perform access control on member-pointer
conversions. Fix an access-control bug where privileges were not considered
at intermediate points along the inheritance path. Prepare for friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p1.cpp
4.cpp
6.cpp
4f9506a27cb6b865bf38beea48eadfa9dc93f510 02-Feb-2010 John McCall <rjmccall@apple.com> Access control for implicit destructor calls. Diagnostic could be orders of
magnitude clearer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95078 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
b13b737a2450167c82e148590e8019b839ce6b98 01-Feb-2010 John McCall <rjmccall@apple.com> Access checking for implicit user-defined conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94971 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
233a6419097ed97b67ff8efcacef9af613262ca3 28-Jan-2010 John McCall <rjmccall@apple.com> Access control for surrogate function calls. Required a moderately gross hack
to get the access bits set properly in conversion sets.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
41d8903731782ee85ee2b19734008b006e01c76f 28-Jan-2010 John McCall <rjmccall@apple.com> Access control for overloaded call operators. Not for surrogates yet,
mostly because we're going to want a better diagnostic for conversions.

Also this API needs to go back to sanity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94730 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
5357b615364c17ea024c757354c58ae2a520d216 28-Jan-2010 John McCall <rjmccall@apple.com> Access checking for overloaded operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94725 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
2f514480c448708ec382a684cf5e035d3a827ec8 27-Jan-2010 John McCall <rjmccall@apple.com> Implement access-check delays for out-of-line member definitions
using the same framework we use for deprecation warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94659 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
c373d48502ca7683ab55385f5bd624d778eb288d 27-Jan-2010 John McCall <rjmccall@apple.com> Implement access control for overloaded functions. Suppress access control
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94647 91177308-0d34-0410-b5e6-96231b3b80d8
4.cpp
92f883177b162928a8e632e4e3b93fafd2b26072 23-Jan-2010 John McCall <rjmccall@apple.com> Implement elementary access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.base/p1.cpp
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.dcl/p1.cpp
60fa3cfd7aa63c29f9fc2d593bac56a3646337cc 11-Dec-2009 John McCall <rjmccall@apple.com> Implement access declarations. Most of the work here is parsing them, which
is difficult because they're so terribly, terribly ambiguous.


We implement access declarations in terms of using declarations, which is
quite reasonable. However, we should really persist the access/using
distinction in the AST and use the appropriate name in diagnostics. This
isn't a priority, so I'll just file a PR and hope someone else does it. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91095 91177308-0d34-0410-b5e6-96231b3b80d8
lass.access.dcl/p1.cpp