[cfe-dev] Disable #error?
doob at me.com
Wed Jan 15 00:12:56 PST 2014
On 2014-01-15 07:37, Kim Gräsman wrote:
> Yes, I agree that decision does not belong in PPCallbacks. But it's
> tempting! :-)
> Actually, now that I think about it, Jacob's scenario is the exact
> opposite of mine: he seems to be parsing headers in isolation and I
> will always see the private header via its umbrella header.
> For me the #error will never trigger, but that also means I'll never
> get a PPCallback for it. I just want to scan for it and use it to
> connect the private header name to its umbrella.
> For Jacob it triggers all the time, and he doesn't care about it.
> Stripping out the #error before attempting to parse could be a
Exactly. The big problem is that C uses textual include and D uses
symbolic include. I can only translate what's defined in the header file
and not included by other header files. I mean, I don't want to
translate half of the standard C library for each header file. That
means I can't really translate the umbrella header file.
> But it would sure be nice to be able to lean on Clang's parser.
Yeah, I agree.
More information about the cfe-dev