]> granicus.if.org Git - clang/commit
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)
commitc806720c5559c981bd7917c2c1f426840c59e8f0
tree59cf929cb73bdbcfc3bf28492b9ec903c5b7d46f
parent975dfbe202fd3217ede25ef210938482b2faaeb2
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221955 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Parse/ParseDecl.cpp
lib/Sema/SemaExceptionSpec.cpp
test/SemaCXX/libstdcxx_explicit_init_list_hack.cpp [moved from test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp with 100% similarity]
test/SemaCXX/libstdcxx_pair_swap_hack.cpp [new file with mode: 0644]