Permalink
Browse files

Bug 746734 - Don't warn about missing documentation for deleted funct…

…ions.
  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed May 3, 2015
1 parent 7b2d77a commit 796d6585be58d1c9112422a919f49d1998dc672c
Showing with 16 additions and 4 deletions.
  1. +3 −0 src/arguments.cpp
  2. +4 −2 src/arguments.h
  3. +7 −2 src/memberdef.cpp
  4. +1 −0 src/memberdef.h
  5. +1 −0 src/scanner.l
View
@@ -32,6 +32,7 @@ ArgumentList *ArgumentList::deepCopy() const
argList->volatileSpecifier = volatileSpecifier;
argList->pureSpecifier = pureSpecifier;
argList->trailingReturnType = trailingReturnType;
argList->isDeleted = isDeleted;
return argList;
}
@@ -61,6 +62,7 @@ ArgumentList *ArgumentList::unmarshal(StorageIntf *s)
result->volatileSpecifier = unmarshalBool(s);
result->pureSpecifier = unmarshalBool(s);
result->trailingReturnType = unmarshalQCString(s);
result->isDeleted = unmarshalBool(s);
return result;
}
@@ -93,6 +95,7 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList)
marshalBool(s,argList->volatileSpecifier);
marshalBool(s,argList->pureSpecifier);
marshalQCString(s,argList->trailingReturnType);
marshalBool(s,argList->isDeleted);
}
}
View
@@ -86,7 +86,8 @@ class ArgumentList : public QList<Argument>
ArgumentList() : QList<Argument>(),
constSpecifier(FALSE),
volatileSpecifier(FALSE),
pureSpecifier(FALSE)
pureSpecifier(FALSE),
isDeleted(FALSE)
{ setAutoDelete(TRUE); }
/*! Destroys the argument list */
~ArgumentList() {}
@@ -102,7 +103,8 @@ class ArgumentList : public QList<Argument>
bool pureSpecifier;
/*! C++11 style Trailing return type? */
QCString trailingReturnType;
/*! C++11 defaulted method */
/*! method with =delete */
bool isDeleted;
static ArgumentList *unmarshal(StorageIntf *s);
static void marshal(StorageIntf *s,ArgumentList *argList);
View
@@ -3231,7 +3231,7 @@ void MemberDef::warnIfUndocumented()
!isFriendClass() &&
name().find('@')==-1 && d && d->name().find('@')==-1 &&
protectionLevelVisible(m_impl->prot) &&
!isReference()
!isReference() && !isDeleted()
)
{
warn_undoc(d->getDefFileName(),d->getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
@@ -3258,11 +3258,16 @@ bool MemberDef::isDocumentedFriendClass() const
(fcd=getClass(baseName)) && fcd->isLinkable());
}
bool MemberDef::isDeleted() const
{
return m_impl->defArgList && m_impl->defArgList->isDeleted;
}
bool MemberDef::hasDocumentation() const
{
return Definition::hasDocumentation() ||
(m_impl->mtype==MemberType_Enumeration && m_impl->docEnumValues) || // has enum values
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
}
#if 0
View
@@ -188,6 +188,7 @@ class MemberDef : public Definition
bool isLinkable() const;
bool hasDocumentation() const; // overrides hasDocumentation in definition.h
//bool hasUserDocumentation() const; // overrides hasUserDocumentation
bool isDeleted() const;
bool isBriefSectionVisible() const;
bool isDetailedSectionVisible(bool inGroup,bool inFile) const;
bool isDetailedSectionLinkable() const;
View
@@ -4663,6 +4663,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
lineCount();
current->args += " = delete";
current->spec |= Entry::Delete;
current->argList->isDeleted=TRUE;
BEGIN(FuncQual);
}
<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* { // C++11 explicitly defaulted constructor/assignment operator

0 comments on commit 796d658

Please sign in to comment.