]> granicus.if.org Git - clang/commit
[Sema] Avoid iterator invalidation when code completing.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 13 Oct 2017 22:14:34 +0000 (22:14 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 13 Oct 2017 22:14:34 +0000 (22:14 +0000)
commit912dc999b86bb9fd2e7fa5f275bd373d19237787
treec4a245420751681985b2973db801bfe952b49e7c
parentf9470527074c034b3f6da4b894416baf1c3998a7
[Sema] Avoid iterator invalidation when code completing.

It's possible for the code completion consumer to add new decls to the
current scope while lookup happens on it. Avoid this by making a copy
first.

Sadly I wasn't able to get a self-contained test case for this as it
requires code completion + precompiled preamble + the stars aligning to
deserialize at exactly the right time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315772 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaLookup.cpp