sammccall added a comment. My main concern here is that this might reject valid code (and if it doesn't, it's not obvious why).
It does look like C++ forbids the cases I can come up with (e.g. trying to provide a definition for `::Foo` is rejected by clang with "definition or redeclaration of Foo cannot name the global scope). But I'd be way more comfortable if we could connect the specific guard rules here with spec language. If we can't do this rigorously and merely are trying to encourage the *common* parse, then we should do it in soft disambig. I'd like to think about this some more, do you know what part of the spec says that `x ::y` is invalid if x is e.g. a typedef for `int`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130511/new/ https://reviews.llvm.org/D130511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits