This revision was automatically updated to reflect the committed changes.
Closed by commit rL303551: [clang-tidy] readability-braces-around-statements
false positive with char… (authored by alexfh).
Changed prior to commit:
https://reviews.llvm.org/D33354?vs=99576=99756#toc
Repository:
rL
alexfh added a comment.
I'm going to commit the patch for you, but I guess, you might want to ask for
commit access
(http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).
https://reviews.llvm.org/D33354
___
cfe-commits mailing list
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
LG. Thank you for investigating this!
https://reviews.llvm.org/D33354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
fgross updated this revision to Diff 99576.
fgross added a comment.
After some digging into it, here is my uneducated guess:
The comment in `findEndLocation` states that //"Loc points to the beginning of
the last token before ';'"//. But `checkStmt` calls it with
alexfh added a comment.
I'll repeat my comment from https://reviews.llvm.org/D25558: "I'm thoroughly
confused as to why the code in your test was not handled correctly and why this
is the right fix. Can you explain?" The "For some reason ..." part doesn't
really explain anything. I guess,
fgross created this revision.
Herald added a subscriber: xazax.hun.
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)