Commit Graph

13 Commits

Author SHA1 Message Date
Richard Smith ad45a8681d Some tests missed from r144056.
llvm-svn: 144060
2011-11-08 02:18:13 +00:00
Richard Smith 9ca5c42582 Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!

llvm-svn: 141900
2011-10-13 22:29:44 +00:00
Richard Smith 7b8c3c91f4 PR10359: Template declarations which define classes are not permitted to also contain declarators. Previously we would accept code like this:
template<typename T> struct S { } f() { return 0; }

This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template.

Treat this 

llvm-svn: 135195
2011-07-14 21:35:26 +00:00
Richard Smith 3f1b5d077b Implement support for C++0x alias templates.
llvm-svn: 130953
2011-05-05 21:57:07 +00:00
Douglas Gregor 41f9030fb8 Implement C++ [temp.local]p4, which specifies how we eliminate
name-lookup ambiguities when there are multiple base classes that are
all specializations of the same class template. This is part of a
general cleanup for ambiguities in template-name lookup. Fixes
PR6717.

llvm-svn: 101065
2010-04-12 20:54:26 +00:00
Douglas Gregor b242683d99 Overhaul checking of non-type template arguments that should refer to
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.

Fixes PR6563 and PR6749.

llvm-svn: 100125
2010-04-01 18:32:35 +00:00
Douglas Gregor ea16606fcd During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.

llvm-svn: 98546
2010-03-15 15:26:48 +00:00
Douglas Gregor 6623006249 Implement C++ [temp.local]p8, which specifies that a template
parameter hides a namespace-scope declararion with the same name in an
out-of-line definition of a template. The lookup requires a strange
interleaving of lexical and semantic scopes (go C++), which I have not
yet handled in the typo correction/code completion path.

Fixes PR6594.

llvm-svn: 98544
2010-03-15 14:33:29 +00:00
Chandler Carruth 234c129fba Fix PR6156 and test several of the basic aspects of non-type template arguments
when implicitly supplied to the injected class name.

llvm-svn: 94948
2010-01-31 07:24:03 +00:00
Daniel Dunbar 8fbe78f6fc 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).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar a530841b4f Switch XFAIL format to match LLVM.
llvm-svn: 85880
2009-11-03 07:25:45 +00:00
Douglas Gregor cc2427c343 When performing name lookup within a class template or class template
partial specialization, make sure we look into non-dependent base
classes (but not dependent base classes). Fixes PR4951.

llvm-svn: 81584
2009-09-11 22:57:37 +00:00
Douglas Gregor 2b154f41f2 Add a test illustrating our current inability to properly cope with the point of instantation of a member function of a class template specialization
llvm-svn: 73956
2009-06-23 15:45:29 +00:00