[AST][RecoveryExpr] Fix a crash on a field decl with invalid type.
authorHaojian Wu <hokein.wu@gmail.com>
Tue, 16 Jun 2020 07:25:17 +0000 (09:25 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Tue, 16 Jun 2020 10:12:10 +0000 (12:12 +0200)
commit28923dc2dda46610e5b6ee73bf046d2bb78a1a77
treec6a853d91ac444708eea285c0ee7c02fd639b74d
parentb7084d8ede1b0c16d3426dede53ed5ce62242c42
[AST][RecoveryExpr] Fix a crash on a field decl with invalid type.

Summary:
The field decl (in the testcase) was still valid, which results in a
valid RecordDecl, it led to crash when performing struct layout,
and computing struct size etc.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81913
clang/lib/Sema/SemaDecl.cpp
clang/test/Sema/invalid-member.cpp