diff options
author | Sebastian Poeplau <poeplau@adacore.com> | 2023-11-24 17:11:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 21:41:17 +0530 |
commit | 7091ca1ae3a87479b6febdf1c3a324d707c633d9 (patch) | |
tree | d3d6e3cea03f385af4d4b7ae763e186aac7da92b /clang/tools/c-index-test/c-index-test.c | |
parent | e9fdb965f9b016d5df819969f37c49a8075e70b6 (diff) | |
download | llvm-7091ca1ae3a87479b6febdf1c3a324d707c633d9.zip llvm-7091ca1ae3a87479b6febdf1c3a324d707c633d9.tar.gz llvm-7091ca1ae3a87479b6febdf1c3a324d707c633d9.tar.bz2 |
[clang] Add missing LinkageSpec case to getCursorKindForDecl (#72401)
The LinkageSpec case was omitted, and there is a declared CXCursor_Kind
for it. Adapt the testsuite drivers to print mangled names for
declarations with extern linkage. Also update the test baseline for the
recursive-cxx-member-calls.cpp test.
Co-authored-by: Matthieu Eyraud <eyraud@adacore.com>
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 9d66a22..2c0c9cb 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -1838,6 +1838,8 @@ static enum CXChildVisitResult PrintMangledName(CXCursor cursor, CXCursor p, CXString MangledName; if (clang_isUnexposed(clang_getCursorKind(cursor))) return CXChildVisit_Recurse; + if (clang_getCursorKind(cursor) == CXCursor_LinkageSpec) + return CXChildVisit_Recurse; PrintCursor(cursor, NULL); MangledName = clang_Cursor_getMangling(cursor); printf(" [mangled=%s]\n", clang_getCString(MangledName)); @@ -1853,6 +1855,8 @@ static enum CXChildVisitResult PrintManglings(CXCursor cursor, CXCursor p, return CXChildVisit_Recurse; if (!clang_isDeclaration(clang_getCursorKind(cursor))) return CXChildVisit_Recurse; + if (clang_getCursorKind(cursor) == CXCursor_LinkageSpec) + return CXChildVisit_Recurse; if (clang_getCursorKind(cursor) == CXCursor_ParmDecl) return CXChildVisit_Continue; PrintCursor(cursor, NULL); |