================ @@ -2222,8 +2222,15 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec( } } - if (SS.isEmpty()) + if (SS.isEmpty()) { + if (getLangOpts().ObjC && !getLangOpts().CPlusPlus && ---------------- cyndyishida wrote:
I'm wondering if it's valid for C code to enter this block, iow, can we remove the `getLangOpts().ObjC` check? I notice a similar check in https://github.com/llvm/llvm-project/blob/ec903eb3fcd18ba53af901582060bd61b13cf324/clang/lib/Parse/Parser.cpp#L2170 that also looks added to resolve a hang. https://github.com/llvm/llvm-project/pull/119908 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits