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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to