[llvm-dev] Codifying our Brace rules-

Timothy Keith via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 16 07:34:58 PDT 2020


On 6/16/20, 2:14 AM, "llvm-dev on behalf of Bruno Ricci via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote:
...
> I would like to add that
> -Wmisleading-indentation exists and that it is enabled by -Wall. Therefore in practice
> the bogus:
>
> if (cond)
>   foo();
>   bar();
>
> will be detected.

True, unless you happen to run clang-format. Then all evidence of your original intention disappears.

Tim




More information about the llvm-dev mailing list