mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Fixes #167905 --- This patch addresses an issue where invalid nested name specifier sequences containing a single colon (`a:c::`) could be treated during recovery as valid scope specifiers, which in turn led to a crashc543615744/clang/lib/Parse/ParseExprCXX.cpp (L404-L418)For malformed inputs like `a:c::`, the single colon recovery incorrectly triggers and produces an `annot_cxxscope`. When tentative parsing later runs996213c6ea/clang/lib/Parse/ParseTentative.cpp (L1739-L1740)the classifier returns `Ambiguous`, which doesn't stop parsing. The parser then enters the996213c6ea/clang/lib/Parse/ParseTentative.cpp (L1750-L1752)and consumes the invalid scope annotation, eventually reaching `EOF` and crashing.