[clang] [clang-repl] Allow private type aliases in out-of-line member function return types (PR #178842)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 2 08:23:40 PST 2026
vgvassilev wrote:
> > I think we should move towards tentative parsing as my comment under the previous PR suggests. I still think that the `SuppressAccessChecks` approach is not correct. We should teach the relevant tentative parsing logic to understand that we are defining an out of line constructor and tell us that's not a statement.
>
> Okay. I will check the logic of `ParseDeclarationOrFunctionDefinition`. Another question is, can we use it directly tentatively? If it runs okay, it means we found a decl, that is good. Otherwise, this is a stml, then we run `parseTopLevelStml`. Is it okay?
Have a look around the tentative parsing and you will probably see what you need. It is basically a negative filter. You do the parsing steps which take for the real declaration and at the moment it is not, you exit. Eg, in this case when you realize that you are not processing a statement...
https://github.com/llvm/llvm-project/pull/178842
More information about the cfe-commits
mailing list