summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/overload-decl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* If a function decl cannot be merged, mark it as invalid.Nico Weber2015-01-171-4/+2
| | | | | | | | | | | | | | | | | | | Clang currently crashes on class C { C() = default; C() = delete; }; My cunning plan for fixing this was to change the `if (!FnD)` in Parser::ParseCXXInlineMethodDef() to `if (!FnD || FnD->isInvalidDecl)` – but alas, the second constructor decl wasn't marked as invalid. This lets Sema::MergeFunctionDecl() return true on function redeclarations, which leads to them being marked invalid. This also improves error messages when functions are redeclared. llvm-svn: 226365
* Sema: Do not allow overloading between methods based on restrictDavid Majnemer2013-11-031-0/+5
| | | | | | | | | | | | | | | | If the sole distinction between two declarations is that one has a __restrict qualifier then we should not consider it to be an overload. Instead, we will consider it as an incompatible redeclaration which is similar to how MSVC, ICC and GCC would handle it. This fixes PR17786. N.B. We must not mangle in __restrict into method qualifiers becase we don't allow overloading between such declarations anymore. To do otherwise would be a violation of the Itanium ABI. llvm-svn: 193964
* Improve diagnostic for redeclaring static member function. Fixes PR16382.Eli Friedman2013-06-191-1/+2
| | | | llvm-svn: 184378
* Fix a regression from 171193: main cannot be overloaded.Rafael Espindola2013-01-121-0/+3
| | | | | | Thanks Eli Friedman for noticing it. llvm-svn: 172292
* 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
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Place constructors and destructors into the DeclContext of the class,Douglas Gregor2008-12-151-1/+5
| | | | | | | | | | | | 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
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-8/+8
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Fix overloading of non-static member functions that differ in their ↵Douglas Gregor2008-11-211-3/+1
| | | | | | cv-qualifiers llvm-svn: 59819
* Preliminary support for function overloadingDouglas Gregor2008-10-211-0/+29
llvm-svn: 57909
OpenPOWER on IntegriCloud