[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Disable #error?
From:       Justin Bogner <mail () justinbogner ! com>
Date:       2014-01-25 1:55:00
Message-ID: m2bnz0ddvv.fsf () chronotis ! apple ! com
[Download RAW message or body]

Jacob Carlborg <doob@me.com> writes:
> On 2014-01-23 21:11, Sean Silva wrote:
>
>> There is no main_preprocessed.h as far as clang is concerned (unless you
>> manually create it, but then clang leaves #line's to keep track of where
>> things are from).
>
> I was just for illustration.
>
>> If you look at the SourceLocation for `struct List`, it will tell you
>> that the declaration is in
>> `/home/foo/libcollection/__include/collection/list/list.h`.
>
> I seem to have very hard time to explain myself here. Perhaps I'm
> missing something obvious here but how do I know that
> "/home/foo/libcollection/include/collection/list/list.h" is not in the
> in the "/home/foo/libmain" path?

Could you do something like:

1. Make a list of the headers you're interested in processing (you
   probably already do this).

2. Make a list of the "umbrella" headers that you'll process. This
   may be implicit, by abandoning processing when you try to process
   something that needs to be included by an umbrella or whatever.

3. Process the umbrella headers, but look up the source location in your
   list of interesting headers from (1) to decide where the information
   comes from.
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic