]> granicus.if.org Git - clang/commit
Make clang_Cursor_getMangling not mangle if the declaration isn't mangled
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Thu, 8 Oct 2015 00:01:20 +0000 (00:01 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Thu, 8 Oct 2015 00:01:20 +0000 (00:01 +0000)
commitbf978b5a0b576db9fb82c86a18f147f2726c91d9
treee6938b59f4c80677bac44c7932a3bf7abfb1cedf
parent674eacdb1b83b5bfd293a2c2615b1fe734bf64c6
Make clang_Cursor_getMangling not 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@249639 91177308-0d34-0410-b5e6-96231b3b80d8
test/Index/print-mangled-name.cpp
tools/c-index-test/c-index-test.c
tools/libclang/CIndex.cpp