<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64520>64520</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
CXXConstructorDecl::isDelegatingConstructor fails to detect delegating constructor
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
clang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
PiotrZSL
</td>
</tr>
</table>
<pre>
Example:
```
struct A {
A() : A(42) {}
explicit A(int value) : value_(value) {}
int value_;
};
template <typename T>
struct C {
C() : C(T()) {}
explicit C(T value) : value_(value) {}
T value_;
};
```
AST:
```
| |-CXXConstructorDecl 0x55f1964ac568 <line:586:5, col:18> col:5 A<T> 'void ()' implicit-inline
| | |-CXXCtorInitializer 'A<T>':'A<T>'
| | | `-ParenListExpr 0x55f1964ac888 <col:12, col:15> 'NULL TYPE'
| | | `-IntegerLiteral 0x55f1964ac868 <col:13> 'int' 42
| | `-CompoundStmt 0x55f1964ac918 <col:17, col:18>
```
Instead looks like initializer is being marked as base initializer.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlN9r-zYUxf-a6xeRYEv--eAH10mgEEahGXR7KbJ942iVJSPJJd1fP-w4jdN1HV8Iiq5ydHQ_RyLcWtEqxByiB4g2Hh_cSZv8SWhn_nzee5VuPvLtmXe9RGAF-BvwC4j9-TOVxDoz1I4UBJKHeYkQUgBNgWYEWDHNQzpVyQMkm5sKz70UtXCTRChH3rkc8LpvKl6BprfVL_s_t7wC-zx8VFyr65rDrpfcIQFWuo8eFe-QHIBtr4KZorynKBcU4_xwqX9EmXS_CnL4H4z7zC9j8Xz4z0shkIwo5ap8eSm1utBps8FaEv8cRccgi0NeR3E6JiKFGu83SuNxBFqSWktgRZAC287ziBTAyjEyAjR516Ih1zASIroL_EqoyWvRxH0rTptHJZzgUvyNZnS6ugJNRpr7he98CMT-6okbVHth3fbcmyVRmk5Ec_90wRLNrf_2-35PDn88_XzAo3LYotkLh4bfZZbGyxPY7CqUG4MI6TeWsb8qddfrQTXPrnNLsyxYmiVfov_h8h-VdcgbIrV-s0SKNyRiEaywpEKhWtJx84YN4ZZU3N5p1l6TsyZjGfcwD-IsCJMkiwLvlKdJwlK_CqP0WDNaH5sgC-Oq4hz9OEuOkSdy6lPmp37qx1EWBGukccUbmkX1MWyqJoDQx44LuZbyvVtr03rC2gHzOIyo70leobTTnw6l1dACHe8JKK0lVy2w4mi0cqia8Ydo45l8tFlVQ2sh9KWwzt6MnXAS838_8_ExsULYDUpsuROqXQjIkQtpidOkQYe1I82nitQ3mTcYmZ-c6-30NHdAd61wp6Fa17oDuhubmL9WvdF_Ye2A7iZUC3Q30f4TAAD__wBGgUQ">