summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/except/except.spec/p14.cpp
Commit message (Collapse)AuthorAgeFilesLines
* P1286R2: Remove restriction that the exception specification of aRichard Smith2019-05-061-9/+20
| | | | | | defaulted special member matches the implicit exception specification. llvm-svn: 360011
* P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:Richard Smith2016-06-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace inheriting constructors implementation with new approach, voted into C++ last year as a DR against C++11. Instead of synthesizing a set of derived class constructors for each inherited base class constructor, we make the constructors of the base class visible to constructor lookup in the derived class, using the normal rules for using-declarations. For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived class that tracks the requisite additional information. We create shadow constructors (not found by name lookup) in the derived class to model the actual initialization, and have a new expression node, CXXInheritedCtorInitExpr, to model the initialization of a base class from such a constructor. (This initialization is special because it performs real perfect forwarding of arguments.) In cases where argument forwarding is not possible (for inalloca calls, variadic calls, and calls with callee parameter cleanup), the shadow inheriting constructor is not emitted and instead we directly emit the initialization code into the caller of the inherited constructor. Note that this new model is not perfectly compatible with the old model in some corner cases. In particular: * if B inherits a private constructor from A, and C uses that constructor to construct a B, then we previously required that A befriends B and B befriends C, but the new rules require A to befriend C directly, and * if a derived class has its own constructors (and so its implicit default constructor is suppressed), it may still inherit a default constructor from a base class llvm-svn: 274049
* Take cv-qualifiers on fields of class type into account when determiningRichard Smith2013-11-251-2/+2
| | | | | | whether a defaulted special member function should be deleted. llvm-svn: 195620
* Add support for computing the exception specification for an inheritingRichard Smith2013-04-101-0/+23
| | | | | | | | | | | constructor. This isn't quite perfect (as usual, we don't handle default arguments correctly yet, and we don't deal with copy/move constructors for arguments correctly either, but this will be fixed when we implement core issue 1351. This completes our support for inheriting constructors. llvm-svn: 179154
* Don't do delayed exception-specification checking on an invalidDouglas Gregor2013-02-011-0/+11
| | | | | | class. Fixes <rdar://problem/13017229>. llvm-svn: 174145
* PR14141 (part of DR1351): An implicitly-deduced "any" exception specificationRichard Smith2012-10-211-0/+38
| | | | | | | produces an exception of 'noexcept(false)' and is thus compatible with an explicit exception specification of 'noexcept(false)'. llvm-svn: 166404
* PR13381: consider cv-qualifiers on a class member's type when determining whichRichard Smith2012-07-181-0/+24
| | | | | | | constructor will be used for moving that object, in the computation of its exception specification. llvm-svn: 160417
* 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 support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-111-1/+13
| | | | llvm-svn: 132878
* Semantic checking for exception specifications should be triggered byJohn McCall2011-03-021-1/+1
| | | | | | whether C++ exceptions are enabled, not exceptions in general. PR9358. llvm-svn: 126820
* Provide an exception-specification for an implicitly-declaredDouglas Gregor2010-07-011-0/+17
| | | | | | copy-assignment operator. llvm-svn: 107406
* Add Sema test case for exception-specifiers implicitly added to destructors.Douglas Gregor2010-07-011-0/+12
llvm-svn: 107395
OpenPOWER on IntegriCloud