Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

True auto type detection #4

Open
rhysd opened this issue Mar 2, 2016 · 3 comments
Open

True auto type detection #4

rhysd opened this issue Mar 2, 2016 · 3 comments

Comments

@rhysd
Copy link
Member

rhysd commented Mar 2, 2016

Currently libclang-vim handles type deduction by itself here. But true type deduction in libclang has already been supported and we should use it.

@vmiklos
Copy link
Collaborator

vmiklos commented Jun 1, 2016

FWIW, when not hacking on libclang-vim itself, I use libclang-vim with clang-3.7 provided by my distro. That doesn't have the fix yet. So I'm happy with the current situation till distros in general stop shipping broken clang. ;-)

@rhysd
Copy link
Member Author

rhysd commented Jun 2, 2016

That makes sense :). The bug looks to be fixed in r246778. The fix was submitted Sep 2015 and Clang 3.7 was released Aug 2015. So clang_getCanonicalType with auto type declaration should work fine in Clang 3.8. I think the best way is switching implementation by Clang version. 3.7 or earlier use current implementation and 3.8 or later use clang_getCanonicalType assuming it can obtain the actual type of auto declaration.

@rhysd
Copy link
Member Author

rhysd commented Jun 2, 2016

I found CXVersion. I think we can switch implementation by looking at it.

http://clang.llvm.org/doxygen/structCXVersion.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants