[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 30 23:57:32 PDT 2020
njames93 added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/infrastructure/duplicate-fixes-of-alias-checkers.cpp:4-8
+template <typename>
+class initializer_list {
+public:
+ initializer_list() noexcept {}
+};
----------------
This isn't needed for the test case and can safely be removed.
================
Comment at: clang-tools-extra/test/clang-tidy/infrastructure/duplicate-fixes-of-alias-checkers.cpp:13-21
+ vector() = default;
+ vector(initializer_list<T>) {}
+
+ void push_back(const T &) {}
+ void push_back(T &&) {}
+
+ template <typename... Args>
----------------
The 2 constructors can be removed as well as the destructor.
================
Comment at: llvm/include/llvm/ADT/StringMap.h:251-268
+ /// equal - check whether both of the containers are equal
+ bool operator==(const StringMap &RHS) const {
+ if (size() != RHS.size())
+ return false;
+
+ for (const auto &KeyValue : *this) {
+ auto FindInRHS = RHS.find(KeyValue.getKey());
----------------
This needs unit tests `llvm/unittests/ADT/StringMapTest.cpp`, also a small nit but could you add the corresponding `operator!=`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80753/new/
https://reviews.llvm.org/D80753
More information about the llvm-commits
mailing list