On 13 February 2018 at 08:53, Frank Redeker via cfe-dev <[hidden email]> wrote:
I'm using ClangTool.buildASTs() to create the ASTs for a given set of
I wonder why #line directives are ignored. (Or have I missed some option
when setting up my ClangTool instance. Or must I fix the line numbers in
my own DiagnosticsConsumer)
How are you setting your DiagnosticOptions? Generally we'd expect these to be set by a call to CompilerInvocation::CreateFromArgs, which sets DiagnosticOptions::ShowPresumedLoc to 'true' by default (giving the output you see from Clang). Since you're using libTooling, ToolInvocation::run() is the place I'd expect this to happen.