Skip to content

Commit ac576bd

Browse files
Dimitri van Heeschgroleo
authored andcommitted
Bug 746734 - Don't warn about missing documentation for deleted functions.
1 parent 528bb80 commit ac576bd

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

src/arguments.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ArgumentList *ArgumentList::deepCopy() const
3232
argList->volatileSpecifier = volatileSpecifier;
3333
argList->pureSpecifier = pureSpecifier;
3434
argList->trailingReturnType = trailingReturnType;
35+
argList->isDeleted = isDeleted;
3536

3637
return argList;
3738
}
@@ -61,6 +62,7 @@ ArgumentList *ArgumentList::unmarshal(StorageIntf *s)
6162
result->volatileSpecifier = unmarshalBool(s);
6263
result->pureSpecifier = unmarshalBool(s);
6364
result->trailingReturnType = unmarshalQCString(s);
65+
result->isDeleted = unmarshalBool(s);
6466
return result;
6567
}
6668

@@ -93,6 +95,7 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList)
9395
marshalBool(s,argList->volatileSpecifier);
9496
marshalBool(s,argList->pureSpecifier);
9597
marshalQCString(s,argList->trailingReturnType);
98+
marshalBool(s,argList->isDeleted);
9699
}
97100
}
98101

src/arguments.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ class ArgumentList : public QList<Argument>
8686
ArgumentList() : QList<Argument>(),
8787
constSpecifier(FALSE),
8888
volatileSpecifier(FALSE),
89-
pureSpecifier(FALSE)
89+
pureSpecifier(FALSE),
90+
isDeleted(FALSE)
9091
{ setAutoDelete(TRUE); }
9192
/*! Destroys the argument list */
9293
~ArgumentList() {}
@@ -102,7 +103,8 @@ class ArgumentList : public QList<Argument>
102103
bool pureSpecifier;
103104
/*! C++11 style Trailing return type? */
104105
QCString trailingReturnType;
105-
/*! C++11 defaulted method */
106+
/*! method with =delete */
107+
bool isDeleted;
106108

107109
static ArgumentList *unmarshal(StorageIntf *s);
108110
static void marshal(StorageIntf *s,ArgumentList *argList);

src/memberdef.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,7 @@ void MemberDef::warnIfUndocumented()
32313231
!isFriendClass() &&
32323232
name().find('@')==-1 && d && d->name().find('@')==-1 &&
32333233
protectionLevelVisible(m_impl->prot) &&
3234-
!isReference()
3234+
!isReference() && !isDeleted()
32353235
)
32363236
{
32373237
warn_undoc(d->getDefFileName(),d->getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
@@ -3258,11 +3258,16 @@ bool MemberDef::isDocumentedFriendClass() const
32583258
(fcd=getClass(baseName)) && fcd->isLinkable());
32593259
}
32603260

3261+
bool MemberDef::isDeleted() const
3262+
{
3263+
return m_impl->defArgList && m_impl->defArgList->isDeleted;
3264+
}
3265+
32613266
bool MemberDef::hasDocumentation() const
32623267
{
32633268
return Definition::hasDocumentation() ||
32643269
(m_impl->mtype==MemberType_Enumeration && m_impl->docEnumValues) || // has enum values
3265-
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
3270+
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
32663271
}
32673272

32683273
#if 0

src/memberdef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ class MemberDef : public Definition
188188
bool isLinkable() const;
189189
bool hasDocumentation() const; // overrides hasDocumentation in definition.h
190190
//bool hasUserDocumentation() const; // overrides hasUserDocumentation
191+
bool isDeleted() const;
191192
bool isBriefSectionVisible() const;
192193
bool isDetailedSectionVisible(bool inGroup,bool inFile) const;
193194
bool isDetailedSectionLinkable() const;

src/scanner.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4663,6 +4663,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
46634663
lineCount();
46644664
current->args += " = delete";
46654665
current->spec |= Entry::Delete;
4666+
current->argList->isDeleted=TRUE;
46664667
BEGIN(FuncQual);
46674668
}
46684669
<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* { // C++11 explicitly defaulted constructor/assignment operator

0 commit comments

Comments
 (0)