[all-commits] [llvm/llvm-project] f0084c: [AST][RecoveryExpr] Fix a crash: don't attach erro...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Wed Jun 24 01:14:24 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f0084c3bcbc2f2e17ab1a24d19ac6738eb4c4263
https://github.com/llvm/llvm-project/commit/f0084c3bcbc2f2e17ab1a24d19ac6738eb4c4263
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-06-24 (Wed, 24 Jun 2020)
Changed paths:
M clang/lib/Sema/SemaDeclCXX.cpp
A clang/test/SemaCXX/invalid-template-base-specifier.cpp
Log Message:
-----------
[AST][RecoveryExpr] Fix a crash: don't attach error-type base specifiers.
Summary:
otherwise we'll run into code path which expects a good base specifiers,
and lead to crashes.
The crash only occurs in template instantiations (in non-template case,
the bad base specifiers are dropped during parsing.)
crash stacktrace:
```
clang: llvm-project/clang/lib/Sema/SemaInit.cpp:7864: clang::ExprResult clang::InitializationSequence::Perform(clang::Sema &, const clang::InitializedEntity &, const clang::InitializationKind &, clang::MultiExprArg, clang::QualType *): Assertion `Kind.getKind() == InitializationKind::IK_Copy || Kind.isExplicitCast() || Kind.getKind() == InitializationKind::IK_DirectList' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
```
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82086
More information about the All-commits
mailing list