[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 14:52:01 PDT 2025
================
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord(
RelocatableClasses.insert({D, Info});
}
+// In future we may want to distinguish the presence or absence of address
+// discrimination, from the inability to determine the presence. For now we rely
+// on all source facing interfaces (type trait queries, etc) diagnosing and
+// reporting an error before reaching these paths.
+static bool canDeterminePointerAuthContent(QualType Type) {
+ if (Type->isIncompleteType() || Type->isDependentType())
----------------
ojhunt wrote:
Ah ha, that does sound like it might be a better option :D
Assuming this works I will be much happier - I was certain that there must be a centralized location to test this.
I'm also convinced that there must be some other path that ends up assuming a complete type cannot include an incomplete one but I haven't been able to find one - my only reason for wanting such a path is to verify that if it does exist, this would fix it.
https://github.com/llvm/llvm-project/pull/164528
More information about the cfe-commits
mailing list