Skip to content
Commit 2474a7e9 authored by Chris Lattner's avatar Chris Lattner
Browse files

Use PresumedLoc when emitting the 'included from' diagnostics. For a malformed

test like this:

#line 4 "foo"

#define XX ?

#if XX
#endif

We now emit:

In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
    ^
foo:5:12: note: instantiated from:
#define XX ?
           ^

instead of:

In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
    ^
./t.h:6:12: note: instantiated from:
#define XX ?
           ^

(where the note doesn't obey #line or print the include stack when needed).

This fixes PR5617

llvm-svn: 90554
parent 4665141e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment