llvm-project/clang-tools-extra
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
..
clang-apply-replacements clang-apply-replacements: For-rangify. 2014-09-09 14:09:48 +00:00
clang-modernize Unique_ptrify PPCallbacks ownership. Goes with clang r217474. 2014-09-10 05:07:57 +00:00
clang-query Remove call to llvm::makeArrayRef. Implicit conversion is sufficient. 2014-08-29 06:05:20 +00:00
clang-rename Revert rL215947: "[clang-rename] revert r215839" 2014-08-20 01:39:05 +00:00
clang-tidy [clang-tidy] Add check misc-braces-around-statements. 2014-10-02 19:09:56 +00:00
docs [clang-tidy] Updated documentation 2014-09-27 21:47:01 +00:00
modularize Unique_ptrify PPCallbacks ownership. Goes with clang r217474. 2014-09-10 05:07:57 +00:00
module-map-checker Unique_ptrify PPCallbacks ownership. Goes with clang r217474. 2014-09-10 05:07:57 +00:00
pp-trace Unique_ptrify PPCallbacks ownership. Goes with clang r217474. 2014-09-10 05:07:57 +00:00
remove-cstr-calls clang-modernize: Transform::createActionFactory return ownership by unique_ptr instead of raw pointer. 2014-08-08 16:06:07 +00:00
test [clang-tidy] Add check misc-braces-around-statements. 2014-10-02 19:09:56 +00:00
tool-template Changed tool-template to use CommonOptionsParser. 2014-08-02 08:24:10 +00:00
unittests [clang-tidy] Add check misc-braces-around-statements. 2014-10-02 19:09:56 +00:00
.arcconfig Update arc config to new domain. 2014-04-07 10:23:19 +00:00
.gitignore .gitignore: ignore docs/_build 2013-03-03 15:15:12 +00:00
CMakeLists.txt Revert rL215947: "[clang-rename] revert r215839" 2014-08-20 01:39:05 +00:00
CODE_OWNERS.TXT Switching code owner email address. 2013-10-08 16:28:05 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
Makefile Revert rL215947: "[clang-rename] revert r215839" 2014-08-20 01:39:05 +00:00
README.txt Reverted Test commit; added new line to the end of README.txt 2013-10-12 20:43:36 +00:00

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/