================
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState
&state, ParsedAttr &attr,
return true;
}
+ if (attr.getKind() == ParsedAttr::AT_CFISalt) {
+ if (attr.getNumArgs() == 0)
+ return true;
+
+ // Delay if this is not a function type.
+ StringRef Argument;
+ if (!S.checkStringLiteralArgumentAttr(attr, 0, Argument))
+ return false;
+
+ // Delay if this is not a function type.
+ if (!unwrapped.isFunctionType())
+ return false;
+
+ const auto *FnTy = unwrapped.get()->getAs<FunctionProtoType>();
+ if (!FnTy)
----------------
bwendling wrote:
Well, the `FnTy` is a `FunctionProtoType`, which is what holds the information.
If you want an example, look at the attribute handling below this code.
However, I'm not able to trigger this code path. I suppose I can remove it if
you like.
https://github.com/llvm/llvm-project/pull/141846
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits