We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe0ba95 commit f928218Copy full SHA for f928218
c.c
@@ -1426,6 +1426,16 @@ static void skipToMatch (const char *const pair)
1426
}
1427
1428
1429
+ /* early out if matching "<>" and we encounter a ";" or "{" to mitigate
1430
+ * match problems with C++ generics containing a static expression like
1431
+ * foo<X<Y> bar;
1432
+ * normally neither ";" nor "{" could appear inside "<>" anyway. */
1433
+ else if (isLanguage (Lang_cpp) && begin == '<' &&
1434
+ (c == ';' || c == '{'))
1435
+ {
1436
+ cppUngetc (c);
1437
+ break;
1438
+ }
1439
1440
if (c == EOF)
1441
{
0 commit comments