chetant/LibClang — pull request #16 by sfowler (2013-03-20 23:11:06+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.