ChuanqiXu9 wrote: > > We can't do that unless we lookup ahead much more till the name of the > > typedef. The point is explained before that we don't know the previous decl > > before we saw the name, where is too late. > > Agree 100%, The current approach may be the one with the fewest changes. I > was considering a different approach: use the first enumerator’s physical > file and source offset to find the corresponding anonymous enum in the > imported AST, then reuse that definition. This avoids looking ahead to the > typedef name, though it introduces source-correlated lookup in ASTReader. But > it's make things more complex. :-)
I hate using source location to do semantic analysis. That is false sharing and literally workaround. As long as we have a chance to make it through the semantic analysis, we shouldn't do that. https://github.com/llvm/llvm-project/pull/214121 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
