[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 5 23:05:11 PDT 2023
carlosgalvezp added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp:31
+ // Match function with 2 arguments, both are non-const references to same type
+ // and return void void swap(Type&, Type&)
+ auto FunctionMatcher = allOf(
----------------
Duplicate void, remove
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-swap.cpp:215
+ void swap(int&);
+ static void swap(int&, int&);
+ };
----------------
Could we also test:
`friend void swap(T&, T&)`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157185/new/
https://reviews.llvm.org/D157185
More information about the cfe-commits
mailing list