summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR38286: Don't crash when attempting to define a constructor for anRichard Smith2018-08-081-0/+11
| | | | | | incomplete class template. llvm-svn: 339210
* When we see something that looks like a constructor with a return type, only ↵Richard Smith2015-07-061-2/+1
| | | | | | issue one error, not two. llvm-svn: 241424
* Sema: Don't allow CVR qualifiers before structorsDavid Majnemer2014-07-081-0/+2
| | | | | | | | | We would silently accept volatile ~S() when the user probably intended to write virtual ~S(). This fixes PR20238. llvm-svn: 212555
* Diagnose C++ [class.mem]p13-14, where a class member has the same nameDouglas Gregor2010-10-151-1/+2
| | | | | | as the class itself. Fixes PR7082. llvm-svn: 116573
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* Introduce a new class, UnqualifiedId, that provides a parsedDouglas Gregor2009-11-031-1/+1
| | | | | | | | | | | | | | | | representation of a C++ unqualified-id, along with a single parsing function (Parser::ParseUnqualifiedId) that will parse all of the various forms of unqualified-id in C++. Replace the representation of the declarator name in Declarator with the new UnqualifiedId class, simplifying declarator-id parsing considerably and providing more source-location information to Sema. In the future, I hope to migrate all of the other unqualified-id-parsing code over to this single representation, then begin to merge actions that are currently only different because we didn't have a unqualified notion of the name in the parser. llvm-svn: 85851
* Top-level semicolons are allowed in C++0x. Fixes PR4755.Douglas Gregor2009-08-241-0/+1
| | | | llvm-svn: 79912
* Parsing fix for out-of-line constructors, from Piotr RakDouglas Gregor2009-07-061-0/+25
| | | | llvm-svn: 74833
* Rework the way we handle constructor decls to be less hacky and fix PR3948 ↵Anders Carlsson2009-04-301-0/+13
| | | | | | completely. llvm-svn: 70516
* Just because a declaration has the same name as its containing class doesn't ↵Anders Carlsson2009-04-291-0/+5
| | | | | | mean that it's a constructor. Fixes rdar://problem/6815988. llvm-svn: 70436
* Improve recovery when a constructor fails to type-check. Test case from AndersDouglas Gregor2009-03-271-1/+1
| | | | llvm-svn: 67818
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Correct the order in which we cope with end-of-class-definitionDouglas Gregor2008-12-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. llvm-svn: 61406
* Merge pr-3188.cpp into constructor.cpp.Sebastian Redl2008-12-231-0/+10
| | | | llvm-svn: 61370
* Place constructors and destructors into the DeclContext of the class,Douglas Gregor2008-12-151-0/+6
| | | | | | | | | | | | just like all other members, and remove the special variables in CXXRecordDecl to store them. This eliminates a lot of special-case code for constructors and destructors, including ActOnConstructor/ActOnDeclarator and special lookup rules in LookupDecl. The result is far more uniform and manageable. Diagnose the redeclaration of member functions. llvm-svn: 61048
* Enable out-of-line definitions of C++ constructors and destructorsDouglas Gregor2008-12-121-0/+3
| | | | llvm-svn: 60947
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-1/+1
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Semantic checking of constructor declarations and classification of ↵Douglas Gregor2008-10-311-1/+7
| | | | | | default/copy constructors llvm-svn: 58538
* Add support for parsing and representing C++ constructor declarations.Douglas Gregor2008-10-311-0/+14
Notes: - Constructors are never found by name lookup, so they'll never get pushed into any scope. Instead, they are stored as an OverloadedFunctionDecl in CXXRecordDecl for easy overloading. - There's a new action isCurrentClassName that determines whether an identifier is the name of the innermost class currently being defined; we use this to identify the declarator-id grammar rule that refers to a type-name. - MinimalAction does *not* support parsing constructors. - We now handle virtual and explicit function specifiers. llvm-svn: 58499
OpenPOWER on IntegriCloud