================
@@ -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) {
+    if (Ty->hasAttr(attr::CFIUncheckedCallee))
+      return true;
+
+    QualType Desugared = Ty.getSingleStepDesugaredType(Context);
----------------
erichkeane wrote:

The fact that we're doing this I think means we're not properly adding this as 
a type, and I'm against it.  I believe we should be adding a new type to the 
AST to represent this.


https://github.com/llvm/llvm-project/pull/135836
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to