Diego Novillo | 6dc9c48 | 2014-05-08 13:49:54 +0000 | [diff] [blame] | 1 | // This file tests -Rpass diagnostics together with #line |
| 2 | // directives. We cannot map #line directives back to |
| 3 | // a SourceLocation. |
| 4 | |
| 5 | // RUN: %clang -c %s -Rpass=inline -O0 -S -gmlt -o /dev/null 2> %t.err |
| 6 | // RUN: FileCheck < %t.err %s --check-prefix=INLINE-INVALID-LOC |
| 7 | // |
| 8 | int foo(int x, int y) __attribute__((always_inline)); |
| 9 | int foo(int x, int y) { return x + y; } |
| 10 | |
| 11 | #line 1230 "/bad/path/to/original.c" |
| 12 | int bar(int j) { return foo(j, j - 2); } |
| 13 | |
| 14 | // INLINE-INVALID-LOC: {{^remark: foo inlined into bar}} |
| 15 | // INLINE-INVALID-LOC: note: could not determine the original source location for /bad/path/to/original.c:1230:0 |