@@ -2531,7 +2531,8 @@ class Sema {
2531
2531
// / \brief Helper class that collects exception specifications for
2532
2532
// / implicitly-declared special member functions.
2533
2533
class ImplicitExceptionSpecification {
2534
- ASTContext &Context;
2534
+ // Pointer to allow copying
2535
+ ASTContext *Context;
2535
2536
// We order exception specifications thus:
2536
2537
// noexcept is the most restrictive, but is only used in C++0x.
2537
2538
// throw() comes next.
@@ -2549,7 +2550,7 @@ class Sema {
2549
2550
2550
2551
public:
2551
2552
explicit ImplicitExceptionSpecification (ASTContext &Context)
2552
- : Context(Context), ComputedEST(EST_BasicNoexcept) {
2553
+ : Context(& Context), ComputedEST(EST_BasicNoexcept) {
2553
2554
if (!Context.getLangOptions ().CPlusPlus0x )
2554
2555
ComputedEST = EST_DynamicNone;
2555
2556
}
@@ -2584,6 +2585,11 @@ class Sema {
2584
2585
ImplicitExceptionSpecification
2585
2586
ComputeDefaultedDefaultCtorExceptionSpec (CXXRecordDecl *ClassDecl);
2586
2587
2588
+ // / \brief Determine what sort of exception specification a defaulted
2589
+ // / constructor of a class will have.
2590
+ std::pair<ImplicitExceptionSpecification, bool >
2591
+ ComputeDefaultedCopyCtorExceptionSpecAndConst (CXXRecordDecl *ClassDecl);
2592
+
2587
2593
// / \brief Determine what sort of exception specification a defaulted
2588
2594
// / destructor of a class will have.
2589
2595
ImplicitExceptionSpecification
@@ -2593,6 +2599,10 @@ class Sema {
2593
2599
// / deleted.
2594
2600
bool ShouldDeleteDefaultConstructor (CXXConstructorDecl *CD);
2595
2601
2602
+ // / \brief Determine if a defaulted copy constructor ought to be
2603
+ // / deleted.
2604
+ bool ShouldDeleteCopyConstructor (CXXConstructorDecl *CD);
2605
+
2596
2606
// / \brief Determine if a defaulted destructor ought to be deleted.
2597
2607
bool ShouldDeleteDestructor (CXXDestructorDecl *DD);
2598
2608
@@ -2643,8 +2653,7 @@ class Sema {
2643
2653
// / DefineImplicitCopyConstructor - Checks for feasibility of
2644
2654
// / defining this constructor as the copy constructor.
2645
2655
void DefineImplicitCopyConstructor (SourceLocation CurrentLocation,
2646
- CXXConstructorDecl *Constructor,
2647
- unsigned TypeQuals);
2656
+ CXXConstructorDecl *Constructor);
2648
2657
2649
2658
// / \brief Declare the implicit copy assignment operator for the given class.
2650
2659
// /
@@ -3271,6 +3280,7 @@ class Sema {
3271
3280
3272
3281
void CheckExplicitlyDefaultedMethods (CXXRecordDecl *Record);
3273
3282
void CheckExplicitlyDefaultedDefaultConstructor (CXXConstructorDecl *Ctor);
3283
+ void CheckExplicitlyDefaultedCopyConstructor (CXXConstructorDecl *Ctor);
3274
3284
void CheckExplicitlyDefaultedDestructor (CXXDestructorDecl *Dtor);
3275
3285
3276
3286
// ===--------------------------------------------------------------------===//
0 commit comments