shafik added a comment.
Herald added a project: All.
Herald added a reviewer: rymiel.
Is this change still relevant or can we close this?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117197/new/
https://reviews.llvm.org/D117197
___
mprobst added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3522
+ if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) ||
+ (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) &&
+ Right.is(TT_JsTypeOperator))
curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.
Looks ok from my side.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117197/new/
https://reviews.llvm.org/D117197
___
cfe-commits
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3522
+ if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) ||
+ (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) &&
+ Right.is(TT_JsTypeOperator))
mprobst added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3522
+ if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) ||
+ (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) &&
+ Right.is(TT_JsTypeOperator))
MyDeveloperDay updated this revision to Diff 399922.
MyDeveloperDay marked 10 inline comments as done.
MyDeveloperDay added a comment.
Make suggested improvements
Add additional test case
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117197/new/
https://reviews.llvm.org/D117197
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
return false;
mprobst wrote:
> curdeius wrote:
> > HazardyKnusperkeks
curdeius added inline comments.
Comment at: clang/unittests/Format/FormatTestJS.cpp:1705-1713
verifyFormat("let x: {x: number|null} = {x: number | null};");
verifyFormat("let nested: {x: {y: number|null}};");
verifyFormat("let mixed: {x: [number|null, {w: number}]};");
mprobst added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
return false;
curdeius wrote:
> HazardyKnusperkeks wrote:
> > mprobst wrote:
> > >
curdeius requested changes to this revision.
curdeius added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524-3525
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
curdeius added inline comments.
Comment at: clang/unittests/Format/FormatTestJS.cpp:1708-1713
verifyFormat("class X {\n"
" contructor(x: {\n"
"a: a|null,\n"
"b: b|null,\n"
" }) {}\n"
curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.
LGTM apart from nits.
I agree though that spaceRequired(Before|Between) need some refactoring love.
Comment at: clang/docs/ReleaseNotes.rst:327
+- Option
HazardyKnusperkeks added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3475
return false;
+if (Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier() ||
+(Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) &&
Be
mprobst added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
return false;
MyDeveloperDay wrote:
> mprobst wrote:
> > shouldn't you change this
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
return false;
mprobst wrote:
> shouldn't you change this line here?
You
mprobst added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3524
return false;
if (Left.is(TT_JsTypeOperator) || Right.is(TT_JsTypeOperator))
return false;
shouldn't you change this line here?
Repository:
rG LLVM Github
MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: mprobst, krasimir, HazardyKnusperkeks,
curdeius, owenpan.
MyDeveloperDay added projects: clang, clang-format.
MyDeveloperDay requested review of this revision.
https://github.com/llvm/llvm-project/issues/49858
The following
17 matches
Mail list logo