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

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 03:02:56 PDT 2021


rovka updated this revision to Diff 351805.
rovka edited the summary of this revision.
rovka added a comment.
Herald added subscribers: mehdi_amini, stephenneuendorffer, rriddle.

I disabled the check for Optimizer and Lower. With the newest version of the patch, I'm seeing several violations in lib/Semantics, tools (f18, f18-parse-demo, tco) and 2 rogue ones in the runtime. I'm going to fix the ones from the runtime, but I'm not sure about the others. What's the preferred style for lib/Semantics and tools?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104100/new/

https://reviews.llvm.org/D104100

Files:
  flang/.clang-tidy
  flang/include/flang/Lower/.clang-tidy
  flang/include/flang/Optimizer/.clang-tidy
  flang/lib/Lower/.clang-tidy
  flang/lib/Optimizer/.clang-tidy


Index: flang/lib/Optimizer/.clang-tidy
===================================================================
--- flang/lib/Optimizer/.clang-tidy
+++ flang/lib/Optimizer/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: 'readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
+Checks: '-readability-braces-around-statements,readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
 InheritParentConfig: true
 CheckOptions:
   - key:             readability-identifier-naming.MemberCase
Index: flang/lib/Lower/.clang-tidy
===================================================================
--- flang/lib/Lower/.clang-tidy
+++ flang/lib/Lower/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: 'readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
+Checks: '-readability-braces-around-statements,readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
 InheritParentConfig: true
 CheckOptions:
   - key:             readability-identifier-naming.MemberCase
Index: flang/include/flang/Optimizer/.clang-tidy
===================================================================
--- flang/include/flang/Optimizer/.clang-tidy
+++ flang/include/flang/Optimizer/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: 'readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
+Checks: '-readability-braces-around-statements,readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
 InheritParentConfig: true
 CheckOptions:
   - key:             readability-identifier-naming.MemberCase
Index: flang/include/flang/Lower/.clang-tidy
===================================================================
--- flang/include/flang/Lower/.clang-tidy
+++ flang/include/flang/Lower/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: 'readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
+Checks: '-readability-braces-around-statements,readability-identifier-naming,llvm-include-order,clang-diagnostic-*'
 InheritParentConfig: true
 CheckOptions:
   - key:             readability-identifier-naming.MemberCase
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.351805.patch
Type: text/x-patch
Size: 2401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/cf408649/attachment.bin>


More information about the llvm-commits mailing list