diff options
author | Alexander Kornienko <alexfh@google.com> | 2017-05-22 13:58:16 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2017-05-22 13:58:16 +0000 |
commit | a0ddf5fc1c16e89ee1b382a0597050182f9f5a99 (patch) | |
tree | d9efb78121e81c5f3795d806789b1d75c383ade4 /clang/lib/Basic/SourceManager.cpp | |
parent | 68ae83e68c6f1f874c162c9bcf032bf305724bab (diff) | |
download | llvm-a0ddf5fc1c16e89ee1b382a0597050182f9f5a99.zip llvm-a0ddf5fc1c16e89ee1b382a0597050182f9f5a99.tar.gz llvm-a0ddf5fc1c16e89ee1b382a0597050182f9f5a99.tar.bz2 |
[clang-tidy] readability-braces-around-statements false positive with char literals
Summary:
Single-line if statements cause a false positive when the last token in the conditional statement is a char constant:
```
if (condition)
return 'a';
```
For some reason `findEndLocation` seems to skips too many (vertical) whitespaces in this case. The same problem already occured with string literals (https://reviews.llvm.org/D25558), and was fixed by adding a special check for this very case. I just extended the condition to also include char constants. No idea what really causes the issue though.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: xazax.hun, cfe-commits
Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D33354
llvm-svn: 303551
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions