[clang-tidy] Do not dereference a null BaseType
authorChih-Hung Hsieh <chh@google.com>
Tue, 23 May 2017 16:19:04 +0000 (16:19 +0000)
committerChih-Hung Hsieh <chh@google.com>
Tue, 23 May 2017 16:19:04 +0000 (16:19 +0000)
commit2857b1245b7bab722e3a678fd4e7d65143bc0f55
treeece6396e8884e1183074d0bafc569509d16f6dc0
parentaf3d4db64bd2106383be848c46635059d20077fe
[clang-tidy] Do not dereference a null BaseType

Check BaseType before dereference.
Simplified test case is derived from Android Open Source code.

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

llvm-svn: 303645
clang-tools-extra/clang-tidy/misc/ForwardingReferenceOverloadCheck.cpp
clang-tools-extra/test/clang-tidy/misc-forwarding-reference-overload.cpp