llvm-project/clang-tools-extra/unittests/clang-tidy
Alexander Kornienko 8f7e7f73ea [clang-tidy] Add check misc-braces-around-statements.
This check looks for if statements and loops: for, range-for, while and
do-while, and verifies that the inside statements are inside braces '{}'.
If not, proposes to add braces around them.

Example:

  if (condition)
    action();

becomes

  if (condition) {
    action();
  }

This check ought to be used with the -format option, so that the braces be
well-formatted.


Patch by Marek Kurdej!

http://reviews.llvm.org/D5395

llvm-svn: 218898
2014-10-02 19:09:56 +00:00
..
CMakeLists.txt ClangTidyTests: Add dependency on clangTidyUtils. 2014-09-23 00:53:38 +00:00
ClangTidyDiagnosticConsumerTest.cpp Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
ClangTidyOptionsTest.cpp Provide user name in ClangTidyOptions. 2014-09-24 18:36:03 +00:00
ClangTidyTest.h Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
GoogleModuleTest.cpp Move google-explicit-constructor check to a separate source file. 2014-06-18 09:33:46 +00:00
LLVMModuleTest.cpp Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
Makefile Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
MiscModuleTest.cpp [clang-tidy] Add check misc-braces-around-statements. 2014-10-02 19:09:56 +00:00
ReadabilityChecksTest.cpp Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00