[cfe-dev] multiple .C files in SourceManager

Bas van den Berg b.van.den.berg.nl at gmail.com
Fri Feb 1 07:31:51 PST 2013


Hi,

I'm creating a compiler based on clang components
for a new language.

What i want to do is parse several source (.c) files
in one go.
Currently for each file I instantiate a Preprocessor,
DiagnosticsEngine, SourceManager etc.

But for error messages that depend on multiple files
(for example wrong number of function arguments for
a function that's defined in one C file and called from
the other)
I have the problem that each Symbol i have has a
clang::SourceLocation. But to resolve this, I also need
to remember which SourceManager it came from.
Would it be possible to generate sourcelocations
for all these files in one SourceManager/Pre-processor?

Anyone have an idea how much work this would be?

Regards,
Bas



More information about the cfe-dev mailing list