Commit Graph

2 Commits

Author SHA1 Message Date
Volodymyr Sapsai 4fbaa62b60 [Sema] Prevent InstantiateClass from checking unrelated exception specs.
Sema::InstantiateClass should check only exception specs added during
class instantiation and ignore already present delayed specs. This fixes
a case where we instantiate a class before parsing member initializers,
check exceptions for a different class and fail to find a member
initializer. Which is required for comparing exception specs for
explicitly-defaulted and implicit default constructor. With the fix we
are still checking exception specs but only after member initializers
are present.

Removing errors in crash-unparsed-exception.cpp is acceptable according
to discussion in PR24000 because other compilers accept code in
crash-unparsed-exception.cpp as valid.

rdar://problem/34167492

Reviewers: davide, rsmith

Reviewed By: rsmith

Subscribers: dim, cfe-commits

Differential Revision: https://reviews.llvm.org/D37881

llvm-svn: 313906
2017-09-21 19:54:12 +00:00
Davide Italiano 922b702bf9 [SemaTemplate] Detect instantiation of unparsed exceptions.
This fixes the clang crash reported in PR24000.

Differential Revision:	http://reviews.llvm.org/D11341

llvm-svn: 243196
2015-07-25 01:19:32 +00:00