Issue 151271
Summary Regression caused by #143096
Labels new issue
Assignees
Reporter tstellar
    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
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to