Attaching comments to declarations: don't attach comments to implicit declarations.

llvm-svn: 159354
This commit is contained in:
Dmitri Gribenko 2012-06-28 16:19:39 +00:00
parent 8650fb8e0e
commit df17d64881
1 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,10 @@ const RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
assert(D);
// User can not attach documentation to implicit declarations.
if (D->isImplicit())
return NULL;
// TODO: handle comments for function parameters properly.
if (isa<ParmVarDecl>(D))
return NULL;