[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 11:48:13 PDT 2025
================
@@ -8627,6 +8636,40 @@ inline bool Type::isOverloadableType() const {
!isMemberPointerType();
}
+inline bool Type::hasCFIUncheckedCallee(const ASTContext &Context) const {
+ // Carefully strip sugar coating the underlying attributed type. We don't
+ // want to remove all the sugar because this will remove any wrapping
+ // attributed types.
+ QualType Ty(this, /*Quals=*/0);
+
+ while (1) {
----------------
erichkeane wrote:
I think I'd rather this do a bit of a `while(!Ty.isCanonical())` instead.
https://github.com/llvm/llvm-project/pull/135836
More information about the cfe-commits
mailing list