https://bugs.llvm.org/show_bug.cgi?id=49966
Bug ID: 49966
Summary: Parser stuck in loop after commit 5ad15f4d1c6
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
One of our internal tests hit an issue where the compiler was running for hours
on a test that should compile and give an error in under a second. Judging from
the error messages that the compiler emits, it appears that it is getting stuck
in an infinite loop while parsing.
Consider the following code:
/* test4a.cpp */
[[deprecated([""])]]
Compiled with a good compiler, we expect the following error messages:
$ ~/src/upstream/eb31540066736658a71d7fc1154be8432e553a11-linux/bin/clang -c
test4a.cpp
test4a.cpp:1:15: error: expected variable name or 'this' in lambda capture list
[[deprecated([""])]]
^
test4a.cpp:1:21: error: expected ']'
[[deprecated([""])]]
^
]
test4a.cpp:1:21: error: expected ']'
[[deprecated([""])]]
^
]
test4a.cpp:1:21: error: expected external declaration
4 errors generated.
But when built with a compiler built from
5ad15f4d1c6f56d25904265023d123a7d0b9d59d, we end up with the following output:
$ ~/src/upstream/5ad15f4d1c6f56d25904265023d123a7d0b9d59d-linux/bin/clang -c
test4a.cpp
test4a.cpp:1:15: error: expected variable name or 'this' in lambda capture list
[[deprecated([""])]]
^
test4a.cpp:1:21: error: expected ','
[[deprecated([""])]]
^
,
test4a.cpp:1:21: error: expected ','
[[deprecated([""])]]
^
,
...
<same error is repeated many times>
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Ultimately I have to kill the compiler as it just keeps running indefinitely.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs