Do not do raw name replacement when FromDecl is a class forward-declaration.
authorEric Liu <ioeric@google.com>
Fri, 25 Nov 2016 16:02:49 +0000 (16:02 +0000)
committerEric Liu <ioeric@google.com>
Fri, 25 Nov 2016 16:02:49 +0000 (16:02 +0000)
commit6135581cdf5c6309614c47845a1d2f58f7bef595
tree81aa14ebaadb629727632d6b1ae7f5425cd4a3e1
parent84b6f26eca491a756afe9b4e8025aaa1c63ad122
Do not do raw name replacement when FromDecl is a class forward-declaration.

Summary:
If the `FromDecl` is a class forward declaration, the reference is
still considered as referring to the original definition given the nature
of forward-declarations, so we can't do a raw name replacement in this case.

Reviewers: bkramer

Subscribers: cfe-commits, klimek

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

llvm-svn: 287929
clang/lib/Tooling/Core/Lookup.cpp
clang/unittests/Tooling/LookupTest.cpp