PR21565 Add an egregious hack to support broken libstdc++ headers that declare
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 14 Nov 2014 00:37:55 +0000 (00:37 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 14 Nov 2014 00:37:55 +0000 (00:37 +0000)
commit6403e937d65dbd3c48ff52f1df6eb579f76d53e6
tree8b5742ce3adb89dce49f19144294716dcccec416
parent283bc2ed28f423c29ab57a2b491d2ebdb53a4b12
PR21565 Add an egregious hack to support broken libstdc++ headers that declare
a member named 'swap' and then expect unqualified lookup for the name 'swap' in
its exception specification to find anything else.

Without delay-parsed exception specifications, this was ill-formed (NDR) by
[basic.scope.class]p1, rule 2. With delay-parsed exception specifications, the
call to 'swap' unambiguously finds the function being declared, which then
fails because the arguments don't work for that function.

llvm-svn: 221955
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Sema/SemaExceptionSpec.cpp
clang/test/SemaCXX/libstdcxx_explicit_init_list_hack.cpp [moved from clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp with 100% similarity]
clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp [new file with mode: 0644]