Commit 0233a13
authored
[Clang][Lex] Fix parsing of nested requirement to prevent flowing off the end of token stream (#73691)
Currently when parsing a nested requirement we attempt to balance parens
if we have a parameter list. This will fail in some cases of ill-formed
code and keep going until we fall off the token stream and crash. This
fixes the hand parsing by using SkipUntil which will properly flag if we
don't find the expected tokens.
Fixes: #731121 parent 770dc47 commit 0233a13
File tree
3 files changed
+15
-2
lines changed- clang
- docs
- lib/Parse
- test/Parser
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
793 | 796 | | |
794 | 797 | | |
795 | 798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3635 | 3635 | | |
3636 | 3636 | | |
3637 | 3637 | | |
3638 | | - | |
3639 | | - | |
3640 | 3638 | | |
3641 | 3639 | | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
3642 | 3644 | | |
3643 | 3645 | | |
3644 | 3646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments