blob: b4b1b923249477c7cf7612649135e1fe40cbface [file] [log] [blame]
Diego Novillo6dc9c482014-05-08 13:49:54 +00001// 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//
8int foo(int x, int y) __attribute__((always_inline));
9int foo(int x, int y) { return x + y; }
10
11#line 1230 "/bad/path/to/original.c"
12int 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