Open llvmbot opened 14 years ago
Yes, it's broken because of the implicit va_arg typedef we get. It's an ext-warn because empty translation units are not legal in C (but are in C++). Take it up with the C committee. :)
Then that needs to be fixed too:
$ echo -n | clang++ -x c++ -fsyntax-only -Werror -pedantic - $ echo | clang++ -x c++ -fsyntax-only -Werror -pedantic - $
but why would the empty file be an error anyhow?
Sounds like all the fixit tests should run with -Werror -pedantic, which should reject the empty translation unit.
Fast-forward to 2023, fixit-pmem.cpp
is still XFAIL
: https://github.com/llvm/llvm-project/blob/46f366494f3ca8cc98daa6fb4f29c7c446c176b6/clang/test/FixIt/fixit-pmem.cpp#L4
Two other tests are fixed, though.
Extended Description
A few fix-it tests are failing. The problem is that 'clang -cc1 -fixit' doesn't emit any output at all when there are additional errors in the file which fixit can't fix. Because the tests are written to run clang -fixit | clang -Werror, an empty output from -fixit will pass. (I'm assuming the tests are written correctly and am working on a patch to change the behaviour of the -fixit flag.)
In the mean time, we've accumulated the 3 broken tests:
test/FixIt/fixit-errors.c. The fix-it from 'get_origin->x' to 'get_origin()->x' is missing entirely. Note that this breakage would have been caught if that line had an 'expected-note' on it.
test/FixIt/fixit-pmem.cpp. This test generates four errors with four fix-it hints, but one of which is diagnosed as unfixable. Why?
test/FixIt/typo.m. Right in the middle, on line 61, the use of undeclared identifier error on 'NSstring' is emitted with a did you mean 'NSString', but no fix-it hint shows up. Why not? It shows up for other ones.