summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-12-19 23:52:45 +0000
committerNico Weber <nicolasweber@gmx.de>2014-12-19 23:52:45 +0000
commite497438c9c4eb0b01f09abda27731bcfaccf1996 (patch)
treebc102f925bee00e41d27b2b42bfdac47bbd79ca3 /libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
parent8985ba912f00de68f3fccf8bf440a30bf5bdb89e (diff)
downloadbcm5719-llvm-e497438c9c4eb0b01f09abda27731bcfaccf1996.tar.gz
bcm5719-llvm-e497438c9c4eb0b01f09abda27731bcfaccf1996.zip
Don't drop attributes when checking explicit specializations.
Consider a template class with attributes on a method, and an explicit specialization of that method: template <int> struct A { void foo() final; }; template <> void A<0>::foo() {} In this example, the attribute is `final`, but it might also be an __attribute__((visibility("foo"))), noreturn, inline, etc. clang's current behavior is to strip all attributes, which for some attributes is wrong (the snippet above allows a subclass of A<0> to override the final method, for example) and for others disagrees with gcc. So stop dropping attributes. r95845 added this code without a test case, and r176728 added the code for dropping attributes on parameters (with tests, but they still pass). As an additional wrinkle, do drop dllimport and dllexport, since that's how these two attributes work. (This is covered by existing tests.) Fixes PR21942. The approach is by Richard Smith, initial analysis and typing was done by me. With this, clang also matches GCC and EDG on all attributes Richard tested. llvm-svn: 224651
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud