[c++20] Compute exception specifications for defaulted comparisons.
authorRichard Smith <richard@metafoo.co.uk>
Fri, 13 Dec 2019 22:11:04 +0000 (14:11 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Mon, 16 Dec 2019 06:02:31 +0000 (22:02 -0800)
commit4a4e90a823882399fe22374629f79f1edd123d01
tree92a1eb495761fc94895647117df1284926d20b9d
parentfbf60b7dbeb0f66b45037925c384859f2f161504
[c++20] Compute exception specifications for defaulted comparisons.

This requires us to essentially fully form the body of the defaulted
comparison, but from an unevaluated context. Naively this would require
generating the function definition twice; instead, we ensure that the
function body is implicitly defined before performing the check, and
walk the actual body where possible.
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExceptionSpec.cpp
clang/test/CXX/class/class.compare/class.compare.default/p3.cpp
clang/test/CXX/class/class.compare/class.compare.default/p4.cpp
clang/test/CXX/except/except.spec/p11-2a.cpp [new file with mode: 0644]