Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
4 changed files
with
65 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters