My question is: At what phase does the compiler perform name lookup. I think it may be when it perform semantic analysis, but I just want to make sure, since when I was searching about compiler analysis, they didn’t mention name lookup in any of this phases (lexical,syntax,semantic).
My question is : At what phase does the compiler perform name lookup .
Share
In C++, name lookup generally needs to be done as part of syntax analysis (parsing), as when names are type names or template names, that affects the syntax. To the extent that things can be parsed indpendently of typenames or template names, name lookup may be deferred until later, but that’s generally an implementation detail.