llvm-project/clang-tools-extra/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
..
google [clang-tidy] Clarify a comment. 2014-10-01 15:50:31 +00:00
llvm Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
misc [clang-tidy] Add check misc-braces-around-statements. 2014-10-02 19:09:56 +00:00
readability Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
tool Fix a typo 2014-09-26 11:48:53 +00:00
utils Make a variable local so it's lifetime becomes more obvious. 2014-09-17 13:12:51 +00:00
CMakeLists.txt Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
ClangTidy.cpp Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
ClangTidy.h Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
ClangTidyDiagnosticConsumer.cpp Implemented clang-tidy configurability via .clang-tidy files. 2014-09-04 14:23:36 +00:00
ClangTidyDiagnosticConsumer.h Implemented clang-tidy configurability via .clang-tidy files. 2014-09-04 14:23:36 +00:00
ClangTidyModule.cpp Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
ClangTidyModule.h Implemented clang-tidy-check-specific options. 2014-09-12 08:53:36 +00:00
ClangTidyModuleRegistry.h clang-tidy: Instantiate llvm::Registry<clang::tidy::ClangTidyModule>. 2014-07-03 14:12:47 +00:00
ClangTidyOptions.cpp Provide user name in ClangTidyOptions. 2014-09-24 18:36:03 +00:00
ClangTidyOptions.h Provide user name in ClangTidyOptions. 2014-09-24 18:36:03 +00:00
Makefile Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00