[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)
Daniil Kovalev via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 4 22:57:36 PDT 2024
================
@@ -5555,6 +5579,27 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) {
return EmitCallee(ICE->getSubExpr());
}
+ // Try to remember the original __ptrauth qualifier for loads of
+ // function pointers.
+ if (ICE->getCastKind() == CK_LValueToRValue) {
+ auto *SubExpr = ICE->getSubExpr();
+ if (auto *PtrType = SubExpr->getType()->getAs<PointerType>()) {
----------------
kovdan01 wrote:
Nit
```suggestion
if (const auto *PtrType = SubExpr->getType()->getAs<PointerType>()) {
```
https://github.com/llvm/llvm-project/pull/100830
More information about the cfe-commits
mailing list