diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-18 21:42:42 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-18 21:42:42 +0000 |
commit | 262e60c1ccb5197e8e2ea49ada1196ed65183734 (patch) | |
tree | cec7b85be8e507525f07c9beeeaad66824c70b2d /lib/AST/CommentDumper.cpp | |
parent | d2deb91b02ae1d810719e4a5a63dc404f362575a (diff) |
[doc parsing] use getParamName to access parameter
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentDumper.cpp')
-rw-r--r-- | lib/AST/CommentDumper.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/AST/CommentDumper.cpp b/lib/AST/CommentDumper.cpp index 4f51cd5622..18ba47ff6c 100644 --- a/lib/AST/CommentDumper.cpp +++ b/lib/AST/CommentDumper.cpp @@ -186,8 +186,12 @@ void CommentDumper::visitParamCommandComment(const ParamCommandComment *C) { else OS << " implicitly"; - if (C->hasParamName()) - OS << " Param=\"" << C->getParamName(const_cast<FullComment*>(FC)) << "\""; + if (C->hasParamName()) { + if (C->isParamIndexValid()) + OS << " Param=\"" << C->getParamName(const_cast<FullComment*>(FC)) << "\""; + else + OS << " Param=\"" << C->getParamNameAsWritten() << "\""; + } if (C->isParamIndexValid()) OS << " ParamIndex=" << C->getParamIndex(); @@ -197,7 +201,10 @@ void CommentDumper::visitTParamCommandComment(const TParamCommandComment *C) { dumpComment(C); if (C->hasParamName()) { - OS << " Param=\"" << C->getParamName(const_cast<FullComment*>(FC)) << "\""; + if (C->isPositionValid()) + OS << " Param=\"" << C->getParamName(const_cast<FullComment*>(FC)) << "\""; + else + OS << " Param=\"" << C->getParamNameAsWritten() << "\""; } if (C->isPositionValid()) { |