1*67e74705SXin Li // PR17239 - The /link option, when inside a response file, should only extend 2*67e74705SXin Li // until the end of the response file (and not the entire command line) 3*67e74705SXin Li 4*67e74705SXin Li // Note: %s must be preceded by -- or bound to another option, otherwise it may 5*67e74705SXin Li // be interpreted as a command-line option, e.g. on Mac where %s is commonly 6*67e74705SXin Li // under /Users. 7*67e74705SXin Li 8*67e74705SXin Li // RUN: echo /link bar.lib baz.lib > %t.args 9*67e74705SXin Li // RUN: touch %t.obj 10*67e74705SXin Li // RUN: %clang_cl -### @%t.args -- %t.obj 2>&1 | FileCheck %s -check-prefix=ARGS 11*67e74705SXin Li // If the "/link" option captures all remaining args beyond its response file, 12*67e74705SXin Li // it will also capture "--" and our input argument. In this case, Clang will 13*67e74705SXin Li // be clueless and will emit "argument unused" warnings. If PR17239 is properly 14*67e74705SXin Li // fixed, this should not happen because the "/link" option is restricted to 15*67e74705SXin Li // consume only remaining args in its response file. 16*67e74705SXin Li // ARGS-NOT: warning 17*67e74705SXin Li // ARGS-NOT: argument unused during compilation 18*67e74705SXin Li // Identify the linker command 19*67e74705SXin Li // ARGS: link.exe 20