Fix segfault on incomplete types
authorPaul Chaignon <paul.chaignon@gmail.com>
Wed, 23 Aug 2017 05:25:30 +0000 (07:25 +0200)
committerBrenden Blanco <bblanco@gmail.com>
Wed, 23 Aug 2017 17:18:38 +0000 (10:18 -0700)
commitd32a61b076ded297afab5bbbb7fd6178ee274e71
treebae8c8fc60afaf99bf6fcc5400c6695672a01322
parent574c3ebc62a130b464567e6f8e309145f727d4bf
Fix segfault on incomplete types

The bcc rewriter segfaults when it encounters an incomplete type
(missing declaration or declaration after use) in a map declaration.
This commit fixes it by first checking the type and returning an
error if it is incomplete.
src/cc/frontends/clang/b_frontend_action.cc