summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/class
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow access to non-static members without an object in sizeof expressions, ↵Sebastian Redl2010-11-261-3/+3
| | | | | | in C++0x. Patch by Jakub Wieczorek. llvm-svn: 120182
* A union cannot contain static data members or data members of reference type.Anders Carlsson2010-11-071-0/+8
| | | | llvm-svn: 118381
* Diagnose C++ [class.mem]p13-14, where a class member has the same nameDouglas Gregor2010-10-152-0/+59
| | | | | | as the class itself. Fixes PR7082. llvm-svn: 116573
* Make sure that we diagnose invalid qualifiers on friend functions.Douglas Gregor2010-10-141-1/+2
| | | | llvm-svn: 116527
* If we end up instantiating a function parameter whose default argumentDouglas Gregor2010-10-121-0/+27
| | | | | | | | | has not yet been parsed, note that the default argument hasn't been parsed and keep track of all of the instantiations of that function parameter. When its default argument does get parsed, imbue the instantiations with that default argument. Fixes PR8245. llvm-svn: 116324
* Parse default arguments within member functions in source order, fromDouglas Gregor2010-10-121-0/+46
| | | | | | Manuel Klimek! Fixes PR7715. llvm-svn: 116311
* Add redeclaration checking for static data members and fix a cornerDouglas Gregor2010-08-301-0/+64
| | | | | | | case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. llvm-svn: 112476
* Catch the case of trying to turn '&(X::a)' into a member pointer as well.John McCall2010-08-241-25/+0
| | | | llvm-svn: 111997
* When trying to resolve the address of an overloaded expression,John McCall2010-08-241-0/+25
| | | | | | | | only form pointers-to-member if the expression has the appropriate form. This avoids assertions later on on invalid code, but also allows us to properly resolve mixed-staticity overloads. llvm-svn: 111987
* Diagnose the presence of multiple initializations of static dataDouglas Gregor2010-08-241-0/+25
| | | | | | members, from Faisal Vali! Fixes PR6904. llvm-svn: 111900
* Turn access control on by default in -cc1.John McCall2010-04-092-2/+2
| | | | | | | | 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
* Improve handling of friend types in several ways:Douglas Gregor2010-04-071-2/+2
| | | | | | | | | | | - 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. llvm-svn: 100635
* Pretty-print anonymous types using their kind and presumed location.John McCall2010-03-191-7/+7
| | | | | | Fixes PR6643. Patch by Mike M! llvm-svn: 98946
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-103-23/+23
| | | | | | | | | | 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. llvm-svn: 98149
* Make Decl::isOutOfLine() virtual, and use that to determine when definitionsChandler Carruth2010-02-211-0/+25
| | | | | | | are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. llvm-svn: 96729
* Improve access control diagnostics. Perform access control on member-pointerJohn McCall2010-02-101-2/+2
| | | | | | | conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. llvm-svn: 95775
* Initialization improvements: addition of string initialization and a fewEli Friedman2009-12-191-2/+1
| | | | | | | | small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. llvm-svn: 91767
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-1512-12/+12
| | | | | | | | | - 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
* Stop trying to analyze class-hierarchies for dependently-scoped id-expressions;John McCall2009-12-021-0/+93
| | | | | | | | | | | | | there's nothing interesting we can say now that we're correctly not requiring the qualifier to name a known base class in dependent contexts. Require scope specifiers on member access expressions to name complete types if they're not dependent; delay lookup when they are dependent. Use more appropriate diagnostics when qualified implicit member access expressions find declarations from unrelated classes. llvm-svn: 90289
* Make sure we actually have a definition before asking if it is implicit. ↵Sebastian Redl2009-10-251-0/+9
| | | | | | Fixes PR4674. llvm-svn: 85072
* Improve diagnostics when the parser encounters a declarator with anDouglas Gregor2009-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | unknown type name, e.g., foo::bar x; when "bar" does not refer to a type in "foo". With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do: test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename Fixes PR3990. llvm-svn: 84053
* Rework the Parse-Sema interaction for friends to better support friendDouglas Gregor2009-09-261-1/+3
| | | | | | | | | class templates. We now treat friend class templates much more like normal class templates, except that they still get special name lookup rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in <iostream>. llvm-svn: 82848
* When adding a friend class declaration to the lookup tables, use the access ↵John McCall2009-09-021-0/+4
| | | | | | | | | | specifier of any previous declaration in case we replace it in a class's declaration table. Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in declaration lists. llvm-svn: 80750
* Ensure that the tag decls of friend decls aren't added to the friending class'sJohn McCall2009-09-021-2/+0
| | | | | | | decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. llvm-svn: 80745
* Fix bug 4784 and allow friend declarations to properly extendJohn McCall2009-08-311-0/+37
| | | | | | existing declaration chains. llvm-svn: 80636
* Omnibus friend decl refactoring. Instead of cloning AST classes for friendJohn McCall2009-08-281-0/+7
| | | | | | | | | | | | | | declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. llvm-svn: 80353
* Modify an assert to capture the restriction on friend declarations moreJohn McCall2009-08-251-0/+8
| | | | | | | accurately. Prevents the assert from triggering incorrectly when friending functions first declared in extern "C" contexts. Fixes bug 4757. llvm-svn: 80016
* Permit a class to friend its members in C++0x, without restriction.John McCall2009-08-061-2/+2
| | | | | | | Permit a class to friend its class members in C++ 98, as long as extensions are enabled (and even when they aren't, only give an extwarn about it). llvm-svn: 78332
* First pass at friend semantics.John McCall2009-08-063-0/+77
| | | | llvm-svn: 78274
* AlisdairM pointed out that this will likely be relaxed in C++0x, so let'sJohn McCall2009-08-061-0/+3
| | | | | | make a note of it in the test case. llvm-svn: 78266
* Add a test for invalid uses of non-static members from nested classes, justJohn McCall2009-08-051-0/+11
| | | | | | because I was thinking about it. llvm-svn: 78262
* Update for LLVM API change.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77249
* Make having no RUN line a failure.Daniel Dunbar2009-07-251-1/+3
| | | | | | | Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure if they are actually testing the right thing / anything. llvm-svn: 77070
* Prep for new warning.Mike Stump2009-07-221-1/+1
| | | | llvm-svn: 76772
* "This patch implements the restrictions on union members detailed inDouglas Gregor2009-07-221-0/+105
| | | | | | [class.union]p1", from John McCall! llvm-svn: 76766
* Revert this, we have a better way to do this.Mike Stump2009-07-211-4/+1
| | | | llvm-svn: 76687
* Revert this, we have a better way to handle this.Mike Stump2009-07-211-4/+1
| | | | llvm-svn: 76685
* Prep for new warning.Mike Stump2009-07-211-2/+5
| | | | llvm-svn: 76628
* Prep for new warning.Mike Stump2009-07-211-1/+4
| | | | llvm-svn: 76627
* Add test for [class.local]p2.Anders Carlsson2009-06-241-0/+12
| | | | llvm-svn: 74051
* Add test for [class.nested.type]p1Anders Carlsson2009-06-241-0/+11
| | | | llvm-svn: 74033
* Support for [class.local]p4.Anders Carlsson2009-06-241-0/+10
| | | | llvm-svn: 74030
* [class.local] p1 and p3. Also, add back the xcodeproj file.Anders Carlsson2009-06-242-0/+48
llvm-svn: 74027
OpenPOWER on IntegriCloud