[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-22 Thread Alexander Kornienko via Phabricator via cfe-commits
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

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-22 Thread Alexander Kornienko via Phabricator via cfe-commits
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

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-22 Thread Alexander Kornienko via Phabricator via cfe-commits
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

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-19 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-19 Thread Alexander Kornienko via Phabricator via cfe-commits
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,

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-19 Thread Florian Gross via Phabricator via cfe-commits
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)