HomePhabricator

[cmake] Enable -Werror=return-type

Authored by kastiglione on Mar 8 2021, 1:11 PM.

Description

[cmake] Enable -Werror=return-type

Turn -Wreturn-type into an error.

This is currently used by libcxx, libcxxabi, and libunwind, and would be a good default
for all of llvm. I'm not aware of any cases where this shouldn't be an error. This
ensures different build configs, merges, and downstream branches catch issues sooner.

Differential Revision: https://reviews.llvm.org/D98224