chetant/LibClang — pull request #17 by sfowler (2013-03-21 01:54:36+00:00)
Title: Fixes for location-related functions

This pull request fixes a couple of issues related to the location functions:

- CXFile is itself a pointer, and the CXFile returned by clang_getInstantiationLocation and clang_getSpellingLocation could be null. Since the constructor for File wasn't exported, there was no way for the caller to check for this - you'd just end up with a segfault if you tried to do anything with the return value. I've addressed this by making those functions return a Maybe File instead of a File.

- There was no existing binding for clang_getExpansionLocation. I've added one.

(Sorry for closing and re-requesting; still figuring out the GitHub workflow.)