[flang-commits] [PATCH] D104100: [flang] Add clang-tidy check for braces around if

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jun 11 02:15:04 PDT 2021


rovka created this revision.
rovka added a reviewer: klausler.
rovka added a project: Flang.
Herald added a subscriber: jdoerfert.
rovka requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

Flang diverges from the llvm coding style in that it requires braces
around the bodies of if/while/etc statements, even when the body is
a single statement.

This commit adds the readability-braces-around-statements check to
flang's clang-tidy config file. Hopefully the premerge bots will pick it
up and report violations in Phabricator.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104100

Files:
  flang/.clang-tidy


Index: flang/.clang-tidy
===================================================================
--- flang/.clang-tidy
+++ flang/.clang-tidy
@@ -1,2 +1,2 @@
-Checks: '-llvm-include-order,-readability-identifier-naming,-clang-diagnostic-*'
+Checks: '-llvm-include-order,readability-braces-around-statements,-readability-identifier-naming,-clang-diagnostic-*'
 InheritParentConfig: true


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104100.351369.patch
Type: text/x-patch
Size: 381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210611/3d486528/attachment.bin>


More information about the flang-commits mailing list