[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 10:22:54 PDT 2024


hokein wrote:

> Oh, we need to adjust https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272 to skip in case of C++...

The link points to an irrelevant project, I assume you mean here https://github.com/llvm/llvm-project/blob/main/clang/lib/Interpreter/IncrementalParser.cpp#L416? If we need to skip for C++, I think we should do it for ObjectiveC as well, like

```
if (ND->getDeclName().getFETokenInfo()  &&
    !(!PP.isIncrementalProcessingEnabled() || getLangOpts().ObjC || getLangOpts().CPlusPlus)) {
   ...
}
```

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


More information about the cfe-commits mailing list