mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-04 00:06:50 +00:00
[AST] Look through attribute type locs when searching for function type
loc Prior to this commit -Wdocumentation crashed when checking the @returns command for declarations whose function/block pointer type included an attribute like _Nullable. rdar://31818195 llvm-svn: 301400
This commit is contained in:
parent
ad06391ca9
commit
6246cc6c0e
@ -116,6 +116,9 @@ bool ParagraphComment::isWhitespaceNoCache() const {
|
||||
static TypeLoc lookThroughTypedefOrTypeAliasLocs(TypeLoc &SrcTL) {
|
||||
TypeLoc TL = SrcTL.IgnoreParens();
|
||||
|
||||
// Look through attribute types.
|
||||
if (AttributedTypeLoc AttributeTL = TL.getAs<AttributedTypeLoc>())
|
||||
return AttributeTL.getModifiedLoc();
|
||||
// Look through qualified types.
|
||||
if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>())
|
||||
return QualifiedTL.getUnqualifiedLoc();
|
||||
|
@ -254,7 +254,7 @@ struct HasFields {
|
||||
* \param p not here.
|
||||
* \returns integer.
|
||||
*/
|
||||
void (^blockPointerVariableThatLeadsNowhere)();
|
||||
void (^_Nullable blockPointerVariableThatLeadsNowhere)();
|
||||
|
||||
@interface CheckFunctionBlockPointerVars {
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user