[PATCH] D147839: [clang] Add test for CWG2007
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 10 17:20:03 PDT 2023
shafik added inline comments.
================
Comment at: clang/test/CXX/drs/dr20xx.cpp:20
+// FIXME: the following code shouldn't instantiate A<void>.
+// int b = (&b2)->foo;
+}
----------------
Endill wrote:
> shafik wrote:
> > shafik wrote:
> > > It looks like gcc and MSVC also instantiate `A<void>` for this case: https://godbolt.org/z/8W8eYoa38
> > >
> > > I have to think about it some more but if we believe clang is wrong here, you should file a bug report.
> > I think [unary &](https://eel.is/c++draft/over.match.oper#3.3) is triggering the instantiation.
> Does it mean that we should craft a better example?
Yes, we need a better example, something like this will work, maybe something like:
```cpp
B<A<void> > arr[2];
auto x = arr->foo;```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147839/new/
https://reviews.llvm.org/D147839
More information about the cfe-commits
mailing list