diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-05-20 04:11:33 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-05-20 04:11:33 +0000 |
| commit | 11d704839fc46f65556d674113043a86f54ca4e8 (patch) | |
| tree | 57c60211cc55452802df63224771540cc7be5db1 /clang/tools | |
| parent | f1c3beecb253bf10d0d8da4a96a1c008b05f4e94 (diff) | |
| download | bcm5719-llvm-11d704839fc46f65556d674113043a86f54ca4e8.tar.gz bcm5719-llvm-11d704839fc46f65556d674113043a86f54ca4e8.zip | |
[index] Fix forward declarations interfering with USR generation of external source symbols
Patch by Nathan Hawes.
https://reviews.llvm.org/D33346
llvm-svn: 303484
Diffstat (limited to 'clang/tools')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 9c795ae9c5b..394ee0ec439 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/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) |

