diff options
author | Peter Szecsi <szepet95@gmail.com> | 2018-05-02 11:52:54 +0000 |
---|---|---|
committer | Peter Szecsi <szepet95@gmail.com> | 2018-05-02 11:52:54 +0000 |
commit | ef97252a2cda8d09914ddcc7a8008356095a11a5 (patch) | |
tree | aa77acaa0efbadf8298fea1a6a3714f0d207526b /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | |
parent | 414d2358a441f12610b55bcca56485423d989346 (diff) | |
download | llvm-ef97252a2cda8d09914ddcc7a8008356095a11a5.zip llvm-ef97252a2cda8d09914ddcc7a8008356095a11a5.tar.gz llvm-ef97252a2cda8d09914ddcc7a8008356095a11a5.tar.bz2 |
[ASTImporter] Fix isa cast assert
Do early return if we can't import the found decl for a member expr.
This follows the pre-existing scheme, e.g with E->getMemberDecl().
E->getFoundDecl().getDecl() can be null when a member expression does
not involve lookup. It may involve a lookup in case of a using directive
which refers to a member function in a base class template.
We faced this assert during the CTU analysis of google::protobuf v3.5.2.
We tried hard to synthesize a minimal test example both by hand and by
executing creduce on multiple files. Unfortunately, we were unable to reduce
to such a minimal example, yet. Nevertheless, this fix solved the problem in
protobuf.
To reproduce the error one must execute the analyzer with
-Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true -Xclang -analyzer-config -Xclang ctu-dir=/path/to/ctu_dir
Patch by Gabor Marton!
Differential Revision: https://reviews.llvm.org/D46019
llvm-svn: 331344
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
0 files changed, 0 insertions, 0 deletions