summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sema: Recover when a function template is in an extern "C" blockDavid Majnemer2015-01-151-1/+1
| | | | llvm-svn: 226135
* PR15597: Fix a confusion between the implicit exception specification and theRichard Smith2013-03-271-1/+14
| | | | | | | | uninstantiated exception specification when a special member within a class template is both defaulted and given an exception specification on its first declaration. llvm-svn: 178103
* Add the testcase from PR13573, this used to crash.Benjamin Kramer2013-02-241-0/+5
| | | | | | The error is a bit strange tbh, but better than crashing. llvm-svn: 175996
* Fixes crash when illegal function definitions are deleted or defaulted. ↵Aaron Ballman2013-01-161-0/+21
| | | | | | Fixes PR14577. llvm-svn: 172676
* PR13527: don't assert if a function is explicitly defaulted when it's alreadyRichard Smith2012-08-061-0/+32
| | | | | | been defined. llvm-svn: 161315
* Final piece of core issue 1330: delay computing the exception specification ofRichard Smith2012-07-271-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). llvm-svn: 160847
* Allow friend declarations of defaulted special member functions. OnlyRichard Smith2012-06-081-0/+6
| | | | | | definitions of such members are prohibited, not mere declarations. llvm-svn: 158186
* Fold the six functions checking explicitly-defaulted special member functionsRichard Smith2012-05-151-6/+6
| | | | | | | | | | | | into one. These were all performing almost identical checks, with different bugs in each of them. This fixes PR12806 (we weren't setting the exception specification for an explicitly-defaulted, non-user-provided default constructor) and enforces 8.4.2/2's rule that an in-class defaulted member must exactly match the implicit parameter type. llvm-svn: 156802
* Fix another issue introduced by the proposed wording for core issue 1358: sinceRichard Smith2012-02-141-1/+9
| | | | | | | | | | the instantiation of a constexpr function temploid is now always constexpr, a defaulted constexpr function temploid is often ill-formed by the rule in [dcl.fct.def.default]p2 that an explicitly-defaulted constexpr function must have a constexpr implicit definition. To avoid making loads of completely reasonable code ill-formed, do not apply that rule to templates. llvm-svn: 150453
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement some tests for defaulted constructors. To do this I had toAlexis Hunt2011-05-171-0/+45
suppress an error we were previously emitting on valid union code. llvm-svn: 131440
OpenPOWER on IntegriCloud