summaryrefslogtreecommitdiff
path: root/test/SemaCXX/libstdcxx_pair_swap_hack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix tracking of whether the previous template instantiation stack matches ↵Richard Smith2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | the current one. Rather than attempting to compare whether the previous and current top of context stack are "equal" (which fails for a number of reasons, such as the context stack entries containing pointers to objects on the stack, or reaching the same "top of stack" entry through two different paths), track the depth of context stack at which we last emitted a note and invalidate it when we pop the context stack to less than that depth. This causes us to emit some missing "in instantiation of" notes and to stop emitting redundant "in instantiation of" stacks matching the previous stack in rare cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295921 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend hack to work around bad exception specifications for 'swap' members toRichard Smith2016-10-191-2/+16
| | | | | | | also cover libstdc++'s std::__debug::array and std::__profile::array. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284669 91177308-0d34-0410-b5e6-96231b3b80d8
* DR1330: instantiate exception-specifications when "needed". We previously didRichard Smith2016-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | not instantiate exception specifications of functions if they were only used in unevaluated contexts (other than 'noexcept' expressions). In C++17 onwards, this becomes essential since the exception specification is now part of the function's type. Note that this means that constructs like the following no longer work: struct A { static T f() noexcept(...); decltype(f()) *p; }; ... because the decltype expression now needs the exception specification of 'f', which has not yet been parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284549 91177308-0d34-0410-b5e6-96231b3b80d8
* PR28423: Compare primary declaration contexts.Vassil Vassilev2016-08-201-0/+5
| | | | | | | | | | | | In certain cases (mostly coming from modules), Sema's idea of the StdNamespace does not point to the first declaration of namespace std. Patch by Cristina Cristescu! Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279371 91177308-0d34-0410-b5e6-96231b3b80d8
* PR21565: Further refine the conditions for enabling eager parsing ofRichard Smith2014-11-201-10/+37
| | | | | | | | | std::X::swap exception specifications (allowing parsing of non-conforming code in libstdc++). The old conditions also matched the functions in MSVC's STL, which were relying on deferred parsing here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222471 91177308-0d34-0410-b5e6-96231b3b80d8
* PR21565 Add an egregious hack to support broken libstdc++ headers that declareRichard Smith2014-11-141-0/+47
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