xref: /aosp_15_r20/external/clang/test/Frontend/optimization-remark-line-directive.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // This file tests -Rpass diagnostics together with #line
2*67e74705SXin Li // directives. We cannot map #line directives back to
3*67e74705SXin Li // a SourceLocation.
4*67e74705SXin Li 
5*67e74705SXin Li // RUN: %clang_cc1 %s -Rpass=inline -debug-info-kind=line-tables-only -dwarf-column-info -emit-llvm-only -verify
6*67e74705SXin Li 
7*67e74705SXin Li int foo(int x, int y) __attribute__((always_inline));
foo(int x,int y)8*67e74705SXin Li int foo(int x, int y) { return x + y; }
9*67e74705SXin Li 
10*67e74705SXin Li // expected-remark@+2 {{foo inlined into bar}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
11*67e74705SXin Li #line 1230 "/bad/path/to/original.c"
bar(int j)12*67e74705SXin Li int bar(int j) { return foo(j, j - 2); }
13