summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tighten the setAccess assert. We now allow AS_none if the decl contex is not ↵Anders Carlsson2009-03-251-1/+0
| | | | | | | | a C++ record decl. Also, fix fallout from the change. llvm-svn: 67717
* Improve handling of base initializers. We now parse initializers in out of ↵Anders Carlsson2009-03-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | line decls, such as: class C { C() { } int a; }; C::C() : a(10) { } We also diagnose when initializers are used on declarations that aren't constructors: t.cpp:1:10: error: only constructors take base initializers void f() : a(10) { } ^ Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.) llvm-svn: 67672
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Template instantiation for the declarations of member functions withinDouglas Gregor2009-03-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | a class template. At present, we can only instantiation normal methods, but not constructors, destructors, or conversion operators. As ever, this contains a bit of refactoring in Sema's type-checking. In particular: - Split ActOnFunctionDeclarator into ActOnFunctionDeclarator (handling the declarator itself) and CheckFunctionDeclaration (checking for the the function declaration), the latter of which is also used by template instantiation. - We were performing the adjustment of function parameter types in three places; collect those into a single new routine. - When the type of a parameter is adjusted, allocate an OriginalParmVarDecl to keep track of the type as it was written. - Eliminate a redundant check for out-of-line declarations of member functions; hide more C++-specific checks on function declarations behind if(getLangOptions().CPlusPlus). llvm-svn: 67575
* Fix various problems with matching out-of-line definitions of staticDouglas Gregor2009-03-111-0/+14
| | | | | | | | | class members to the corresponding in-class declaration. Diagnose the erroneous use of 'static' on out-of-line definitions of class members. llvm-svn: 66740
* Add basic, hackish support for instantiation of typedefs in a classDouglas Gregor2009-03-111-2/+6
| | | | | | | | | template. More importantly, start to sort out the issues regarding complete types and nested-name-specifiers, especially the question of: when do we instantiate a class template specialization that occurs to the left of a '::' in a nested-name-specifier? llvm-svn: 66662
* Improve recovery from ill-formed scope specifiers. Fixes PR3670.Douglas Gregor2009-03-061-4/+7
| | | | llvm-svn: 66286
* Make the test cases failing due to exact diagnostic matching XFAIL.Sebastian Redl2009-02-081-0/+2
| | | | llvm-svn: 64080
* Diagnose attempts to define a namespace member out-of-line when noDouglas Gregor2009-02-061-0/+25
| | | | | | matching member exists. Thanks to Piotr Rak for reporting the problem! llvm-svn: 63939
* Add support for out-of-line definitions of conversion functions and member ↵Douglas Gregor2008-12-261-0/+20
| | | | | | operators llvm-svn: 61442
* Partial fix for qualified name lookup, such that the lookup of N inDouglas Gregor2008-12-161-5/+18
| | | | | | | | | N::X only skips those entities specified in C++ [basic.lookup.qual]p1. Note that both EDG and GCC currently get this wrong. EDG has confirmed that the bug will be fixed in a future version. llvm-svn: 61079
* Diagnose erroneous uses of out-of-line member definitions and scopeDouglas Gregor2008-12-151-2/+19
| | | | | | | | | | | | | | specifiers. Specifically: * Determine when an out-of-line function definition does not match any declaration within the class or namespace (including coping with overloaded functions). * Complain about typedefs and parameters that have scope specifiers. * Complain about out-of-line declarations that aren't also definitions. * Complain about non-static data members being declared out-of-line. * Allow cv-qualifiers on out-of-line member function definitions. llvm-svn: 61058
* make the 'to match this' diagnostic a note.Chris Lattner2008-11-231-1/+1
| | | | llvm-svn: 59921
* add support for inserting a DeclarationName into a diagnostic directlyChris Lattner2008-11-231-2/+2
| | | | | | | without calling getAsString(). This implicitly puts quotes around the name, so diagnostics need to be tweaked to accommodate this. llvm-svn: 59916
* Take care another assert:Argyrios Kyrtzidis2008-11-191-0/+7
| | | | | | | | | | | | | | | | | | | | struct A { struct B; }; struct A::B { void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one." }; Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g: namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' // getLexicalParent() == translation unit llvm-svn: 59650
* Fix this:Argyrios Kyrtzidis2008-11-191-0/+3
| | | | | | | | | | | | With this snippet: void f(a::b); An assert is hit: Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98 Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled. llvm-svn: 59636
* Introduce ScopedDecl::getLexicalDeclContext() which is different from ↵Argyrios Kyrtzidis2008-11-091-0/+9
| | | | | | | | | | | | | ScopedDecl::getDeclContext() when there are nested-names. e.g.: namespace A { void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' // LexicalDC == global namespace llvm-svn: 58948
* Implement Sema support for C++ nested-name-specifiers.Argyrios Kyrtzidis2008-11-081-0/+56
llvm-svn: 58916
OpenPOWER on IntegriCloud