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;
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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits