https://bugs.llvm.org/show_bug.cgi?id=42386

            Bug ID: 42386
           Summary: Clang returns zero but does not create output file
                    with -c + object file as input
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangb...@nondot.org
          Reporter: s...@chromium.org
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

I would expect clang to return non-zero when the output is not generated.

```
$ clanh -c -o hello2.o hello.o
clang-9: warning: hello.o: 'linker' input unused
[-Wunused-command-line-argument]
$ echo $?
0
$ stat hello2.o
stat: cannot stat 'hello2.o': No such file or directory
```

I noticed gcc has the same behavior, but still I would expect `clang: error: no
input files` after the warning and a non-zero return code. 

Another way of putting it: if all inputs are unused I would expect "no input
files" error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to