================
@@ -78,6 +79,20 @@ bool Parser::isCXXDeclarationStatement(
     [[fallthrough]];
     // simple-declaration
   default:
+
+    if (DisambiguatingWithExpression) {
+      TentativeParsingAction TPA(*this, true);
+      // We will do not check access checks here, because we want to allow
+      // parsing of declarations. Access will be checked later.
----------------
zwuis wrote:

Could you please elaborate? I cann't understand why "allowing parsing of 
declarations" requires suppressing access checks.

https://github.com/llvm/llvm-project/pull/178842
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to