We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50facad commit 7323c1bCopy full SHA for 7323c1b
clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
@@ -44,6 +44,18 @@ AST_MATCHER(CXXRecordDecl, isMoveConstructible) {
44
}
45
} // namespace
46
47
+static bool isFriendOfClass(const CXXRecordDecl *Class,
48
+ const CXXRecordDecl *Friend) {
49
+ return llvm::any_of(
50
+ Class->friends(), [Friend](FriendDecl *FriendDecl) -> bool {
51
+ if (TypeSourceInfo *FriendTypeSource = FriendDecl->getFriendType()) {
52
+ const QualType FriendType = FriendTypeSource->getType();
53
+ return FriendType->getAsCXXRecordDecl() == Friend;
54
+ }
55
+ return false;
56
+ });
57
+}
58
+
59
static TypeMatcher notTemplateSpecConstRefType() {
60
return lValueReferenceType(
61
pointee(unless(elaboratedType(namesType(templateSpecializationType()))),
0 commit comments