[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 18:01:12 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h,c -- clang/test/CodeGen/cfi-unchecked-callee-attribute-member-function.cpp clang/test/CodeGen/cfi-unchecked-callee-attribute.cpp clang/test/Frontend/cfi-unchecked-callee-attribute.c clang/test/Frontend/cfi-unchecked-callee-attribute.cpp clang/include/clang/AST/Type.h clang/include/clang/CodeGen/CGFunctionInfo.h clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprConstant.cpp clang/lib/CodeGen/CGPointerAuth.cpp clang/lib/CodeGen/ItaniumCXXABI.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaExceptionSpec.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/SemaType.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index 909bc2522..4429e55c8 100644
--- a/clang/include/clang/AST/Type.h
+++ b/clang/include/clang/AST/Type.h
@@ -4495,8 +4495,10 @@ public:
     // adjust the Bits field below, and if you add bits, you'll need to adjust
     // Type::FunctionTypeBitfields::ExtInfo as well.
 
-    // |  CC  |noreturn|produces|nocallersavedregs|regparm|nocfcheck|cmsenscall|cfiuncheckedcallee|
-    // |0 .. 5|   6    |    7   |       8         |9 .. 11|    12   |    13    |        14        |
+    // |  CC
+    // |noreturn|produces|nocallersavedregs|regparm|nocfcheck|cmsenscall|cfiuncheckedcallee|
+    // |0 .. 5|   6    |    7   |       8         |9 .. 11|    12   |    13    |
+    // 14        |
     //
     // regparm is either 0 (no regparm attribute) or the regparm value+1.
     enum { CallConvMask = 0x3F };

``````````

</details>


https://github.com/llvm/llvm-project/pull/135836


More information about the cfe-commits mailing list