This revision was automatically updated to reflect the committed changes.
Closed by commit rL307371: Fix crash parsing invalid code (authored by
ogoffart).
Changed prior to commit:
https://reviews.llvm.org/D35108?vs=105590&id=105604#toc
Repository:
rL LLVM
https://reviews.llvm.org/D35108
F
rogfer01 added a comment.
Hi @ogoffart thanks for fixing this.
I suggest some minor change for the check, other than that this looks good to
me.
Comment at: lib/Sema/SemaChecking.cpp:12099
BaseType = BaseType->getPointeeType();
RecordDecl *RD = BaseType->getAs()->
ogoffart created this revision.
The code in the test caused a crash with this backtrace:
RecordLayoutBuilder.cpp:2934: const clang::ASTRecordLayout
&clang::ASTContext::getASTRecordLayout(const clang::RecordDecl *) const:
Assertion `!D->isInvalidDecl() && "Cannot get layout of invalid decl!"' fa