Open Quuxplusone opened 3 years ago
One observation is that this warning does not appear anymore if there are not any return statements that come anywhere after the @throw statement.
It was pointed out that the issue on this page might have been a precursor to this bug: https://bugs.llvm.org/show_bug.cgi?id=46693
This is a regression somewhere between clang revision
llvmorg-14-init-7378-gaee49255
and `llvmorg-14-init-8281-gaa1d32f5 - build 7378 has expected behavior.Repro:
a.m
bin/clang -Wreturn-type -Wno-objc-root-class -c -o a.o a.m
Expected behavior: compilation is free from warnings
Actual behavior: $ bin/clang -Wreturn-type -Wno-objc-root-class -c -o a.o a.m a.m:14:1: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ 1 warning generated.