<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/151271>151271</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Regression caused by #143096
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tstellar
</td>
</tr>
</table>
<pre>
I've found a regression caused by #143096, it triggers a static_assert in the webkitgtk code base:
```
repro.ii:19:21: error: static assertion failed due to requirement '!std::is_same_v<WebCore::SVGCircleElement, WebCore::SVGCircleElement>': Element should use fast property path
19 | static_assert(!std::is_same_v<OwnerType, SVGCircleElement>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repro.ii:22:40: note: in instantiation of member function 'WebCore::SVGPropertyOwnerRegistry<WebCore::SVGCircleElement>::fastAnimatedPropertyLookup' requested here
22 | int synchronize(const int &) const { fastAnimatedPropertyLookup; }
| ^
repro.ii:25:46: note: in instantiation of member function 'WebCore::SVGPropertyOwnerRegistry<WebCore::SVGCircleElement>::synchronize' requested here
25 | SVGPropertyOwnerRegistry<SVGCircleElement> isKnownAttribute;
|
```
Here is a reduced test case:
```
namespace std {
template <typename _Tp, typename _Up>
constexpr bool is_same_v = __is_same(_Tp, _Up);
}
namespace WebCore {
struct SVGPropertyRegistry {
virtual int synchronize(const int &) const;
};
class SVGCircleElement;
template <typename T>
concept HasFastPropertyForAttribute =
requires(T element, int name) { element.propertyForAttribute(name); };
template <typename OwnerType>
struct SVGPropertyOwnerRegistry : SVGPropertyRegistry {
static void fastAnimatedPropertyLookup() {
if constexpr (HasFastPropertyForAttribute<OwnerType>)
;
else
static_assert(!std::is_same_v<OwnerType, SVGCircleElement>,
"Element should use fast property path");
}
int synchronize(const int &) const { fastAnimatedPropertyLookup; }
};
void svgAttributeChanged() {
SVGPropertyOwnerRegistry<SVGCircleElement> isKnownAttribute;
}
class SVGCircleElement {
friend SVGPropertyOwnerRegistry<SVGCircleElement>;
void propertyForAttribute(int);
};
} // namespace WebCore
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzEVl-P6rYT_TTmZXRRYhOSPOQhyy6_-1Mrtbrdto_ISYbgbrBTe8KWPvSzVzZZuHCBbqWVGkUi8Z_xmTNzDpHOqVYjFix5YMnjRA60MbYgR9h10k4q0-yL_zOe7hDWZtANSLDYWnROGQ21HBw2UO2BcRHPRJTPGV-AIiCr2hatAwmOJKl6JZ1DS6A00AbhFasXRS29QG0ahEo6ZKJkUbjn0XhHpcXemqlSTJRxzkTJYyZKQGuN9Q-H2HCI7RGtpeqwgWZAIAMWfx-UxS1qAsZTxmNHjT9HlMqtnNziasfE4lesFsbiYeKnX_63ULbu8KkLG31C9xeIJx9blDAOgNuYoWtgcAhr6Qh6a3q0tIde0oZFJQDEObB0cc4N49kthD-8arTP-x49mqsAFoe4ACEuS57-ev91zjPnTJSzyCekDfmkfdGUdiQ1KRloNmvY4rZCC-tB12GI8fSSph_HvAP6L9gqR3b_j3yLp8OEp67UaisJm7dI3xvzMvSMp6G06Agb2KDFQ_Kch-QBlC_CXtcba7T6ExnPaqMdhXHG54zncBhg6QPcOUc8AEsfL5m9oCvxdM3_c7rO8r3BTzLyc-ewK_FBue-0edUlkVXV4HN8OOPk6nUhZBaVn9EiKBcspBlqbIDQEdS3tK_lFl0vawRHjS8Vi0rCbd9JQmBiQfse_RpYPfdeF6f3n3tPS1SGIuMfvYXKmA6OigImHmG1Gt8Zz8YIfiPPD-kdCn_CMFZhxOHIDjV9TeQbh-MCgJ2yNMju3c14OjY81J107orWb7LwfMy5xp7gs3RL6egN3tLYY_18-mMBR4d0jGfPgCfH8-B04CYPIhmnpv2VcIxn49I3wdwGeTKyAPZbGs_6Ebya7nE8-v_OqOaejr2x5sdNAGoNp9ZgPLvD1Zn5eqPNT61_lAF2Lkjsg-2ccf6-vxTOj20LR8f6cBM8VjbQ7XbtkaTFRu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