The project I am currently working on(code completion for codeblocks using libclang) requires the ability to see the accessibility(private, protected, public) of a CXCompletionResult.
The code already exists in the c++ libraries, so this simply adds a member to CXCompletionResult and calls the c++ function.
Sorry if this is a little clumsy, it is my first patch for this project.
libclang.patch (1.56 KB)
Shoot, this breaks ABI.
Where would be the suggested place to hide the added member?
CXCompletionString seems like the only available place, but that would not make any sense.
We should probably hide the implementation of CXCompletionResult …
I had the same idea for Qt Creator, but Douglas Gregor convinced me that accessible-from-current-scope was more useful. So maybe CXAvailability_NotAccessible is "better"?
Regardless of whether accessibility from current scope or accessibility in general is better, the current codeblocks codecompletion plugin uses accessibility in general, and this has to follow that style.
However my questions still stands:
Any “simple” change will break ABI, I want to know what option I should take.
Should I hack around this by using the CXCompletionString for storage(this would get very ugly quickly), should I refactor the whole CXCompletionResult class so as hide the implementation(as most of the other classes in libclang do), or would the current patch as it stands work(with breaking ABI)?