[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 21 22:41:32 PDT 2025
================
@@ -4901,6 +4901,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
// Handle builtins like identifiers.
if (Line.Type != LT_PreprocessorDirective &&
(Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) {
+ // Check for special case: single underscore token (gettext macro)
+ if (Left.Tok.getIdentifierInfo() && !Style.SpaceBeforeUnderscoreParens) {
+ StringRef TokenText = Left.TokenText;
+ if (TokenText == "_")
----------------
kgerlich wrote:
merged into one line with wrap.
https://github.com/llvm/llvm-project/pull/159925
More information about the cfe-commits
mailing list