diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-26 23:34:36 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-04-26 23:34:36 +0000 |
commit | 91efca0fa2ef5e63b48692e3439f5c6e6bde350c (patch) | |
tree | b5f5248c4c69b4abd89197c4e3522f928c5bd4c0 /lib | |
parent | fff418b1abea921685a1175a8ee0b597594bddc1 (diff) |
documenttion parsing. Provide a c-index test
and limit comment extraction to public c++
bases. // rdar://13647476
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/ASTContext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 29f1d7bd1a..de6a30a981 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -469,7 +469,7 @@ comments::FullComment *ASTContext::getCommentForDecl( // Check non-virtual bases. for (CXXRecordDecl::base_class_const_iterator I = RD->bases_begin(), E = RD->bases_end(); I != E; ++I) { - if (I->isVirtual()) + if (I->isVirtual() || (I->getAccessSpecifier() != AS_public)) continue; QualType Ty = I->getType(); if (Ty.isNull()) @@ -485,6 +485,8 @@ comments::FullComment *ASTContext::getCommentForDecl( // Check virtual bases. for (CXXRecordDecl::base_class_const_iterator I = RD->vbases_begin(), E = RD->vbases_end(); I != E; ++I) { + if (I->getAccessSpecifier() != AS_public) + continue; QualType Ty = I->getType(); if (Ty.isNull()) continue; |