Skip to content

[libcxxabi][test][NFC] Turn off clang-format for demangler test-case array #73503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

Michael137
Copy link
Member

Adding test-cases to the cases array causes git clang-format to split the strings of many of the existing test-cases, making them harder to read/work with in most cases.

This patch disables clang-format for the cases array so it doesn't catch anyone off-guard in the future.

…array

Adding test-cases to the `cases` array causes `git clang-format` to
split the strings of many of the existing test-cases, making
them harder to read/work with in most cases.

This patch disables `clang-format` for the `cases` array
so it doesn't catch anyone off-guard in the future.
@Michael137 Michael137 requested a review from a team as a code owner November 27, 2023 11:18
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label Nov 27, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 27, 2023

@llvm/pr-subscribers-libcxxabi

Author: Michael Buch (Michael137)

Changes

Adding test-cases to the cases array causes git clang-format to split the strings of many of the existing test-cases, making them harder to read/work with in most cases.

This patch disables clang-format for the cases array so it doesn't catch anyone off-guard in the future.


Full diff: https://github.com/llvm/llvm-project/pull/73503.diff

1 Files Affected:

  • (modified) libcxxabi/test/test_demangle.pass.cpp (+2)
diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp
index 77741a952850ab9..ff56d8772869c19 100644
--- a/libcxxabi/test/test_demangle.pass.cpp
+++ b/libcxxabi/test/test_demangle.pass.cpp
@@ -32,6 +32,7 @@
 // Is long double fp128?
 #define LDBL_FP128 (__LDBL_MANT_DIG__ == 113)
 
+// clang-format off
 const char* cases[][2] =
 {
     {"_Z1A", "A"},
@@ -30175,6 +30176,7 @@ const char* cases[][2] =
     {"_Z2f5IPiEvu16__remove_pointerIT_E", "void f5<int*>(__remove_pointer(int*))"},
     {"_Z2f5IiEvu14__remove_cvrefIT_E", "void f5<int>(__remove_cvref(int))"},
 };
+// clang-format on
 
 const unsigned N = sizeof(cases) / sizeof(cases[0]);
 

@ldionne ldionne merged commit ae10baf into llvm:main Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants