<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/unittests/Format/FormatTestJS.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[clang-format] Add BreakAfterOpenBracket* and BreakBeforeCloseBracket* (#108332)</title>
<updated>2025-10-30T19:24:44+00:00</updated>
<author>
<name>Gedare Bloom</name>
<email>gedare@rtems.org</email>
</author>
<published>2025-10-30T19:24:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8067b5cff73ea96189b5bbca1110cfe4dce03552'/>
<id>8067b5cff73ea96189b5bbca1110cfe4dce03552</id>
<content type='text'>
Replace the `AlwaysBreak` and `BlockIndent` suboptions of
`AlignAfterOpenBracket` with new style options `BreakAfterOpenBracket*`
and `BreakBeforeCloseBracket*` for `*` in `BracedList` for braced list
initializers, `if` for if conditional statements, `Loop` for loop
control statements (for/while), `Switch` for switch statements, and
`Function` for function calls/declarations/definitions.

Deprecates `AlwaysBreak` and `BlockIndent`.
 
Fixes #67738 
Fixes #79176 
Fixes #80123 
Fixes #151844
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the `AlwaysBreak` and `BlockIndent` suboptions of
`AlignAfterOpenBracket` with new style options `BreakAfterOpenBracket*`
and `BreakBeforeCloseBracket*` for `*` in `BracedList` for braced list
initializers, `if` for if conditional statements, `Loop` for loop
control statements (for/while), `Switch` for switch statements, and
`Function` for function calls/declarations/definitions.

Deprecates `AlwaysBreak` and `BlockIndent`.
 
Fixes #67738 
Fixes #79176 
Fixes #80123 
Fixes #151844
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Don't test stability if JS format test fails (#136662)</title>
<updated>2025-04-23T04:09:21+00:00</updated>
<author>
<name>Owen Pan</name>
<email>owenpiano@gmail.com</email>
</author>
<published>2025-04-23T04:09:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=afc030dd30e377ca7bf225a97179fa1b64eedd28'/>
<id>afc030dd30e377ca7bf225a97179fa1b64eedd28</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Handle C++ keywords in other languages better (#132941)</title>
<updated>2025-04-10T12:51:10+00:00</updated>
<author>
<name>sstwcw</name>
<email>su3e8a96kzlver@posteo.net</email>
</author>
<published>2025-04-10T12:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed858220276dd11f6c2d7a5d3e357c211f9c6190'/>
<id>ed858220276dd11f6c2d7a5d3e357c211f9c6190</id>
<content type='text'>
There is some code to make sure that C++ keywords that are identifiers
in the other languages are not treated as keywords.  Right now, the kind
is set to identifier, and the identifier info is cleared.  The latter is
probably so that the code for identifying C++ structures does not
recognize those structures by mistake when formatting a language that
does not have those structures.  But we did not find an instance where
the language can have the sequence of tokens, the code tries to parse
the structure as if it is C++ using the identifier info instead of the
token kind, but without checking for the language setting.  However,
there are places where the code checks whether the identifier info field
is null or not.  They are places where an identifier and a keyword are
treated the same way.  For example, the name of a function in
JavaScript.  This patch removes the lines that clear the identifier
info.  This way, a C++ keyword gets treated in the same way as an
identifier in those places.

JavaScript

New

```JavaScript
async function
union(
    myparamnameiswaytooloooong) {
}
```

Old

```JavaScript
async function
    union(
        myparamnameiswaytooloooong) {
}
```

Java

New

```Java
enum union { ABC, CDE }
```

Old

```Java
enum
union { ABC, CDE }
```

This reverts commit 97dcbdef6089175c45e14fcbcf5c88b10233a79a.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is some code to make sure that C++ keywords that are identifiers
in the other languages are not treated as keywords.  Right now, the kind
is set to identifier, and the identifier info is cleared.  The latter is
probably so that the code for identifying C++ structures does not
recognize those structures by mistake when formatting a language that
does not have those structures.  But we did not find an instance where
the language can have the sequence of tokens, the code tries to parse
the structure as if it is C++ using the identifier info instead of the
token kind, but without checking for the language setting.  However,
there are places where the code checks whether the identifier info field
is null or not.  They are places where an identifier and a keyword are
treated the same way.  For example, the name of a function in
JavaScript.  This patch removes the lines that clear the identifier
info.  This way, a C++ keyword gets treated in the same way as an
identifier in those places.

JavaScript

New

```JavaScript
async function
union(
    myparamnameiswaytooloooong) {
}
```

Old

```JavaScript
async function
    union(
        myparamnameiswaytooloooong) {
}
```

Java

New

```Java
enum union { ABC, CDE }
```

Old

```Java
enum
union { ABC, CDE }
```

This reverts commit 97dcbdef6089175c45e14fcbcf5c88b10233a79a.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang-format] Handle C++ keywords in other languages better (#132941)"</title>
<updated>2025-04-02T01:59:12+00:00</updated>
<author>
<name>Owen Pan</name>
<email>owenpiano@gmail.com</email>
</author>
<published>2025-04-02T01:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=97dcbdef6089175c45e14fcbcf5c88b10233a79a'/>
<id>97dcbdef6089175c45e14fcbcf5c88b10233a79a</id>
<content type='text'>
This reverts commit ab7cee8a0ecf29fdb47c64c8d431a694d63390d2 which had
formatting errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ab7cee8a0ecf29fdb47c64c8d431a694d63390d2 which had
formatting errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Handle C++ keywords in other languages better (#132941)</title>
<updated>2025-03-31T13:54:49+00:00</updated>
<author>
<name>sstwcw</name>
<email>su3e8a96kzlver@posteo.net</email>
</author>
<published>2025-03-25T14:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab7cee8a0ecf29fdb47c64c8d431a694d63390d2'/>
<id>ab7cee8a0ecf29fdb47c64c8d431a694d63390d2</id>
<content type='text'>
There is some code to make sure that C++ keywords that are identifiers
in the other languages are not treated as keywords.  Right now, the kind
is set to identifier, and the identifier info is cleared.  The latter is
probably so that the code for identifying C++ structures does not
recognize those structures by mistake when formatting a language that
does not have those structures.  But we did not find an instance where
the language can have the sequence of tokens, the code tries to parse
the structure as if it is C++ using the identifier info instead of the
token kind, but without checking for the language setting.  However,
there are places where the code checks whether the identifier info field
is null or not.  They are places where an identifier and a keyword are
treated the same way.  For example, the name of a function in
JavaScript.  This patch removes the lines that clear the identifier
info.  This way, a C++ keyword gets treated in the same way as an
identifier in those places.

JavaScript

New

```JavaScript
async function
union(
    myparamnameiswaytooloooong) {
}
```

Old

```JavaScript
async function
    union(
        myparamnameiswaytooloooong) {
}
```

Java

New

```Java
enum union { ABC, CDE }
```

Old

```Java
enum
union { ABC, CDE }
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is some code to make sure that C++ keywords that are identifiers
in the other languages are not treated as keywords.  Right now, the kind
is set to identifier, and the identifier info is cleared.  The latter is
probably so that the code for identifying C++ structures does not
recognize those structures by mistake when formatting a language that
does not have those structures.  But we did not find an instance where
the language can have the sequence of tokens, the code tries to parse
the structure as if it is C++ using the identifier info instead of the
token kind, but without checking for the language setting.  However,
there are places where the code checks whether the identifier info field
is null or not.  They are places where an identifier and a keyword are
treated the same way.  For example, the name of a function in
JavaScript.  This patch removes the lines that clear the identifier
info.  This way, a C++ keyword gets treated in the same way as an
identifier in those places.

JavaScript

New

```JavaScript
async function
union(
    myparamnameiswaytooloooong) {
}
```

Old

```JavaScript
async function
    union(
        myparamnameiswaytooloooong) {
}
```

Java

New

```Java
enum union { ABC, CDE }
```

Old

```Java
enum
union { ABC, CDE }
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Detect nesting in template strings (#119989)</title>
<updated>2024-12-17T16:05:01+00:00</updated>
<author>
<name>Gedare Bloom</name>
<email>gedare@rtems.org</email>
</author>
<published>2024-12-17T16:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=57c161a6479fb70a31553e2f9bc1efa46262aa92'/>
<id>57c161a6479fb70a31553e2f9bc1efa46262aa92</id>
<content type='text'>
The helper to check if a token is in a template string scans too far
backward. It should stop if a different scope is found.

Fixes #107571</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The helper to check if a token is in a template string scans too far
backward. It should stop if a different scope is found.

Fixes #107571</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format][NFC] Add a TypeScript test case</title>
<updated>2024-12-15T03:42:43+00:00</updated>
<author>
<name>Owen Pan</name>
<email>owenpiano@gmail.com</email>
</author>
<published>2024-12-15T03:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8c681a929b8684f5a4ad2ebd4e3e4f20036a9595'/>
<id>8c681a929b8684f5a4ad2ebd4e3e4f20036a9595</id>
<content type='text'>
See #108530.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See #108530.
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Fix regression in BAS_AlwaysBreak for-await (#108634)</title>
<updated>2024-09-19T02:44:09+00:00</updated>
<author>
<name>Gedare Bloom</name>
<email>gedare@rtems.org</email>
</author>
<published>2024-09-19T02:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c9aa9d53b6f92d9780430ab8239ea9117574c95d'/>
<id>c9aa9d53b6f92d9780430ab8239ea9117574c95d</id>
<content type='text'>
Fixes #108589.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #108589.</pre>
</div>
</content>
</entry>
<entry>
<title>[Format] Dont treat LBrace after extends/implements as initializer list (#108524)</title>
<updated>2024-09-16T18:18:39+00:00</updated>
<author>
<name>kadir çetinkaya</name>
<email>kadircet@google.com</email>
</author>
<published>2024-09-16T18:18:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04d71ea11ba84d989faed4572ee54265386851f6'/>
<id>04d71ea11ba84d989faed4572ee54265386851f6</id>
<content type='text'>
This extends the fix in https://github.com/llvm/llvm-project/pull/106242
for other derived class types.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This extends the fix in https://github.com/llvm/llvm-project/pull/106242
for other derived class types.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang-format] Fix regressions in BAS_AlwaysBreak (#107506)</title>
<updated>2024-09-12T02:34:54+00:00</updated>
<author>
<name>Owen Pan</name>
<email>owenpiano@gmail.com</email>
</author>
<published>2024-09-12T02:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8168088f0a9015bc6d930e8bc1c639dee06ca82c'/>
<id>8168088f0a9015bc6d930e8bc1c639dee06ca82c</id>
<content type='text'>
Fixes #107401.
Fixes #107574.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #107401.
Fixes #107574.</pre>
</div>
</content>
</entry>
</feed>
