[clang] Switch builtin strings to use string tables (PR #118734)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 21:01:42 PST 2024


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 983f88c1ec9cee51cf0fb4e6a0f00074a7cf1b60 16e70ef1111753de962e76b5232912094a51ca24 --extensions cpp,h -- clang/include/clang/Basic/Builtins.h clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Builtins.cpp clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/AArch64.h clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Targets/AMDGPU.h clang/lib/Basic/Targets/ARC.h clang/lib/Basic/Targets/ARM.cpp clang/lib/Basic/Targets/ARM.h clang/lib/Basic/Targets/AVR.h clang/lib/Basic/Targets/BPF.cpp clang/lib/Basic/Targets/BPF.h clang/lib/Basic/Targets/CSKY.cpp clang/lib/Basic/Targets/CSKY.h clang/lib/Basic/Targets/DirectX.h clang/lib/Basic/Targets/Hexagon.cpp clang/lib/Basic/Targets/Hexagon.h clang/lib/Basic/Targets/Lanai.h clang/lib/Basic/Targets/LoongArch.cpp clang/lib/Basic/Targets/LoongArch.h clang/lib/Basic/Targets/M68k.cpp clang/lib/Basic/Targets/M68k.h clang/lib/Basic/Targets/MSP430.h clang/lib/Basic/Targets/Mips.cpp clang/lib/Basic/Targets/Mips.h clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Basic/Targets/NVPTX.h clang/lib/Basic/Targets/PNaCl.h clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h clang/lib/Basic/Targets/RISCV.cpp clang/lib/Basic/Targets/RISCV.h clang/lib/Basic/Targets/SPIR.cpp clang/lib/Basic/Targets/SPIR.h clang/lib/Basic/Targets/Sparc.h clang/lib/Basic/Targets/SystemZ.cpp clang/lib/Basic/Targets/SystemZ.h clang/lib/Basic/Targets/TCE.h clang/lib/Basic/Targets/VE.cpp clang/lib/Basic/Targets/VE.h clang/lib/Basic/Targets/WebAssembly.cpp clang/lib/Basic/Targets/WebAssembly.h clang/lib/Basic/Targets/X86.cpp clang/lib/Basic/Targets/X86.h clang/lib/Basic/Targets/XCore.cpp clang/lib/Basic/Targets/XCore.h
``````````

</details>

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

``````````diff
diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index d5d76cbb93..fe3a864a68 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -134,8 +134,8 @@ template <size_t N> struct Storage {
 // turn into actual tokens that would disrupt string literal concatenation.
 #ifdef __GNUC__
 #define CLANG_BUILTIN_DETAIL_STR_TABLE(S)                                      \
-  _Pragma("GCC diagnostic push")                                             \
-      _Pragma("GCC diagnostic ignored \"-Woverlength-strings\"")             \
+  _Pragma("GCC diagnostic push")                                               \
+      _Pragma("GCC diagnostic ignored \"-Woverlength-strings\"")               \
           S _Pragma("GCC diagnostic pop")
 #else
 #define CLANG_BUILTIN_DETAIL_STR_TABLE(S) S

``````````

</details>


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


More information about the cfe-commits mailing list