diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
commit | f0c55418e2b09eaab37c820d3756cc1b4584d084 (patch) | |
tree | 9263bf60f263bb5a7aaa4d2c1be43e5fc4d942e0 /lib/Index/IndexingContext.cpp | |
parent | 583e75cce441388bc562fa225d23499261a0091e (diff) |
Notes
Diffstat (limited to 'lib/Index/IndexingContext.cpp')
-rw-r--r-- | lib/Index/IndexingContext.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Index/IndexingContext.cpp b/lib/Index/IndexingContext.cpp index 85574d0a314d..709a23657b07 100644 --- a/lib/Index/IndexingContext.cpp +++ b/lib/Index/IndexingContext.cpp @@ -17,6 +17,21 @@ using namespace clang; using namespace index; +static bool isGeneratedDecl(const Decl *D) { + if (auto *attr = D->getAttr<ExternalSourceSymbolAttr>()) { + return attr->getGeneratedDeclaration(); + } + return false; +} + +bool IndexingContext::shouldIndex(const Decl *D) { + return !isGeneratedDecl(D); +} + +const LangOptions &IndexingContext::getLangOpts() const { + return Ctx->getLangOpts(); +} + bool IndexingContext::shouldIndexFunctionLocalSymbols() const { return IndexOpts.IndexFunctionLocals; } |