[all-commits] [llvm/llvm-project] d999ce: Reland "[clang-repl] Extend the C support. (#89804)"

Vassil Vassilev via All-commits all-commits at lists.llvm.org
Tue Jun 4 06:55:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d999ce0302f06d250f6d496b56a5a5f2dc331e61
      https://github.com/llvm/llvm-project/commit/d999ce0302f06d250f6d496b56a5a5f2dc331e61
  Author: Vassil Vassilev <v.g.vassilev at gmail.com>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M clang/lib/Interpreter/IncrementalParser.cpp
    M clang/lib/Sema/SemaDecl.cpp
    A clang/test/Interpreter/execute.c

  Log Message:
  -----------
  Reland "[clang-repl] Extend the C support. (#89804)"

Original commit message:"

[clang-repl] Extend the C support. (#89804)

The IdResolver chain is the main way for C to implement lookup rules.  Every new
partial translation unit caused clang to exit the top-most scope which in turn
cleaned up the IdResolver chain. That was not an issue for C++ because its
lookup is implemented on the level of declaration contexts.

This patch keeps the IdResolver chain across partial translation units
maintaining proper C-style lookup infrastructure.
"

It was reverted in dfdf1c5fe45a82b9c578306f3d7627fd251d63f8 because it broke the
bots of lldb. This failure was subtle to debug but the current model does not
work well with ObjectiveC support in lldb. This patch does cleans up the
partial translation units in ObjectiveC. In future if we want to support
ObjectiveC we need to understand what exactly lldb is doing when recovering from
errors...



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