This is an archive of the discontinued LLVM Phabricator instance.

[clang] remove old HACK for libstdc++ std::swap on exception specification bug
DraftPublic

Authored by mizvekov on Jul 14 2021, 9:20 AM.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Summary

This removes a workaround for a libstdc++ bug where we need to eagerly
parse the exception specification.

libstdc++ had a bug where it shadows std::swap with a
member swap function then tries to call std::swap unqualified from the
exception specification of that function.

We would workaround that by detecting whether we were in such a case
and turn off delay-parsing of exception specifications.

Libstdc++ 6.1 (released 2016-04-27) appears to have resolved it as side-effect
of commit ddb63209a8d (2015-06-05).

GCC 10.1, released on May 7, 2020, appears to parse the exception
specification correctly, and does not include any sort of workaround for
std:: / system headers.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Diff Detail

Event Timeline

mizvekov created this revision.Jul 14 2021, 9:20 AM
mizvekov updated this revision to Diff 358645.Jul 14 2021, 9:37 AM
mizvekov edited the summary of this revision. (Show Details)

.

clang/lib/Sema/SemaExceptionSpec.cpp