[PATCH] D130511: [pseudo][wip] Eliminate simple-type-specifier ambiguities.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 13:58:27 PDT 2022
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
More information about the cfe-commits
mailing list