This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6e28b86cc629: AlignConsecutiveDeclarations not working for
'const' keyword in JavsScript (authored by MyDeveloperDay).
Changed prior to commit:
ht
curdeius 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:
> MyDeveloperDay wrote:
> > owenpan wrot
owenpan 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;
MyDeveloperDay wrote:
> owenpan wrote:
> > curdeius wrot
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
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
+// cons
curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.
LGTM! Optional nit comment.
Comment at: clang/lib/Format/TokenAnnotator.cpp:1875
+// const a = in JavaScript.
+if (Style.isJavaScript() && PreviousNotConst->is(to
MyDeveloperDay updated this revision to Diff 395329.
MyDeveloperDay added a comment.
clang-format the file
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115990/new/
https://reviews.llvm.org/D115990
Files:
clang/include/clang/Format/Format.h
clang/lib/Format/TokenAnnotator.cpp
cla
MyDeveloperDay updated this revision to Diff 395291.
MyDeveloperDay added a comment.
Double check the interaction with the AlignConsecutiveAssignments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115990/new/
https://reviews.llvm.org/D115990
Files:
clang/include/clang/Format/Format.h
MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: krasimir, owenpan, HazardyKnusperkeks, curdeius.
MyDeveloperDay added projects: clang, clang-format.
MyDeveloperDay requested review of this revision.
https://github.com/llvm/llvm-project/issues/49846
Fixes #49846
Repository: