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 | 9d2f1e753bf3d526327f34a42d9945aa15aafe7b (patch) | |
| tree | c346ce897650b21dceda990bae0d7282e93860b6 /clang/lib/AST/CommentDumper.cpp | |
| parent | 43897975cca762079193a229d3108c5cbbc0aa1d (diff) | |
| download | bcm5719-llvm-9d2f1e753bf3d526327f34a42d9945aa15aafe7b.tar.gz bcm5719-llvm-9d2f1e753bf3d526327f34a42d9945aa15aafe7b.zip | |
[doc parsing] use getParamName to access parameter
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.
llvm-svn: 166231
Diffstat (limited to 'clang/lib/AST/CommentDumper.cpp')
| -rw-r--r-- | clang/lib/AST/CommentDumper.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/AST/CommentDumper.cpp b/clang/lib/AST/CommentDumper.cpp index 4f51cd5622c..18ba47ff6c7 100644 --- a/clang/lib/AST/CommentDumper.cpp +++ b/clang/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()) { |

