diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-23 02:09:03 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-23 02:09:03 +0000 |
commit | 73c3c21fae2fc8728d6cd8526ee4a43ee8d98d35 (patch) | |
tree | c7dcd1c0a0f55f1e4ee92978d5e8952f80ea929e /clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp | |
parent | dfec3c8e950fb6a204fcb60189a13dd99fb376af (diff) | |
download | bcm5719-llvm-73c3c21fae2fc8728d6cd8526ee4a43ee8d98d35.tar.gz bcm5719-llvm-73c3c21fae2fc8728d6cd8526ee4a43ee8d98d35.zip |
Fix tracking of whether the previous template instantiation stack matches 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.
llvm-svn: 295921
Diffstat (limited to 'clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp')
-rw-r--r-- | clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp b/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp index 9f9c71a50ce..dff599b6d5b 100644 --- a/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp +++ b/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp @@ -88,7 +88,7 @@ namespace sad { CLASS<int, int> pi; - static_assert(!noexcept(pi.swap(pi)), ""); // expected-note {{in instantiation of}} + static_assert(!noexcept(pi.swap(pi)), ""); // expected-note 2{{in instantiation of exception specification for 'swap'}} } #endif |