[all-commits] [llvm/llvm-project] 041080: [AST] Fix a crash on invalid constexpr Ctorinitial...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Tue Apr 7 05:34:22 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 041080c247351da15b6bb21a7196c8dc9bc6babc
https://github.com/llvm/llvm-project/commit/041080c247351da15b6bb21a7196c8dc9bc6babc
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-04-07 (Tue, 07 Apr 2020)
Changed paths:
M clang/lib/AST/ExprConstant.cpp
A clang/test/SemaCXX/invalid-constructor-init.cpp
Log Message:
-----------
[AST] Fix a crash on invalid constexpr Ctorinitializer when building RecoveryExpr.
Summary:
crash stack:
```
lang: workspace/llvm-project/clang/lib/AST/ExprConstant.cpp:13704: bool EvaluateInPlace(clang::APValue &, (anonymous namespace)::EvalInfo &, const (anonymous namespace)::LValue &, const clang::Expr *, bool): Assertion `!E->isValueDependent()' failed.
#8 EvaluateInPlace(clang::APValue&, (anonymous namespace)::EvalInfo&, (anonymous namespace)::LValue const&, clang::Expr const*, bool) workspace/llvm-project/clang/lib/AST/ExprConstant.cpp:0:0
#9 HandleConstructorCall(clang::Expr const*, (anonymous namespace)::LValue const&, clang::APValue*, clang::CXXConstructorDecl const*, (anonymous namespace)::EvalInfo&, clang::APValue&) workspace/llvm-project/clang/lib/AST/ExprConstant.cpp:5779:57
#10 HandleConstructorCall(clang::Expr const*, (anonymous namespace)::LValue const&, llvm::ArrayRef<clang::Expr const*>, clang::CXXConstructorDecl const*, (anonymous namespace)::EvalInfo&, clang::APValue&) workspace/llvm-project/clang/lib/AST/ExprConstant.cpp:5819:10
#11 clang::Expr::isPotentialConstantExpr(clang::FunctionDecl const*, llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic> >&) workspace/llvm-project/clang/lib/AST/ExprConstant.cpp:14746:5
#12 CheckConstexprFunctionBody(clang::Sema&, clang::FunctionDecl const*, clang::Stmt*, clang::Sema::CheckConstexprKind) workspace/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:2306:7
#13 clang::Sema::CheckConstexprFunctionDefinition(clang::FunctionDecl const*, clang::Sema::CheckConstexprKind) workspace/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:1766:0
#14 clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) workspace/llvm-project/clang/lib/Sema/SemaDecl.cpp:14357:9
#15 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) workspace/llvm-project/clang/lib/Parse/ParseStmt.cpp:2213:18
```
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: rsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77041
More information about the All-commits
mailing list