summaryrefslogtreecommitdiff
path: root/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-22 19:43:45 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-22 19:43:45 +0000
commitaa803409c3bd3930126db630c29f63d42f255153 (patch)
tree042106605c08352895ba4383ef97eae88b6b31aa /tools/libclang/CIndex.cpp
parent1ce08792766261dcaa25d8215f9d1c2f70d7b7e9 (diff)
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r--tools/libclang/CIndex.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 9c795ae9c5b7..394ee0ec4390 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -7487,16 +7487,7 @@ unsigned clang_Cursor_isExternalSymbol(CXCursor C,
const Decl *D = getCursorDecl(C);
- auto getExternalSymAttr = [](const Decl *D) -> ExternalSourceSymbolAttr* {
- if (auto *attr = D->getAttr<ExternalSourceSymbolAttr>())
- return attr;
- if (auto *dcd = dyn_cast<Decl>(D->getDeclContext())) {
- if (auto *attr = dcd->getAttr<ExternalSourceSymbolAttr>())
- return attr;
- }
- return nullptr;
- };
- if (auto *attr = getExternalSymAttr(D)) {
+ if (auto *attr = D->getExternalSourceSymbolAttr()) {
if (language)
*language = cxstring::createDup(attr->getLanguage());
if (definedIn)