[clang-rename] Enforce LLVM policy about braces around single line control flow state...
authorKirill Bobyrev <omtcyfz@gmail.com>
Sun, 4 Sep 2016 22:50:41 +0000 (22:50 +0000)
committerKirill Bobyrev <omtcyfz@gmail.com>
Sun, 4 Sep 2016 22:50:41 +0000 (22:50 +0000)
commit8769778aca3c3c679066850b26810a433383457d
treedc30b98dd2a30114033a0cd68b04142c0d6304b4
parent9504e3a4f04612d76bcd77012221293c21f31bd6
[clang-rename] Enforce LLVM policy about braces around single line control flow statement body.

Although it is not explicitly stated in LLVM Coding Standards, LLVM developers
prefer to omit braces around flow control statements with single line body.

For example the following piece of code

```
if (condition)
  std::cout << "Hello, world!" << std::endl;
```

is preferred to

```
if (condition) {
  std::cout << "Hello, world!" << std::endl;
}
```

So far clang-rename has ignored this. This patch makes clang-rename more
"LLVM-ish".

llvm-svn: 280640
clang-tools-extra/clang-rename/RenamingAction.cpp
clang-tools-extra/clang-rename/USRFinder.cpp
clang-tools-extra/clang-rename/USRFindingAction.cpp
clang-tools-extra/clang-rename/USRLocFinder.cpp