https://github.com/zygoloid requested changes to this pull request.
Sorry, this is fundamentally the wrong approach. When `import` is followed by `<`, we should attempt to form a *header-name* token. For example, ```c++ import <:foo:>; ``` is an import directive; the `<:foo:>` should be lexed as a single token. It doesn't matter if the character after the `<` is a `:` or something else. Instead, we should not recognize a line starting with `import` as an import directive if it's followed by a `<:` token. We also get this wrong for `#include`, for example Clang allows the invalid: ```c++ #define FOO foo> #include <:FOO ``` if the file `:foo` exists, but should instead reject because *header-name-tokens* is required to start with a `<` token, not a `<:` token. https://github.com/llvm/llvm-project/pull/191004 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
