Issue 147000
Summary [Clang] Duplicate diagnostics in C++20+ mode: incomplete type in nested name specifier
Labels clang:diagnostics
Assignees
Reporter zwuis
    Clang emits duplicate diagnostics when compiling the following code in C++20+ mode:

```cpp
struct incomplete;
incomplete::type var;
```

Output:

```txt
<source>:2:1: error: incomplete type 'incomplete' named in nested name specifier
    2 | incomplete::type var;
      | ^~~~~~~~~~~~
<source>:1:8: note: forward declaration of 'incomplete'
    1 | struct incomplete;
      |        ^
<source>:2:1: error: incomplete type 'incomplete' named in nested name specifier
    2 | incomplete::type var;
      | ^~~~~~~~~~~~
<source>:1:8: note: forward declaration of 'incomplete'
    1 | struct incomplete;
      |        ^
```

Compiler Explorer: https://godbolt.org/z/fPo1W7c1n
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to