[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-03-13 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. One last kind ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-02-17 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-21 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya marked 2 inline comments as done. ilya added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13384 case Stmt::MemberExprClass: { expr = cast(expr)->getBase(); break; ebevhan wrote: > ilya wrote: > > rsmith wrote: > > > i

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-14 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya marked 4 inline comments as done. ilya added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13384 case Stmt::MemberExprClass: { expr = cast(expr)->getBase(); break; rsmith wrote: > ilya wrote: > > rsmith wrote: > > > Hm

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-14 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya updated this revision to Diff 238106. ilya added a comment. Address rsmith's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaChec

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-06 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. Kind ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya marked an inline comment as done. ilya added a comment. Implemented @riccibruno's and @rsmith's comments. While I agree with the general notion about the flaws with the current implementation, I feel that the more major refactoring proposed in this review is out of the scope of this minor f

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya updated this revision to Diff 235184. ilya added a comment. 1. Refactor `CheckArrayAccess()` to take `AllowPastTheEnd` parameter to avoid a false positive array out-of-bounds warning for `&(cond ? arr1[N] : arr2[N])`. 2. Use `IgnoreParenCasts()` instead of `IgnoreParenImpCasts()` in `CheckA

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya marked an inline comment as done. ilya added a comment. In D71714#1791464 , @riccibruno wrote: > These are not the only AST nodes representing cast expressions (there is also > `CXXFunctionalCastExpr`, ...). What about replacing the > `IgnoreParenIm

[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya updated this revision to Diff 235157. ilya marked an inline comment as done. ilya added a comment. Doxygen format the documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71666/new/ https://reviews.llvm.org/D71666 Files: clang-tools

[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya marked 2 inline comments as done. ilya added a comment. @aaron.ballman, thanks for reviewing. Do you mind submitting this, as I don't have commit access? Comment at: clang-tools-extra/clang-tidy/utils/LexerUtils.h:95-97 +/// Assuming that ``Range`` spans a CVR-qualified t

[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

2019-12-23 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya updated this revision to Diff 235156. ilya added a comment. Update LexerUtils.h documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71666/new/ https://reviews.llvm.org/D71666 Files: clang-tools-extra/clang-tidy/readability/ConstRet

[PATCH] D71714: [Sema] NFC: Remove trailing spaces and fix a typo in a test file

2019-12-19 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item Fixes: http://llvm.org/PR44343 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71714 Files: c

[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

2019-12-18 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya updated this revision to Diff 234560. ilya added a comment. Fix documentation in LexerUtils.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71666/new/ https://reviews.llvm.org/D71666 Files: clang-tools-extra/clang-tidy/readability/ConstRetu

[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

2019-12-18 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Replace tidy::utils::lexer::getConstQualifyingToken with a corrected and also generalized to other qualifiers variant - getQualifyingToken. Fixes: http://llvm.org/PR44326 Repository: r

[PATCH] D69764: [clang-format] Add Left/Right Const (East/West , Before/After) fixer capability

2019-12-10 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. > I think this would likely make everything much more complicated, but perhaps > we should think about this for the configuration at least now so we future > proof ourselves. What you've outlined looks good to me. Of course we will be happy to contribute, given there will

[PATCH] D69764: [clang-format] Add Left/Right Const (East/West , Before/After) fixer capability

2019-12-09 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. In D69764#1775842 , @MyDeveloperDay wrote: > In D69764#1775835 , @ilya wrote: > > > In D69764#1732235 , @aaron.ballman > > wrote: > > > > > I like the

[PATCH] D69764: [clang-format] Add Left/Right Const (East/West , Before/After) fixer capability

2019-12-09 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. In D69764#1732235 , @aaron.ballman wrote: > I like the functionality, but am slightly opposed to using "east/west" > terminology -- that's not a ubiquitous phrase and it takes a bit of thinking > before it makes sense. I think "lef