diff options
author | Ben Langmuir <blangmuir@apple.com> | 2016-07-14 18:51:55 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2016-07-14 18:51:55 +0000 |
commit | 6aed6b4f01398b4cfee26df5ddb8bc22034f69e4 (patch) | |
tree | 8aa7d48239ab2ecddf863670ec30a1d28fd61a7c /clang/lib/Index/IndexingContext.cpp | |
parent | c837af306e47f5544cbde2bdd58a0d158e4d6b01 (diff) | |
download | bcm5719-llvm-6aed6b4f01398b4cfee26df5ddb8bc22034f69e4.tar.gz bcm5719-llvm-6aed6b4f01398b4cfee26df5ddb8bc22034f69e4.zip |
[index] Index system ImportDecls even when there is a DeclarationsOnly filter
Whether we call an ImportDecl a decl or a reference symbol role is
somewhat academic, but in practice it's more like a declaration because
it is interesting even to consumers who wouldn't care about references.
Most importantly, we want to report the module dependencies of system
modules even when we have declaration-only filtering.
rdar://problem/27134855
llvm-svn: 275454
Diffstat (limited to 'clang/lib/Index/IndexingContext.cpp')
-rw-r--r-- | clang/lib/Index/IndexingContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Index/IndexingContext.cpp b/clang/lib/Index/IndexingContext.cpp index 424c1034ae4..bcc367c6626 100644 --- a/clang/lib/Index/IndexingContext.cpp +++ b/clang/lib/Index/IndexingContext.cpp @@ -83,14 +83,14 @@ bool IndexingContext::importedModule(const ImportDecl *ImportD) { if (SEntry.getFile().getFileCharacteristic() != SrcMgr::C_User) { switch (IndexOpts.SystemSymbolFilter) { case IndexingOptions::SystemSymbolFilterKind::None: - case IndexingOptions::SystemSymbolFilterKind::DeclarationsOnly: return true; + case IndexingOptions::SystemSymbolFilterKind::DeclarationsOnly: case IndexingOptions::SystemSymbolFilterKind::All: break; } } - SymbolRoleSet Roles = (unsigned)SymbolRole::Reference; + SymbolRoleSet Roles = (unsigned)SymbolRole::Declaration; if (ImportD->isImplicit()) Roles |= (unsigned)SymbolRole::Implicit; |