]> granicus.if.org Git - clang/commit
Fix tracking of whether the previous template instantiation stack matches the current...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 23 Feb 2017 02:09:03 +0000 (02:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 23 Feb 2017 02:09:03 +0000 (02:09 +0000)
commit1a04b13fd8f7b63a60f34c0e64dd184559ba8c74
treed85b65e0a5e825cd89c5ab35cc3c64b5f924deaa
parentcf0ea16a2daa40c51bc75d21f109d9667cc88177
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295921 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/CXX/drs/dr4xx.cpp
test/SemaCXX/cxx1y-generic-lambdas.cpp
test/SemaCXX/libstdcxx_pair_swap_hack.cpp
test/SemaCXX/make_integer_seq.cpp