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

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 20 03:10:34 PST 2021


MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1875
+    // const a = in JavaScript.
+    if (Style.isJavaScript() && PreviousNotConst->is(tok::kw_const))
+      return true;
----------------
owenpan wrote:
> curdeius wrote:
> > Nit.
> +1
I WILL make the change, but just my 2c worth, when a complex expression is on the last line (as was before), it's a bu***er to debug! I personally use this style so I can just drop a breakpoint on the return and I know its being hit for that case, in clang-format where these functions are called over and over again that's super important... (that's my defend your honour!)


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

https://reviews.llvm.org/D115990



More information about the cfe-commits mailing list