[PATCH] D23008: [clang-tidy] fix segfault in cppcore-guidelines-special-member-functions check

Jonathan B Coe via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 12:58:43 PDT 2016


jbcoe added inline comments.

================
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:63-64
@@ -62,4 +62,4 @@
 
-std::string SpecialMemberFunctionsCheck::join(
-    llvm::ArrayRef<SpecialMemberFunctionKind> SMFS, llvm::StringRef AndOr) {
+template <typename R>
+static std::string join(const R &SMFS, llvm::StringRef AndOr) {
 
----------------
aaron.ballman wrote:
> I hadn't noticed this before -- why has this been converted to an unrestricted template? If generality is what you were going for, it should have accepted a range (or a pair of iterators) instead?
It needs to handle SmallSetVector which I can't convert to an ArrayRef.

How do I specify a range?


https://reviews.llvm.org/D23008





More information about the cfe-commits mailing list