diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-06-28 16:19:39 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-06-28 16:19:39 +0000 |
commit | c3fee3539fd00a6ce21dc1f574baf76686640072 (patch) | |
tree | ecd5d9a42f7594d027ec2a62ec44110a146f9515 /lib/AST/ASTContext.cpp | |
parent | 4a889e47bd5a8d08a705a87962a35a504728d7f6 (diff) |
Attaching comments to declarations: don't attach comments to implicit declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 9fb2dc1a94..820288eae3 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -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; |