[clang] [clang] Reject __super when preceded by a scope specifier (PR #221492)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 22:29:32 PDT 2026
================
@@ -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}}
----------------
AZero13 wrote:
I'll add them tomorrow.
https://github.com/llvm/llvm-project/pull/221492
More information about the cfe-commits
mailing list