summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-06-28 16:19:39 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-06-28 16:19:39 +0000
commitdf17d648812bae4d4eead468307fc74eee8c4f6a (patch)
tree47a9e12ba4512d44d8626041e37203bbb5157b7d /clang
parent8650fb8e0eedf793563e2fb24222a7dc4ecf0ecb (diff)
downloadbcm5719-llvm-df17d648812bae4d4eead468307fc74eee8c4f6a.tar.gz
bcm5719-llvm-df17d648812bae4d4eead468307fc74eee8c4f6a.zip
Attaching comments to declarations: don't attach comments to implicit declarations.
llvm-svn: 159354
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 9fb2dc1a940..820288eae38 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud