[all-commits] [llvm/llvm-project] 2e38c5: [clang-repl] Fix remove invalidates iterators in C...

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Tue Mar 26 07:07:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e38c50e5c53d66d4968fbd47b78e71a220a28ca
      https://github.com/llvm/llvm-project/commit/2e38c50e5c53d66d4968fbd47b78e71a220a28ca
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    M clang/include/clang/AST/DeclContextInternals.h
    M clang/lib/Interpreter/IncrementalParser.cpp

  Log Message:
  -----------
  [clang-repl] Fix remove invalidates iterators in CleanUpPTU() (#85378)

Using remove() on DeclContext::lookup_result list invalidates iterators.

This assertion failure was one (fortunate) symptom:
```
clang/include/clang/AST/DeclBase.h:1337: reference clang::DeclListNode::iterator::operator*() const: Assertion `Ptr && "dereferencing end() iterator"' failed.
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list