]> granicus.if.org Git - clang/commit
[libclang, bindings]: add spelling location
authorMasud Rahman <llvm@masudrahman.com>
Sat, 21 Oct 2017 20:53:49 +0000 (20:53 +0000)
committerMasud Rahman <llvm@masudrahman.com>
Sat, 21 Oct 2017 20:53:49 +0000 (20:53 +0000)
commitd02b8c6579d1e6a51f6c5c289943ecba97e1a1f9
treea50f1c6fc11a30e69d5ee77754dac6fc57294215
parent59611f54fa88ba639661d2e0e2e8b607bd48d4a7
[libclang, bindings]: add spelling location

 o) Add a 'Location' class that represents the four properties of a
    physical location

 o) Enhance 'SourceLocation' to provide 'expansion' and 'spelling'
    locations, maintaining backwards compatibility with existing code by
    forwarding the four properties to 'expansion'.

 o) Update the implementation to use 'clang_getExpansionLocation'
    instead of the deprecated 'clang_getInstantiationLocation', which
    has been present since 2011.

 o) Update the implementation of 'clang_getSpellingLocation' to actually
    obtain spelling location instead of file location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316278 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/python/clang/cindex.py
bindings/python/tests/cindex/test_location.py
tools/libclang/CXSourceLocation.cpp