================
@@ -1148,4 +1151,37 @@ TEST_F(TokenCollectorTest, Pragmas) {
     }
   )cpp");
 }
+
+TEST_F(TokenBufferTest, EofTokenOnFunctionScopeDepthLimit) {
+  static_assert(ParmVarDecl::getMaxFunctionScopeDepth() == 127,
+                "Test input relies on a max depth of 127");
+
+  // Force parser to bail out due to exceeding the function scope depth limit.
----------------
hbatagelo wrote:

`EofTokenOnFunctionScopeDepthLimit` seems to be about 3x the cost of 
`EofTokenOnBracketDepthLimit`. Indeed, the latter is enough to exercise the new 
code. I'll drop the first.

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

Reply via email to