[all-commits] [llvm/llvm-project] f757ec: [AST] Fix a crash on invalid bitwidth exprs when p...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Mon Mar 30 01:52:09 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f757ecbf85605735195441abefd9c291f5e317cc
https://github.com/llvm/llvm-project/commit/f757ecbf85605735195441abefd9c291f5e317cc
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-03-30 (Mon, 30 Mar 2020)
Changed paths:
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/RecordLayoutBuilder.cpp
M clang/lib/Sema/SemaDecl.cpp
A clang/test/Sema/invalid-bitwidth-expr.mm
Log Message:
-----------
[AST] Fix a crash on invalid bitwidth exprs when preserving the recoveryexprs.
Summary:
If the bitwith expr contains errors, we mark the field decl invalid.
This patch also tweaks the behavior of ObjCInterfaceDecl to be consistent with
existing RecordDecl -- getObjCLayout method is only called with valid decls.
Reviewers: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76953
More information about the All-commits
mailing list