[PATCH] D127284: [clang-repl] Support statements on global scope in incremental mode.

Michael Buch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 4 16:47:16 PST 2022


Michael137 added a comment.

In D127284#3969458 <https://reviews.llvm.org/D127284#3969458>, @v.g.vassilev wrote:

> In D127284#3969446 <https://reviews.llvm.org/D127284#3969446>, @v.g.vassilev wrote:
>
>>> UPDATE: fails with clean build too
>>>
>>> Might be best to revert it for now while we figure out what's wrong
>>
>> I fail to reproduce it, can you give me access to some node where I can debug? I suspect that should be something easy to fix.
>>
>> UPDATE: Reproduced it. Debugging.
>
> @Michael137, I think I understand what happens. This patch introduces a new language option which is not benign from modules perspective. However, lldb sets up modules the old way and then switches to the incremental processing mode. We have two ways to fix this:
>
> - Pass `-Xclang -fincremental-extensions` in `ClangModulesDeclVendor.cpp` and delete `instance->getPreprocessor().enableIncrementalProcessing();`; or
> - Apply https://reviews.llvm.org/D139258 which already does that.
>
> Can you check if https://reviews.llvm.org/D139258 passes the lldb testsuite. It does pass my reproduction by hand (I still cannot run full of the lldb-api tests)?

Thanks for taking a look. I tried with the suggested patch on the Objective-C API tests and there's only 1 test failure remaining there:

  lang/objc/modules-compile-error/TestModulesCompileError.py
  
  Expecting sub string: "module.h:4:1: error: unknown type name 'syntax_error_for_lldb_to_find'" (was not found)

The test expects an error string that looks like "unknown type name 'syntax_error_for_lldb_to_find' but gets use of 'undeclared identifier 'syntax_error_for_lldb_to_find'

Haven't looked much further than that. Does that sound familiar to you? I see a similar test fix as part of this patch. Maybe it's just a matter of fixing up the expected string


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127284/new/

https://reviews.llvm.org/D127284



More information about the cfe-commits mailing list