@@ -5809,6 +5809,10 @@ static bool hasIteratorAPIAttr(const clang::Decl *decl) {
5809
5809
// / Recursively checks that there are no pointers in any fields or base classes.
5810
5810
// / Does not check C++ records with specific API annotations.
5811
5811
static bool hasPointerInSubobjects (const clang::CXXRecordDecl *decl) {
5812
+ clang::PrettyStackTraceDecl trace (decl, clang::SourceLocation (),
5813
+ decl->getASTContext ().getSourceManager (),
5814
+ " checking if pointer in subobjects" );
5815
+
5812
5816
// Probably a class template that has not yet been specialized:
5813
5817
if (!decl->getDefinition ())
5814
5818
return false ;
@@ -5868,6 +5872,10 @@ static bool copyAssignOperatorIsDefaulted(const clang::CXXRecordDecl *decl) {
5868
5872
// / destructors in any fields or base classes.
5869
5873
// / Does not check C++ records with specific API annotations.
5870
5874
static bool isSufficientlyTrivial (const clang::CXXRecordDecl *decl) {
5875
+ clang::PrettyStackTraceDecl trace (decl, clang::SourceLocation (),
5876
+ decl->getASTContext ().getSourceManager (),
5877
+ " checking if sufficently trivial" );
5878
+
5871
5879
// Probably a class template that has not yet been specialized:
5872
5880
if (!decl->getDefinition ())
5873
5881
return true ;
@@ -5912,6 +5920,10 @@ static bool isSufficientlyTrivial(const clang::CXXRecordDecl *decl) {
5912
5920
// / Checks if a record provides the required value type lifetime operations
5913
5921
// / (copy and destroy).
5914
5922
static bool hasRequiredValueTypeOperations (const clang::CXXRecordDecl *decl) {
5923
+ clang::PrettyStackTraceDecl trace (decl, clang::SourceLocation (),
5924
+ decl->getASTContext ().getSourceManager (),
5925
+ " checking if has required lifetime ops" );
5926
+
5915
5927
if (auto dtor = decl->getDestructor ()) {
5916
5928
if (dtor->isDeleted () || dtor->getAccess () != clang::AS_public) {
5917
5929
return false ;
@@ -6037,6 +6049,8 @@ void swift::simple_display(llvm::raw_ostream &out,
6037
6049
CxxRecordSemanticsDescriptor desc) {
6038
6050
out << " Matching API semantics of C++ record '"
6039
6051
<< desc.decl ->getNameAsString () << " '.\n " ;
6052
+
6053
+ desc.decl ->dump ();
6040
6054
}
6041
6055
6042
6056
SourceLoc swift::extractNearestSourceLoc (CxxRecordSemanticsDescriptor desc) {
@@ -6051,6 +6065,8 @@ void swift::simple_display(llvm::raw_ostream &out,
6051
6065
else
6052
6066
out << " <invalid decl>" ;
6053
6067
out << " ' is safe to use in context.\n " ;
6068
+
6069
+ desc.decl ->dump ();
6054
6070
}
6055
6071
6056
6072
SourceLoc swift::extractNearestSourceLoc (SafeUseOfCxxDeclDescriptor desc) {
0 commit comments