[PATCH] D56661: [clang-tidy] Fix incorrect array name generation in cppcoreguidelines-pro-bounds-constant-array-index

2019-07-12 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 209485. Quolyk added a comment. Herald added a subscriber: wuzish. Herald added a project: clang. Update. Solution is not elegant, because DeclRef->BaseRange somehow has zero length. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D56661: [clang-tidy] Fix incorrect array name generation in cppcoreguidelines-pro-bounds-constant-array-index

2019-01-15 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 181763. Quolyk added a comment. Patch is not yet fixed. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56661/new/ https://reviews.llvm.org/D56661 Files:

[PATCH] D56661: [clang-tidy] Fix incorrect array name generation in cppcoreguidelines-pro-bounds-constant-array-index

2019-01-14 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. For now I just updated tests. The problem is in `BaseRange` definition, as it holds `EndLoc` and `BeginLoc` pointing to the beginning of ArrayExpression base

[PATCH] D56661: [clang-tidy] Fix incorrect array name generation in cppcoreguidelines-pro-bounds-constant-array-index

2019-01-14 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Quolyk added reviewers: aaron.ballman, alexfh, JonasToth, omtcyfz. Herald added subscribers: cfe-commits, arphaman, kbarton, xazax.hun, nemanjai. This patch fixes incorrect array name generation for a cppcoreguidelines-pro-bounds-constant-array-index warning.

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-13 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk marked an inline comment as done. Quolyk added inline comments. Comment at: test/clang-tidy/readability-container-size-empty.cpp:19-20 basic_string operator+(const basic_string& other) const; unsigned long size() const; + unsigned long length() const; bool

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-13 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 181467. Quolyk added a comment. Update tests. Handle length. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56644/new/ https://reviews.llvm.org/D56644 Files: clang-tidy/readability/ContainerSizeEmptyCheck.cpp

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-12 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. In D56644#1355434 , @lebedev.ri wrote: > Either this is a NFC change with just tests, or the actual fix is missing. Right, it's WIP for now. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-12 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. For now, I just added tests. I have several questions, as I'm beginner (`ContainerSizeEmptyCheck.cpp`). 1. Do I have to extend `ValidContainer`, so it recognises `::std::string` with `length()` method as valid container too or we can assume `::std::string` as valid

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-12 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Quolyk added reviewers: Eugene.Zelenko, omtcyfz, aaron.ballman, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Extends readability-container-size-empty to check std::string length() similar to size(). Motivation:

[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-12-19 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. In https://reviews.llvm.org/D39834#959500, @JDevlieghere wrote: > Thanks Dmitry, this LGTM! > > PS: Let me know if you don't have commit access and want me to commit it for > you. I don't have commit access, please commit. Thanks for code review.

[PATCH] D40594: [InstCombine] miscompile of __builtin_fmod

2017-11-29 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Motivation: https://bugs.llvm.org/show_bug.cgi?id=34870 I'm totally not sure this is correct https://reviews.llvm.org/D40594 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins.c Index: test/CodeGen/builtins.c

[PATCH] D40543: Pass by reference NewQualifiedName in QualifiedRenameRule

2017-11-28 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added inline comments. Comment at: include/clang/Tooling/Refactoring/Rename/RenamingAction.h:79 QualifiedRenameRule(const NamedDecl *ND, - std::string NewQualifiedName) + const std::string ) : ND(ND),

[PATCH] D40543: Pass by reference NewQualifiedName in QualifiedRenameRule

2017-11-28 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D40543 Files: include/clang/Tooling/Refactoring/Rename/RenamingAction.h Index: include/clang/Tooling/Refactoring/Rename/RenamingAction.h

[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-11-22 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 123914. https://reviews.llvm.org/D39834 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/opt-record.c Index: test/Driver/opt-record.c === --- test/Driver/opt-record.c +++

[PATCH] D39834: [clangd] -foptimization-record-file= should imply -fsave-optimization-record

2017-11-20 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. In https://reviews.llvm.org/D39834#930165, @malaperle wrote: > Hi! You put "[clangd]" in the title, but I don't believe it's related to > clangd but rather just "clang"? I thought patch to clang option is supposed to be marked as "clangd".

[PATCH] D39834: [clangd] -foptimization-record-file= should imply -fsave-optimization-record

2017-11-20 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 123559. https://reviews.llvm.org/D39834 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/opt-record.c Index: test/Driver/opt-record.c === --- test/Driver/opt-record.c +++

[PATCH] D39834: [clangd] -foptimization-record-file= should imply -fsave-optimization-record

2017-11-09 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk updated this revision to Diff 122395. Quolyk retitled this revision from "[clangd][WIP] -foptimization-record-file= should imply -fsave-optimization-record" to "[clangd] -foptimization-record-file= should imply -fsave-optimization-record". Quolyk added a comment. Added 1 test, I guess

[PATCH] D39834: [ClangDriver] -foptimization-record-file= should imply -fsave-optimization-record

2017-11-09 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Herald added a subscriber: ilya-biryukov. This is my first attempt to contribute to llvm. I'm trying to implement this https://bugs.llvm.org/show_bug.cgi?id=33670. I'm struggling with writing tests for this patch. I will be very thankful if somebody guides me