[PATCH] D135872: [clang-format] Handle unions like structs and classes
    Björn Schäpers via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Oct 24 12:28:23 PDT 2022
    
    
  
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc5755f44f0cf: [clang-format] Handle unions like structs and classes (authored by HazardyKnusperkeks).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135872/new/
https://reviews.llvm.org/D135872
Files:
  clang/lib/Format/TokenAnnotator.cpp
Index: clang/lib/Format/TokenAnnotator.cpp
===================================================================
--- clang/lib/Format/TokenAnnotator.cpp
+++ clang/lib/Format/TokenAnnotator.cpp
@@ -3157,7 +3157,7 @@
     return 160;
   if (Left.is(TT_CastRParen))
     return 100;
-  if (Left.isOneOf(tok::kw_class, tok::kw_struct))
+  if (Left.isOneOf(tok::kw_class, tok::kw_struct, tok::kw_union))
     return 5000;
   if (Left.is(tok::comment))
     return 1000;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135872.470255.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221024/2b62d5e8/attachment.bin>
    
    
More information about the cfe-commits
mailing list