]> granicus.if.org Git - clang/commit
Make clang_Cursor_getMangling don't mangle if the declaration isn't mangled
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Tue, 6 Oct 2015 18:24:33 +0000 (18:24 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Tue, 6 Oct 2015 18:24:33 +0000 (18:24 +0000)
commit70e8b815c5b9b9f0eab8792ef149e8e7a0654947
treedf8a54c734ad4cb2c1a71f6ac8b311b2e3f8c155
parent89050198bc93f116a375ac7e3744b40ad31e9719
Make clang_Cursor_getMangling don't mangle if the declaration isn't mangled

Right now clang_Cursor_getMangling will attempt to mangle any
declaration, even if the declaration isn't mangled (extern "C").  This
results in a partially mangled name which isn't useful for much. This
patch makes clang_Cursor_getMangling return an empty string if the
declaration isn't mangled.

Patch by Michael Wu <mwu@mozilla.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249437 91177308-0d34-0410-b5e6-96231b3b80d8
test/Index/print-mangled-name.cpp
tools/c-index-test/c-index-test.c
tools/libclang/CIndex.cpp