zygoloid wrote:

This seems like a corner case of a corner case.

Are there file systems in active use with Clang for which `#include <%...>` or 
`#include <:...>` or `#include <<...>` would be reasonable inclusions? 
@hubert-reinterpretcast Does z/OS have something like that? I think that'd be 
the most likely place.

Even if such file paths exist, how commonly do we perform the "reconstitute a 
header-name token from a sequence of preprocessing-tokens" operation? I think 
this mostly comes up in cases like:
```c++
#if CONFIG_MACRO
#define INCLUDE <foo>
#else
#define INCLUDE <bar>
#endif

#include INCLUDE
```
but in my experience such things are rare and people more often do
```c++
#if CONFIG_MACRO
#include <foo>
#else
#include <bar>
#endif
```
... in order to not confuse simple include / dependency scanner systems.

If the paths aren't common on any system that Clang targets, I don't think it's 
work carrying an extension for this.

https://github.com/llvm/llvm-project/pull/191004
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to