[PATCH] D37881: [Sema] Prevent InstantiateClass from checking unrelated exception specs.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 14 18:43:00 PDT 2017
vsapsai created this revision.
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
Cc Dimitry Andric due to participation in discussion about PR24000.
https://reviews.llvm.org/D37881
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/test/SemaTemplate/crash-unparsed-exception.cpp
clang/test/SemaTemplate/default-arguments-cxx0x.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37881.115334.patch
Type: text/x-patch
Size: 5245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170915/425a0b01/attachment.bin>
More information about the cfe-commits
mailing list