Skip to content

Commit 07a97f8

Browse files
committed
[do not merge] add some debug prints for linux bot failures.
1 parent f288ab4 commit 07a97f8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5850,6 +5850,8 @@ static bool hasPointerInSubobjects(const clang::CXXRecordDecl *decl) {
58505850
}
58515851

58525852
static bool copyConstructorIsDefaulted(const clang::CXXRecordDecl *decl) {
5853+
llvm::dbgs() << "copy ctor is default\n";
5854+
58535855
auto ctor = llvm::find_if(decl->ctors(), [](clang::CXXConstructorDecl *ctor) {
58545856
return ctor->isCopyConstructor();
58555857
});
@@ -5859,6 +5861,8 @@ static bool copyConstructorIsDefaulted(const clang::CXXRecordDecl *decl) {
58595861
}
58605862

58615863
static bool copyAssignOperatorIsDefaulted(const clang::CXXRecordDecl *decl) {
5864+
llvm::dbgs() << "copy assign is default\n";
5865+
58625866
auto copyAssignOp = llvm::find_if(decl->decls(), [](clang::Decl *member) {
58635867
if (auto method = dyn_cast<clang::CXXMethodDecl>(member))
58645868
return method->isCopyAssignmentOperator();
@@ -5880,6 +5884,8 @@ static bool isSufficientlyTrivial(const clang::CXXRecordDecl *decl) {
58805884
if (!decl->getDefinition())
58815885
return true;
58825886

5887+
llvm::dbgs() << "has dtor = " << (decl->getDestructor() == nullptr ? "NO" : "YES") << "\n";
5888+
58835889
if ((decl->hasUserDeclaredCopyConstructor() &&
58845890
!copyConstructorIsDefaulted(decl)) ||
58855891
(decl->hasUserDeclaredCopyAssignment() &&
@@ -5888,10 +5894,15 @@ static bool isSufficientlyTrivial(const clang::CXXRecordDecl *decl) {
58885894
!decl->getDestructor()->isDefaulted()))
58895895
return false;
58905896

5891-
auto checkType = [](clang::QualType t) {
5897+
auto checkType = [decl](clang::QualType t) {
5898+
PrettyStackTraceClangType trace(decl->getASTContext(), "checking subtype if sufficently trivial", t);
5899+
58925900
if (auto recordType = dyn_cast<clang::RecordType>(t.getCanonicalType())) {
58935901
if (auto cxxRecord =
58945902
dyn_cast<clang::CXXRecordDecl>(recordType->getDecl())) {
5903+
clang::PrettyStackTraceDecl trace(cxxRecord, clang::SourceLocation(),
5904+
cxxRecord->getASTContext().getSourceManager(),
5905+
"checking subtype recrod if sufficently trivial");
58955906
if (hasImportAsRefAttr(cxxRecord) || hasOwnedValueAttr(cxxRecord) ||
58965907
hasUnsafeAPIAttr(cxxRecord))
58975908
return true;

0 commit comments

Comments
 (0)