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

List:       cfe-dev
Subject:    Re: [cfe-dev] Disable #error?
From:       Jacob Carlborg <doob () me ! com>
Date:       2014-01-23 19:49:46
Message-ID: lbrroe$hsk$1 () ger ! gmane ! org
[Download RAW message or body]

On 2014-01-23 20:19, Sean Silva wrote:

> By what file it is declared in? How else would you determine this? You
> can get the complete file path of the containing file with
> <http://clang.llvm.org/doxygen/classclang_1_1SourceManager.html#a1b7402699ef496ecc9b2db28a83f0c1b>.

Say I have these four files, in three different libraries:

// /home/foo/libcollection/include/collection/list/list.h
struct List;

// /home/foo/libnet/include/net/socket.h
struct Socket;

// /home/foo/libmain/include/util/sub.h
struct Sub;

// /home/foo/libmain/include/umbrella.h
#include "collection/list/list.h"
#include "net/socket.h"
#include "util/sub.h"

Here I'm interested in translating the file "umbrella.h". The 
preprocessor will concatenate all files to something like this:

// main_prepocessed.h
struct List;
struct Socket;
struct Sub;

I assume I will get back the full path to where these declarations 
originates from. How do I then know that Sub is part of libmain and is a 
sub header. And how do I know that List and Socket is not part of libmain?

-- 
/Jacob Carlborg

_______________________________________________
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