llvm-project
802d8d90 - [Clang] Don't ditch typo-corrected lookup result (#139374)

Commit
183 days ago
[Clang] Don't ditch typo-corrected lookup result (#139374) For a member function call like 'foo.bar<int>()', there are two typo-correction points after parsing the dot. The first occurs in ParseOptionalCXXScopeSpecifier, which tries to annotate the template name following any scope specifiers. If the template name bar is not found within 'foo', the parser was previously instructed to drop any function templates found outside of the scope. This was intended to prevent ambiguity in expressions like 'foo->bar < 7', as explained in commit 50a3cddd. However, it's unnecessary to discard typo-corrected results that were strictly resolved within the scope 'foo'. We won't perform a second typo-correction in ParseUnqualifiedId after the name being annotated. Fixes https://github.com/llvm/llvm-project/issues/139226
Author
Parents
Loading