Go to file
Alexander Kornienko a0ddf5fc1c [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
2017-05-22 13:58:16 +00:00
clang [mips] Support `micromips` attribute 2017-05-22 12:47:43 +00:00
clang-tools-extra [clang-tidy] readability-braces-around-statements false positive with char literals 2017-05-22 13:58:16 +00:00
compiler-rt [XRay][compiler-rt] Add __xray_remove_customevent_handler(...) 2017-05-22 03:23:54 +00:00
debuginfo-tests Add additional CHECKs to safestack.c. 2017-04-17 17:57:05 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx [test] Add support for Objective-C++ tests 2017-05-19 23:02:49 +00:00
libcxxabi [libcxxabi] Fix the test case committed in r303175. 2017-05-16 18:18:03 +00:00
libunwind [libunwind] Fix executable stack directive on Linux. 2017-05-16 20:18:57 +00:00
lld Revert r303304: Re-submit r303225: Garbage collect dllimported symbols. 2017-05-22 06:01:37 +00:00
lldb Don't override the SDKs and force the use of /System/Library/Frameworks to 2017-05-19 23:00:42 +00:00
llgo benchcomp: Add a mode for analyzing file sizes. 2017-04-03 19:13:12 +00:00
llvm [AMDGPU] Fix incorrect register usage tracking in GCNUpwardTracker 2017-05-22 13:09:40 +00:00
openmp Fix for KMP_AFFINITY=respect with multiple processor groups 2017-05-15 19:05:59 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [Docs] Use ReadTheDocs theme if available. 2017-05-22 13:36:15 +00:00