<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Rewrite/HTMLRewrite.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] Remove unused includes (NFC) (#144285)</title>
<updated>2025-06-16T04:00:36+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-16T04:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c01532177ff61a768d5dc1ea541f9a8d986497fa'/>
<id>c01532177ff61a768d5dc1ea541f9a8d986497fa</id>
<content type='text'>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)"</title>
<updated>2025-05-22T19:52:03+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-05-22T19:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f'/>
<id>13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f</id>
<content type='text'>
This reverts commit e2a885537f11f8d9ced1c80c2c90069ab5adeb1d. Build failures were fixed right away and reverting the original commit without the fixes breaks the build again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e2a885537f11f8d9ced1c80c2c90069ab5adeb1d. Build failures were fixed right away and reverting the original commit without the fixes breaks the build again.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)"</title>
<updated>2025-05-22T19:44:20+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-22T19:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2a885537f11f8d9ced1c80c2c90069ab5adeb1d'/>
<id>e2a885537f11f8d9ced1c80c2c90069ab5adeb1d</id>
<content type='text'>
This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/139584
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/139584
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)</title>
<updated>2025-05-22T19:33:52+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-05-22T19:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e306ad4600c4d3392c194a8be88919ee758425c'/>
<id>9e306ad4600c4d3392c194a8be88919ee758425c</id>
<content type='text'>
The `DiagnosticOptions` class is currently intrusively
reference-counted, which makes reasoning about its lifetime very
difficult in some cases. For example, `CompilerInvocation` owns the
`DiagnosticOptions` instance (wrapped in `llvm::IntrusiveRefCntPtr`) and
only exposes an accessor returning `DiagnosticOptions &amp;`. One would
think this gives `CompilerInvocation` exclusive ownership of the object,
but that's not the case:

```c++
void shareOwnership(CompilerInvocation &amp;CI) {
  llvm::IntrusiveRefCntPtr&lt;DiagnosticOptions&gt; CoOwner = &amp;CI.getDiagnosticOptions();
  // ...
}
```

This is a perfectly valid pattern that is being actually used in the
codebase.

I would like to ensure the ownership of `DiagnosticOptions` by
`CompilerInvocation` is guaranteed to be exclusive. This can be
leveraged for a copy-on-write optimization later on. This PR changes
usages of `DiagnosticOptions` across `clang`, `clang-tools-extra` and
`lldb` to not be intrusively reference-counted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `DiagnosticOptions` class is currently intrusively
reference-counted, which makes reasoning about its lifetime very
difficult in some cases. For example, `CompilerInvocation` owns the
`DiagnosticOptions` instance (wrapped in `llvm::IntrusiveRefCntPtr`) and
only exposes an accessor returning `DiagnosticOptions &amp;`. One would
think this gives `CompilerInvocation` exclusive ownership of the object,
but that's not the case:

```c++
void shareOwnership(CompilerInvocation &amp;CI) {
  llvm::IntrusiveRefCntPtr&lt;DiagnosticOptions&gt; CoOwner = &amp;CI.getDiagnosticOptions();
  // ...
}
```

This is a perfectly valid pattern that is being actually used in the
codebase.

I would like to ensure the ownership of `DiagnosticOptions` by
`CompilerInvocation` is guaranteed to be exclusive. This can be
leveraged for a copy-on-write optimization later on. This PR changes
usages of `DiagnosticOptions` across `clang`, `clang-tools-extra` and
`lldb` to not be intrusively reference-counted.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][clang] Move RewriterBuffer to ADT. (#99770)</title>
<updated>2024-08-18T16:46:51+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-08-18T16:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d150db214e2aa13a825b563c7238e1243d61db1'/>
<id>0d150db214e2aa13a825b563c7238e1243d61db1</id>
<content type='text'>
These classes are not specific to clang and useful for other rewriter
tools (flagged in previous review).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These classes are not specific to clang and useful for other rewriter
tools (flagged in previous review).</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer][HTMLRewriter] Cache partial rewrite results. (#80220)</title>
<updated>2024-02-01T21:07:21+00:00</updated>
<author>
<name>Artem Dergachev</name>
<email>adergachev@apple.com</email>
</author>
<published>2024-02-01T21:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=243bfed68367263cfc3fb3f396660acf60051fbf'/>
<id>243bfed68367263cfc3fb3f396660acf60051fbf</id>
<content type='text'>
This is a follow-up for 721dd3bc2 [analyzer] NFC: Don't regenerate
duplicate HTML reports.

Because HTMLRewriter re-runs the Lexer for syntax highlighting and macro
expansion purposes, it may get fairly expensive when the rewriter is
invoked multiple times on the same file. In the static analyzer (which
uses HTMLRewriter for HTML output mode) we only get away with this
because there are usually very few reports emitted per file. But if loud
checkers are enabled, such as `webkit.*`, this may explode in complexity
and even cause the compiler to run over the 32-bit SourceLocation
addressing limit.

This patch caches intermediate results so that re-lexing only needed to
happen once.

As the clever __COUNTER__ test demonstrates, "once" is still too many.
Ideally we shouldn't re-lex anything at all, which remains a TODO.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow-up for 721dd3bc2 [analyzer] NFC: Don't regenerate
duplicate HTML reports.

Because HTMLRewriter re-runs the Lexer for syntax highlighting and macro
expansion purposes, it may get fairly expensive when the rewriter is
invoked multiple times on the same file. In the static analyzer (which
uses HTMLRewriter for HTML output mode) we only get away with this
because there are usually very few reports emitted per file. But if loud
checkers are enabled, such as `webkit.*`, this may explode in complexity
and even cause the compiler to run over the 32-bit SourceLocation
addressing limit.

This patch caches intermediate results so that re-lexing only needed to
happen once.

As the clever __COUNTER__ test demonstrates, "once" is still too many.
Ideally we shouldn't re-lex anything at all, which remains a TODO.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] LLVM_FALLTHROUGH =&gt; [[fallthrough]]. NFC</title>
<updated>2022-08-08T16:12:46+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-08-08T16:12:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5'/>
<id>3f18f7c0072b642f5fe88d2fb7bb8ccf69a6c6f5</id>
<content type='text'>
With C++17 there is no Clang pedantic warning or MSVC C5051.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D131346
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With C++17 there is no Clang pedantic warning or MSVC C5051.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D131346
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use true/false instead of 1/0 (NFC)</title>
<updated>2022-01-09T08:19:47+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-01-09T08:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=40446663c73831f166c4432edb2997d88fd167a9'/>
<id>40446663c73831f166c4432edb2997d88fd167a9</id>
<content type='text'>
Identified with modernize-use-bool-literals.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with modernize-use-bool-literals.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][clang] Return underlying strings directly instead of OS.str()</title>
<updated>2021-12-10T00:05:46+00:00</updated>
<author>
<name>Logan Smith</name>
<email>logan.r.smith0@gmail.com</email>
</author>
<published>2021-12-09T23:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0cf6f7b128dd457711ba5c0ebfcb8143dc1632f8'/>
<id>0cf6f7b128dd457711ba5c0ebfcb8143dc1632f8</id>
<content type='text'>
This avoids an unnecessary copy required by 'return OS.str()', allowing
instead for NRVO or implicit move. The .str() call (which flushes the
stream) is no longer required since 65b13610a5226b84889b923bae884ba395ad084d,
which made raw_string_ostream unbuffered by default.

Differential Revision: https://reviews.llvm.org/D115374
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids an unnecessary copy required by 'return OS.str()', allowing
instead for NRVO or implicit move. The .str() call (which flushes the
stream) is no longer required since 65b13610a5226b84889b923bae884ba395ad084d,
which made raw_string_ostream unbuffered by default.

Differential Revision: https://reviews.llvm.org/D115374
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Highlight arrows for currently selected event</title>
<updated>2021-08-02T16:15:01+00:00</updated>
<author>
<name>Valeriy Savchenko</name>
<email>vsavchenko@apple.com</email>
</author>
<published>2020-12-09T11:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e02f58780ab8734e5d27a0138bd477d18ae64a1'/>
<id>9e02f58780ab8734e5d27a0138bd477d18ae64a1</id>
<content type='text'>
In some cases, when the execution path of the diagnostic
goes back and forth, arrows can overlap and create a mess.
Dimming arrows that are not relevant at the moment, solves this issue.
They are still visible, but don't draw too much attention.

Differential Revision: https://reviews.llvm.org/D92928
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases, when the execution path of the diagnostic
goes back and forth, arrows can overlap and create a mess.
Dimming arrows that are not relevant at the moment, solves this issue.
They are still visible, but don't draw too much attention.

Differential Revision: https://reviews.llvm.org/D92928
</pre>
</div>
</content>
</entry>
</feed>
