[libclang] evalute compound statement cursors before trying to evaluate
authorAlex Lorenz <arphaman@gmail.com>
Mon, 9 Jul 2018 19:41:28 +0000 (19:41 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 9 Jul 2018 19:41:28 +0000 (19:41 +0000)
commit81f157b40fbc5c369a9a118143bb559a2ecd93f7
tree7c553f3ad531cf787589678a5966ded8ffbfe6be
parent9481399c0fd2c198c81b92636c0dcff7d4c41df2
[libclang] evalute compound statement cursors before trying to evaluate
the cursor like a declaration

This change fixes a bug in libclang in which it tries to evaluate a statement
cursor as a declaration cursor, because that statement still has a pointer to
the declaration parent.

rdar://38888477

Differential Revision: https://reviews.llvm.org/D49051

llvm-svn: 336590
clang/tools/libclang/CIndex.cpp
clang/unittests/libclang/LibclangTest.cpp