Skip to content

Commit fc51e75

Browse files
authored
Merge pull request #75438 from swiftlang/egorzhdan/pretty-crash-trace
[cxx-interop] Add stack trace entry for the safety heuristic
2 parents 384d7f7 + e9c5f41 commit fc51e75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,6 +7366,10 @@ static bool hasNonCopyableAttr(const clang::RecordDecl *decl) {
73667366
/// Recursively checks that there are no pointers in any fields or base classes.
73677367
/// Does not check C++ records with specific API annotations.
73687368
static bool hasPointerInSubobjects(const clang::CXXRecordDecl *decl) {
7369+
clang::PrettyStackTraceDecl trace(decl, clang::SourceLocation(),
7370+
decl->getASTContext().getSourceManager(),
7371+
"looking for pointers in subobjects of");
7372+
73697373
// Probably a class template that has not yet been specialized:
73707374
if (!decl->getDefinition())
73717375
return false;

0 commit comments

Comments
 (0)