================
@@ -21,6 +21,13 @@ struct Base1 {
typedef int XXX;
};
+struct InvalidGlobalQualifier : Base1 {
+ // A parser that drops the global qualifier is left with the valid
+ // declaration `__super::XXX x;` and accepts this line silently; expecting
+ // a diagnostic here catches that even in builds without assertions.
+ ::__super::XXX x; // expected-error {{expected unqualified-id}}
----------------
shafik wrote:
I would have liked to see more test cases like:
```cpp
struct SS : S {
using ::__super::;
void f(::__super::);
};
```
or
```cpp
struct S {};
struct SS : __super::S {};
```
https://github.com/llvm/llvm-project/pull/221492
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits