mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added subscribers: cfe-commits, klimek.
`is` type annotations can occur at any nesting level. For example:
function x() {
return function y(): a is B { ... };
}
Breaking before the `is` above breaks TypeScript pars
This revision was automatically updated to reflect the committed changes.
Closed by commit rC332968: clang-format: [JS] do not wrap before any `is`.
(authored by mprobst, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47193?vs=147978&id=147979#toc
Repository:
rC Clang
ht
mprobst added inline comments.
Comment at: lib/Format/BreakableToken.cpp:526
+ 0, Content[LineIndex].find_first_of(Blanks));
+ if (FirstWord == "@param")
+return Style.ContinuationIndentWidth;
Shouldn't this check the set above?
Comme
mprobst added inline comments.
Comment at: unittests/Format/FormatTestComments.cpp:3109
+TEST_F(FormatTestComments, IndentsLongJavadocAnnotatedLines) {
+ FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java);
+ Style.ColumnLimit = 60;
mprobst wrote:
> add a
mprobst accepted this revision.
mprobst added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/Format.cpp:814
+// by qualified identifiers.
+GoogleStyle.CommentPragmas = "(taze:|^/[
\t]*<|@see|@exports|@module|@mods)";
GoogleS
mprobst added inline comments.
Comment at: lib/Format/Format.cpp:814
+// by qualified identifiers.
+GoogleStyle.CommentPragmas = "(taze:|^/[
\t]*<|@see|@exports|@module|@mods)";
GoogleStyle.MaxEmptyLinesToKeep = 3;
krasimir wrote:
> mprobst wrote:
>
mprobst created this revision.
mprobst added a reviewer: krasimir.
Previously, clang-format would crash if it tried to wrap an overlong
single line comment, because two parts of the code inserted a break in
the same location.
/** heregoesalongcommentwithnospace */
This wasn't previously notice
This revision was automatically updated to reflect the committed changes.
Closed by commit rL338706: clang-format: fix a crash in comment wraps.
(authored by mprobst, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D50177
Files:
cfe/trun
mprobst created this revision.
mprobst added a reviewer: krasimir.
Previously, clang-format would avoid breaking before the first `{`
found, but then happily break before subsequent '{'s on the line. This
change fixes that by looking for the first location that has no opening
curly, if any.
Repo
mprobst updated this revision to Diff 158946.
mprobst added a comment.
Also handle multiple numbered list tokens.
Repository:
rC Clang
https://reviews.llvm.org/D50230
Files:
lib/Format/BreakableToken.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
===
This revision was automatically updated to reflect the committed changes.
Closed by commit rC338837: clang-format: [JS] don't break comments before
any '{' (authored by mprobst, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50230?vs=158946&id=158957#toc
Repository:
rC Cl
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a subscriber: cfe-commits.
Previously, clang-format would avoid breaking before the first `{`
found, but then happily break before subsequent '{'s on the line. This
change fixes that by looking for the first location t
This revision was automatically updated to reflect the committed changes.
Closed by commit rC338890: clang-format: [JS] don't break comments before
any '{' (authored by mprobst, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50249?vs=158993&id=159001#toc
Repository:
rC Cl
mprobst created this revision.
mprobst added a reviewer: djasper.
Herald added a subscriber: klimek.
`of` is only a keyword when after an identifier, but not when after
an actual keyword.
Before:
return of (a, b, c);
After:
return of(a, b, c);
Repository:
rC Clang
https://reviews.llvm
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325489: clang-format: [JS] fix `of` detection. (authored by
mprobst, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D43440
Files:
cfe/trunk/lib
mprobst created this revision.
Herald added a subscriber: klimek.
The previous fix to force build style wrapping if the previous token is a
closing parenthesis broke a peculiar pattern where users parenthesize the
function declaration in a bind call:
fn((function() { ... }).bind(this));
This
mprobst updated this revision to Diff 100588.
mprobst added a comment.
- fix comment
https://reviews.llvm.org/D33640
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
==
mprobst updated this revision to Diff 100589.
mprobst added a comment.
- fix comment
https://reviews.llvm.org/D33640
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
==
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304135: clang-format: [JS] fix indenting bound functions.
(authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D33640?vs=100589&id=100591#toc
Repository:
rL LLVM
https://reviews.
mprobst created this revision.
Herald added a subscriber: klimek.
calculateBraceTypes decides for braced init for empty brace pairs ({}). In
context of a function declaration, this incorrectly classifies empty function
or method bodies as braced inits, leading to missing wraps:
class C {
mprobst updated this revision to Diff 100839.
mprobst added a comment.
TODO => FIXME
https://reviews.llvm.org/D33714
Files:
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
===
mprobst updated this revision to Diff 100840.
mprobst added a comment.
- restrict to JS, C++ actually wants this.
https://reviews.llvm.org/D33714
Files:
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
==
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304290: clang-format: [JS] improve calculateBraceType
heuristic (authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D33714?vs=100840&id=100841#toc
Repository:
rL LLVM
https://re
mprobst accepted this revision.
mprobst added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rL LLVM
https://reviews.llvm.org/D33857
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-b
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304791: clang-format: [JS] Correctly Indent Nested
JavaScript Literals. (authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D33857?vs=101296&id=101547#toc
Repository:
rL LLVM
ht
mprobst created this revision.
mprobst added a reviewer: krasimir.
TypeScript uses the `!` token for strict property initialization
assertions, as in:
class X {
strictPropAsserted!: string;
}
Previously, clang-format would wrap between the `!` and the `:` for
overly long lines. This patc
mprobst updated this revision to Diff 150770.
mprobst added a comment.
fix typo in test
Repository:
rC Clang
https://reviews.llvm.org/D48030
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
=
This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334415: clang-format: [JS] strict prop init annotation.
(authored by mprobst, committed by ).
Herald added a subscriber: l
mprobst accepted this revision.
mprobst added a comment.
This revision is now accepted and ready to land.
LGTM.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59527/new/
https://reviews.llvm.org/D59527
___
cfe-commits
mprobst closed this revision.
mprobst added a comment.
Landed as r356447.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59527/new/
https://reviews.llvm.org/D59527
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
mprobst accepted this revision.
mprobst added a comment.
This revision is now accepted and ready to land.
Actually I'll fix the nits.
Comment at: clang/docs/ReleaseNotes.rst:174
-- ...
+- Add support for correct indenting of private fields and methods in
Javascript.
--
mprobst closed this revision.
mprobst added a comment.
Landed in r356449, thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59292/new/
https://reviews.llvm.org/D59292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
mprobst created this revision.
mprobst added a reviewer: mboehme.
Previously:
foo(/*bar=*/baz);
Now:
foo(/*bar=*/ baz);
The run-in parameter naming comment is not intended in JS.
Repository:
rC Clang
https://reviews.llvm.org/D52535
Files:
lib/Format/TokenAnnotator.cpp
unittests/F
This revision was automatically updated to reflect the committed changes.
Closed by commit rL343080: clang-format: [JS] space after parameter naming.
(authored by mprobst, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D52535
Files:
cfe
This revision was automatically updated to reflect the committed changes.
Closed by commit rC343080: clang-format: [JS] space after parameter naming.
(authored by mprobst, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D52535?vs=167073&id=167077#toc
Repository:
rL LLVM
ht
mprobst created this revision.
mprobst added a reviewer: krasimir.
This change adds some rudimentary support for conditional types.
Specifically it avoids breaking before `extends` and `infer` keywords,
which are subject to Automatic Semicolon Insertion, so breaking before
them creates incorrect s
mprobst updated this revision to Diff 167239.
mprobst added a comment.
- comment in test
Repository:
rC Clang
https://reviews.llvm.org/D52536
Files:
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
=
This revision was automatically updated to reflect the committed changes.
Closed by commit rL343179: clang-format: [JS] conditional types. (authored by
mprobst, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D52536
Files:
cfe/trunk/lib/
mprobst created this revision.
Herald added a subscriber: klimek.
Previously, clang-format would try to wrap template string substitutions
by indenting relative to the openening `${`. This helped with
indenting structured strings, such as strings containing HTML, as the
substitutions would be alig
mprobst updated this revision to Diff 112858.
mprobst added a comment.
- clang-format: [JS] wrap calls w/ literals in template strings.
https://reviews.llvm.org/D37142
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
mprobst added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1139
+
+ // On lines containing template strings, propagate NoLineBreak even for dict
+ // and array literals. This is to force wrapping an initial function call if
djasper wrote:
>
mprobst added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1139
+
+ // On lines containing template strings, propagate NoLineBreak even for dict
+ // and array literals. This is to force wrapping an initial function call if
djasper wrote:
>
mprobst updated this revision to Diff 113036.
mprobst added a comment.
- drop function name wrapping hack
https://reviews.llvm.org/D37142
Files:
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
==
mprobst added inline comments.
Comment at: lib/Format/ContinuationIndenter.cpp:1139
+
+ // On lines containing template strings, propagate NoLineBreak even for dict
+ // and array literals. This is to force wrapping an initial function call if
mprobst wrote:
>
This revision was automatically updated to reflect the committed changes.
Closed by commit rL311988: clang-format: [JS] simplify template string
wrapping. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D37142
Files:
cfe/trunk/lib/Format/ContinuationIndenter.cpp
cfe/tr
mprobst created this revision.
mprobst added a reviewer: krasimir.
It's a new primitive for importing symbols, and should be treated like
the (previously handled) `goog.require` and `goog.forwardDeclare`.
Repository:
rC Clang
https://reviews.llvm.org/D56385
Files:
lib/Format/TokenAnnotator
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350516: clang-format: [JS] support goog.requireType.
(authored by mprobst, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.
mprobst marked 2 inline comments as done.
mprobst added inline comments.
Comment at: clang/lib/Format/FormatToken.h:913
bool IsJavaScriptIdentifier(const FormatToken &Tok) const {
-return Tok.is(tok::identifier) &&
- JsExtraKeywords.find(Tok.Tok.getIdentifierInfo
This revision was automatically updated to reflect the committed changes.
mprobst marked an inline comment as done.
Closed by commit rG146d685cd657: clang-format: [JS] detect C++ keywords.
(authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D77311?vs=254741&id=254763#toc
R
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The previous change in https://reviews.llvm.org/D77311 attempted to
detect more C++ keywords. However it also precisely detected all
JavaScript keywords. That's
This revision was automatically updated to reflect the committed changes.
Closed by commit rG92201505cdec: clang-format: [JS] handle pseudo-keywords.
(authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D77548?vs=255314&id=255357#toc
Repository:
rG LLVM Github Monorepo
C
mprobst created this revision.
Herald added a subscriber: klimek.
Automatic Semicolon Insertion in clang-format tries to guess if a line
wrap should insert an implicit semicolong. The previous heuristic would
not trigger ASI if a token was immediately preceded by an `@` sign:
function foo(@Bar
mprobst created this revision.
Herald added a subscriber: klimek.
TypeScript generic type arguments can contain object (literal) types,
which in turn can contain semicolons:
const x: Array<{a: number; b: string;} = [];
Previously, clang-format would incorrectly categorize the braced list as
a
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318973: clang-format: [JS] disable ASI on decorators.
(authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D40410
Files:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/unitt
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318975: clang-format: [JS] handle semis in generic types.
(authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D40424
Files:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/u
mprobst created this revision.
Herald added subscribers: cfe-commits, klimek.
Otherwise automatic semicolon insertion can trigger, i.e. wrapping
produces invalid syntax.
Repository:
rC Clang
https://reviews.llvm.org/D40642
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJ
This revision was automatically updated to reflect the committed changes.
Closed by commit rL319415: clang-format: [JS] do not wrap after async/await.
(authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D40642
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unitte
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a project: clang.
TypeScript 3.4 supports casting into a const type using `as const`:
const x = {x: 1} as const;
Previously, clang-format would insert a space after the `const`. With
this patch, no space is inserte
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5836472ac488: clang-format: [JS] handle `as const`.
(authored by mprobst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66736/new/
https://reviews.llvm.org
mprobst created this revision.
Herald added a subscriber: klimek.
clang-format would previously drop the whitespace after `extends` in code such
as:
class Foo extends {} {}
Where the first set of curly braces is an inline object literal type.
https://reviews.llvm.org/D36131
Files:
lib/Fo
mprobst created this revision.
Herald added a subscriber: klimek.
Formerly, `import {default as X} from y;` would not be recognized as an import.
https://reviews.llvm.org/D36132
Files:
lib/Format/SortJavaScriptImports.cpp
unittests/Format/SortImportsTestJS.cpp
Index: unittests/Format/Sort
mprobst updated this revision to Diff 109078.
mprobst added a comment.
- revert bogus change
https://reviews.llvm.org/D36131
Files:
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
===
mprobst created this revision.
Herald added a subscriber: klimek.
E.g. don't wrap like this:
(foo.bar.baz).and.bam(Blah.of({
}))
But rather:
(foo.bar.baz)
.and.bam(Blah.of({}))
https://reviews.llvm.org/D36139
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.
mprobst created this revision.
Herald added a subscriber: klimek.
In JavaScript, may keywords can be used in method names and thus call sites:
foo.delete();
foo.instanceof();
clang-format would previously insert whitespace after the `instanceof`. This
change generically skips inserting white
mprobst updated this revision to Diff 109089.
mprobst added a comment.
- support switch, case, delete.
https://reviews.llvm.org/D36142
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
==
mprobst created this revision.
Herald added a subscriber: klimek.
Previously, const enums would get formatted differently because the modifier
was not recognized.
https://reviews.llvm.org/D36144
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Forma
mprobst created this revision.
Herald added a subscriber: klimek.
`throw (...)` should have a whitespace following it, as do await and void.
https://reviews.llvm.org/D36146
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
mprobst created this revision.
Herald added a subscriber: klimek.
clang-format would previously fail to detect that an arrow functions parameter
block is not an expression, and thus insert whitespace around the `|` and `&`
type operators in it.
https://reviews.llvm.org/D36147
Files:
lib/For
mprobst created this revision.
Herald added a subscriber: klimek.
`case:` and `default:` would normally parse as labels for a `switch` block.
However in TypeScript, they can be used in field declarations, e.g.:
interface I {
case: string;
}
This change special cases parsing them in decla
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309695: clang-format: [JS] handle object types in extends
positions. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36131
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/t
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309697: clang-format: [JS] support default imports.
(authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D36132?vs=109059&id=109136#toc
Repository:
rL LLVM
https://reviews.llvm.o
mprobst created this revision.
Herald added a subscriber: klimek.
Previously, clang-format would consider the following code line to be part of
the comment and incorrectly format the rest of the file.
https://reviews.llvm.org/D36159
Files:
lib/Format/FormatTokenLexer.cpp
unittests/Format/Fo
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309703: clang-format: [JS] consistenly format enums.
(authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36144
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/F
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309707: clang-format: [JS] handle union types in arrow
functions. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36147
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trun
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309710: clang-format: [JS] whitespace between keywords and
parenthesized expressions. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36146
Files:
cfe/trunk/lib/Format/TokenAnno
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309712: clang-format: [JS] prefer wrapping chains over empty
literals. (authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D36139?vs=109082&id=109155#toc
Repository:
rL LLVM
htt
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310070: clang-format: [JS] support fields with
case/switch/default labels. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36148
Files:
cfe/trunk/lib/Format/UnwrappedLineParser.
mprobst added inline comments.
Comment at: lib/Format/BreakableToken.cpp:688
+ if (DelimitersOnNewline) {
+StringRef TrimmedContent = Content.back().substr(TailOffset).rtrim(Blanks);
+if (!TrimmedContent.empty()) {
Can you add a comment on what this is d
mprobst added a comment.
Friendly ping.
https://reviews.llvm.org/D36159
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mprobst marked an inline comment as done.
mprobst added inline comments.
Comment at: lib/Format/FormatTokenLexer.cpp:544-545
+while (BackslashPos != StringRef::npos) {
+ if (BackslashPos + 1 < FormatTok->TokenText.size() &&
+ FormatTok->TokenText[BackslashPos +
This revision was automatically updated to reflect the committed changes.
mprobst marked 2 inline comments as done.
Closed by commit rL310365: clang-format: [JS] handle single lines comments
ending in `\\`. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36159
Files:
cf
mprobst created this revision.
Herald added a subscriber: klimek.
A closing parenthesis followed by a declaration or statement should always
terminate the current statement.
https://reviews.llvm.org/D36491
Files:
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestJS.cpp
Index:
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310482: clang-format: [JS] detect ASI after closing parens.
(authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36491
Files:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk
mprobst updated this revision to Diff 110959.
mprobst marked 2 inline comments as done.
mprobst added a comment.
- clean up implementation, just use getIdentifierInfo
- clean up tests, remove illegal syntax, add more tests
https://reviews.llvm.org/D36142
Files:
lib/Format/TokenAnnotator.cpp
mprobst added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2355
+(Left.Tok.getIdentifierInfo() ||
+ Left.isOneOf(tok::kw_switch, tok::kw_case, tok::kw_delete)))
+ return false;
djasper wrote:
> Why is instanceof not required in
mprobst created this revision.
Herald added a subscriber: klimek.
clang-format wraps object literal keys in an object literal if they are
marked as `TT_SelectorName`s and/or the colon is marked as
`TT_DictLiteral`. Previously, clang-format would accidentally work
because colons in type aliases wer
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310851: clang-format: [JS] do not insert whitespace in call
positions. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36142
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310852: clang-format: [JS] wrap optional properties in type
aliases. (authored by mprobst).
Repository:
rL LLVM
https://reviews.llvm.org/D36684
Files:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/t
This revision was automatically updated to reflect the committed changes.
Closed by commit rG736a3802124b: clang-format: [JS] tests for async wrapping.
(authored by mprobst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70377/new/
https://reviews.l
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a project: clang.
Including `do`, `for`, and `while`, in addition to the previously
handled fields. The unit test explicitly uses methods, but this code
path handles both fields and methods.
Repository:
rG LLVM Git
mprobst added a comment.
See my comment on the upstream bug, let's chat a bit about whether we need this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91078/new/
https://reviews.llvm.org/D91078
___
cfe-
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a project: clang.
mprobst requested review of this revision.
Before:
a && = b;
After:
a &&= b;
These operators are new additions in ES2021.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D911
mprobst updated this revision to Diff 304069.
mprobst added a comment.
- fix comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91132/new/
https://reviews.llvm.org/D91132
Files:
clang/lib/Format/FormatToken.h
clang/lib/Format/FormatTokenLex
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG16212b8b3e4f: clang-format: [JS] support new assignment
operators. (authored by mprobst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
mprobst added a comment.
For posterity: there was a question whether this is legal syntax in JSDoc in
the first place (e.g. whether it should be escaped). That remains unclear -
Closure Compiler parser however does ignore JSDoc tags if the line does not
start with an `@` tag. So the safe thing
mprobst created this revision.
mprobst added a reviewer: krasimir.
mprobst requested review of this revision.
Herald added a project: clang.
The previous implementation would accidentally still sort the individual
named imports, even if the module reference was in a clang-format off
block.
Repos
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG63042d46bb0c: clang-format: [JS] don't sort named
imports if off. (authored by mprobst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST A
mprobst added inline comments.
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1015
+if (!eof()) {
+ if (Next->is(tok::identifier)) {
+// Peek the next token.
can you add comments explaining what syntax is being detected here?
mprobst accepted this revision.
mprobst added inline comments.
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1001
+ if (TokenPosition < AllTokens.size()) {
+FormatToken *PeekNext = AllTokens[TokenPosition];
+return PeekNext;
nit: just `return AllT
mprobst created this revision.
mprobst added a reviewer: krasimir.
mprobst requested review of this revision.
Herald added a project: clang.
ES2021 allows numeric literals using `_` as a separator. This already
works, but had no test.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.o
1 - 100 of 255 matches
Mail list logo