]> granicus.if.org Git - clang/commit
Correctly check if a cursor is a declaration before returning its location/range...
authorTed Kremenek <kremenek@apple.com>
Wed, 12 May 2010 06:00:25 +0000 (06:00 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 12 May 2010 06:00:25 +0000 (06:00 +0000)
commitb5fb6acf2d0c6c43cc494192af77798cf1723c79
treeeac202c76d71c4e4577ff935acc9ef0e0781719f
parentab1af606a9ff00d892336b8025fcae345709a3dc
Correctly check if a cursor is a declaration before returning its location/range in clang_getCursorLocation()/clang_getCursorExtent().  This fixes a horrible bug reported in
<rdar://problem/7961995> and <rdar://problem/7967123> where declarations with attributes
would get grossly annotated with the wrong tokens because the attribute would be interpreted
as if it was a Decl*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103581 91177308-0d34-0410-b5e6-96231b3b80d8
test/Index/annotate-tokens.m
tools/libclang/CIndex.cpp