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

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 06:14:39 PDT 2024


vgvassilev wrote:

I realize I do not entirely understand the role of the IdResolver chain in c++. Perhaps we are better of changing this line to:

```cpp
    if (!PP.isIncrementalProcessingEnabled() || getLangOpts().ObjC)
      IdResolver.RemoveDecl(D);
 ```
 to
 ```
    if (!PP.isIncrementalProcessingEnabled() || !getLangOpts().C)
      IdResolver.RemoveDecl(D);
  ```

This way will limit the scope to the actual intent without assuming the IdResolver changes are irrelevant for languages such as C++. Can you test if that works?

https://github.com/llvm/llvm-project/pull/89804


More information about the cfe-commits mailing list