diff options
-rw-r--r-- | clang/lib/AST/Comment.cpp | 3 | ||||
-rw-r--r-- | clang/test/Sema/warn-documentation.m | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp index 20ff2430df2..dfa2a1665d4 100644 --- a/clang/lib/AST/Comment.cpp +++ b/clang/lib/AST/Comment.cpp @@ -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(); diff --git a/clang/test/Sema/warn-documentation.m b/clang/test/Sema/warn-documentation.m index a8538f02be1..98336f9fa28 100644 --- a/clang/test/Sema/warn-documentation.m +++ b/clang/test/Sema/warn-documentation.m @@ -254,7 +254,7 @@ struct HasFields { * \param p not here. * \returns integer. */ -void (^blockPointerVariableThatLeadsNowhere)(); +void (^_Nullable blockPointerVariableThatLeadsNowhere)(); @interface CheckFunctionBlockPointerVars { /** |