[PATCH] D35108: Fix crash parsing invalid code

2017-07-07 Thread Olivier Goffart via Phabricator via cfe-commits
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

[PATCH] D35108: Fix crash parsing invalid code

2017-07-07 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
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()->

[PATCH] D35108: Fix crash parsing invalid code

2017-07-07 Thread Olivier Goffart via Phabricator via cfe-commits
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