[all-commits] [llvm/llvm-project] a45dd8: [Concepts] Fix a deserialization crash.
Haojian Wu via All-commits
all-commits at lists.llvm.org
Mon Aug 3 06:50:50 PDT 2020
Branch: refs/heads/release/11.x
Home: https://github.com/llvm/llvm-project
Commit: a45dd85fe4ccf721dc5ab01768c79bce73ff3474
https://github.com/llvm/llvm-project/commit/a45dd85fe4ccf721dc5ab01768c79bce73ff3474
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-08-03 (Mon, 03 Aug 2020)
Changed paths:
M clang/lib/Serialization/ASTReaderDecl.cpp
A clang/test/PCH/cxx2a-constraints-crash.cpp
Log Message:
-----------
[Concepts] Fix a deserialization crash.
`TemplateTypeParmDecl::hasTypeConstraint` is not a safe guard for
checking `TemplateTypeParmDecl::getTypeConstraint()` result is null.
in somecases (e.g. implicit deduction guide templates synthesized from the
constructor, immediately-declared constraint is not formed because of an error),
hasTypeConstraint returns false, and getTypeConstraint returns a nullptr.
Fix https://bugs.llvm.org/show_bug.cgi?id=46790
Differential Revision: https://reviews.llvm.org/D84455
(cherry picked from commit 73c12bd8ff1a9cd8375a357ea06f171e127ec1b8)
More information about the All-commits
mailing list