<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Analysis/ReachableCode.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>[Analysis] Use range-based for loops (NFC) (#146466)</title>
<updated>2025-07-02T02:38:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-07-02T02:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb07f0d4a933d18dbf9f606d533baced2a1a19ca'/>
<id>eb07f0d4a933d18dbf9f606d533baced2a1a19ca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Analysis] Remove unused includes (NFC) (#142255)</title>
<updated>2025-05-31T22:03:49+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-31T22:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bbb3d2177485ea4e182c369663e68f790881f557'/>
<id>bbb3d2177485ea4e182c369663e68f790881f557</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>Revert "Reapply "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression" (#127338)" (#128205)</title>
<updated>2025-02-21T17:19:01+00:00</updated>
<author>
<name>yronglin</name>
<email>yronglin777@gmail.com</email>
</author>
<published>2025-02-21T17:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7c7fb9442f9f3ca1cf302ca2ff2906de7452a846'/>
<id>7c7fb9442f9f3ca1cf302ca2ff2906de7452a846</id>
<content type='text'>
This reverts commit d235b72178adc710bf704078fbe0cd687642f3e0.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d235b72178adc710bf704078fbe0cd687642f3e0.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression" (#127338)</title>
<updated>2025-02-16T16:36:08+00:00</updated>
<author>
<name>yronglin</name>
<email>yronglin777@gmail.com</email>
</author>
<published>2025-02-16T16:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d235b72178adc710bf704078fbe0cd687642f3e0'/>
<id>d235b72178adc710bf704078fbe0cd687642f3e0</id>
<content type='text'>
This PR reapply https://github.com/llvm/llvm-project/pull/117437.
The issue has been fixed by the 2nd commit, we need to ignore parens in
CXXDefaultArgExpr when build CFG, because CXXDefaultArgExpr::getExpr
stripped off the top level FullExpr and ConstantExpr, ParenExpr may
occurres in the top level.

---------

Signed-off-by: yronglin &lt;yronglin777@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR reapply https://github.com/llvm/llvm-project/pull/117437.
The issue has been fixed by the 2nd commit, we need to ignore parens in
CXXDefaultArgExpr when build CFG, because CXXDefaultArgExpr::getExpr
stripped off the top level FullExpr and ConstantExpr, ParenExpr may
occurres in the top level.

---------

Signed-off-by: yronglin &lt;yronglin777@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (#117437)"</title>
<updated>2025-02-03T14:52:04+00:00</updated>
<author>
<name>Hans Wennborg</name>
<email>hans@chromium.org</email>
</author>
<published>2025-02-03T14:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=90e0dd15ff070b5b4b1bb068cdade7f5b5e6ccec'/>
<id>90e0dd15ff070b5b4b1bb068cdade7f5b5e6ccec</id>
<content type='text'>
This caused assertion failures:

  clang/lib/Analysis/CFG.cpp:822:
  void (anonymous namespace)::CFGBuilder::appendStmt(CFGBlock *, const Stmt *):
  Assertion `!isa&lt;Expr&gt;(S) || cast&lt;Expr&gt;(S)-&gt;IgnoreParens() == S' failed.

See comment on the PR.

This reverts commit 44aa618ef67d302f5ab77cc591fb3434fe967a2e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This caused assertion failures:

  clang/lib/Analysis/CFG.cpp:822:
  void (anonymous namespace)::CFGBuilder::appendStmt(CFGBlock *, const Stmt *):
  Assertion `!isa&lt;Expr&gt;(S) || cast&lt;Expr&gt;(S)-&gt;IgnoreParens() == S' failed.

See comment on the PR.

This reverts commit 44aa618ef67d302f5ab77cc591fb3434fe967a2e.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (#117437)</title>
<updated>2025-02-01T08:58:05+00:00</updated>
<author>
<name>yronglin</name>
<email>yronglin777@gmail.com</email>
</author>
<published>2025-02-01T08:58:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=44aa618ef67d302f5ab77cc591fb3434fe967a2e'/>
<id>44aa618ef67d302f5ab77cc591fb3434fe967a2e</id>
<content type='text'>
Clang currently support extending lifetime of object bound to reference
members of aggregates, that are created from default member initializer.
This PR address this change and updaye CFG and ExprEngine.

This PR reapply https://github.com/llvm/llvm-project/pull/91879.
Fixes https://github.com/llvm/llvm-project/issues/93725.

---------

Signed-off-by: yronglin &lt;yronglin777@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clang currently support extending lifetime of object bound to reference
members of aggregates, that are created from default member initializer.
This PR address this change and updaye CFG and ExprEngine.

This PR reapply https://github.com/llvm/llvm-project/pull/91879.
Fixes https://github.com/llvm/llvm-project/issues/93725.

---------

Signed-off-by: yronglin &lt;yronglin777@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)</title>
<updated>2024-11-15T07:04:08+00:00</updated>
<author>
<name>Sirraide</name>
<email>aeternalmail@gmail.com</email>
</author>
<published>2024-11-15T07:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dde802b153d5cb41505bf4d377be753576991297'/>
<id>dde802b153d5cb41505bf4d377be753576991297</id>
<content type='text'>
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysis` to inherit from DRAV instead. This is over half of the
visitors that inherit from RAV directly.

See also #115132, #110040, #93462

LLVM Compile-Time Tracker link for this branch:
https://llvm-compile-time-tracker.com/compare.php?from=5adb5c05a2e9f31385fbba8b0436cbc07d91a44d&amp;to=b58e589a86c06ba28d4d90613864d10be29aa5ba&amp;stat=instructions%3Au</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysis` to inherit from DRAV instead. This is over half of the
visitors that inherit from RAV directly.

See also #115132, #110040, #93462

LLVM Compile-Time Tracker link for this branch:
https://llvm-compile-time-tracker.com/compare.php?from=5adb5c05a2e9f31385fbba8b0436cbc07d91a44d&amp;to=b58e589a86c06ba28d4d90613864d10be29aa5ba&amp;stat=instructions%3Au</pre>
</div>
</content>
</entry>
<entry>
<title>[coroutine] Suppress unreachable-code warning on coroutine statements. (#77454)</title>
<updated>2024-02-05T07:55:27+00:00</updated>
<author>
<name>Haojian Wu</name>
<email>hokein.wu@gmail.com</email>
</author>
<published>2024-02-05T07:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a73baf620b8374805b7e927cc79cc157a30e0ac8'/>
<id>a73baf620b8374805b7e927cc79cc157a30e0ac8</id>
<content type='text'>
This fixes #69219.

Consider an example:

```
CoTask my_coroutine() {
    std::abort();
    co_return 1; // unreachable code warning.
}
```

Clang emits a CFG-based unreachable warning on the `co_return` statement
(precisely the `1` subexpr). If we remove this statement, the program
semantic is changed (my_coroutine is not a coroutine anymore).

This patch fixes this issue by never considering coroutine statements as
dead statements.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes #69219.

Consider an example:

```
CoTask my_coroutine() {
    std::abort();
    co_return 1; // unreachable code warning.
}
```

Clang emits a CFG-based unreachable warning on the `co_return` statement
(precisely the `1` subexpr). If we remove this statement, the program
semantic is changed (my_coroutine is not a coroutine anymore).

This patch fixes this issue by never considering coroutine statements as
dead statements.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Sema] Avoid duplicate diagnostics for unreachable fallthrough attribute</title>
<updated>2023-03-14T12:43:35+00:00</updated>
<author>
<name>Takuya Shimizu</name>
<email>shimizu2486@gmail.com</email>
</author>
<published>2023-03-14T12:43:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de401ac2a4ab74392b8234aa3a517481a1e2762c'/>
<id>de401ac2a4ab74392b8234aa3a517481a1e2762c</id>
<content type='text'>
This patch checks whether -Wunreachable-code-fallthrough is enabled
when clang encounters unreachable fallthrough attributes and, if so,
suppresses code will never be executed warning to avoid duplicate
warnings.

Fixes https://github.com/llvm/llvm-project/issues/60416
Differential Revision: https://reviews.llvm.org/D145842
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch checks whether -Wunreachable-code-fallthrough is enabled
when clang encounters unreachable fallthrough attributes and, if so,
suppresses code will never be executed warning to avoid duplicate
warnings.

Fixes https://github.com/llvm/llvm-project/issues/60416
Differential Revision: https://reviews.llvm.org/D145842
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use std::optional instead of llvm::Optional (NFC)</title>
<updated>2023-01-14T20:31:01+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-01-14T20:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6ad0788c332bb2043142954d300c49ac3e537f34'/>
<id>6ad0788c332bb2043142954d300c49ac3e537f34</id>
<content type='text'>
This patch replaces (llvm::|)Optional&lt; with std::optional&lt;.  I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces (llvm::|)Optional&lt; with std::optional&lt;.  I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</pre>
</div>
</content>
</entry>
</feed>
