[clang] [clang-format] modified goto bool to enum (PR #65140)
Devansh Varshney देवांश वार्ष्णेय via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 4 09:37:21 PDT 2023
================
@@ -2432,9 +2431,25 @@ struct FormatStyle {
/// label2: label2:
/// return 1; return 1;
/// } }
+ ///
+ /// GLI_HalfIndent:
+ /// int f() {
+ /// if (foo()) {
+ /// label1:
+ /// bar();
+ /// }
+ /// label2:
+ /// return 1;
+ /// }
/// \endcode
/// \version 10
- bool IndentGotoLabels;
+ enum GotoLabelIndentation {
+ GLI_None, // Do not indent goto labels.
+ GLI_Indent, // Indent goto labels at the same level as the surrounding code.
+ GLI_HalfIndent, // Indent goto labels at a half indent level.
----------------
varshneydevansh wrote:
I am testing the changes
https://github.com/llvm/llvm-project/pull/65140
More information about the cfe-commits
mailing list