[PATCH] D115990: AlignConsecutiveDeclarations not working for 'const' keyword in JavsScript

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 19 22:13:53 PST 2021


owenpan added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1839
+        PreviousNotConst = PreviousNotConst->getPreviousNonComment();
+    }
 
----------------
Remove braces.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1875
+    // const a = in JavaScript.
+    if (Style.isJavaScript() && PreviousNotConst->is(tok::kw_const))
+      return true;
----------------
curdeius wrote:
> Nit.
+1


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115990/new/

https://reviews.llvm.org/D115990



More information about the cfe-commits mailing list