-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang-tidy crashes when it encounters #embed in C code #107724
Labels
Comments
@llvm/issue-subscribers-clang-static-analyzer Author: Crest (Crest)
I ran into the following crash trying to run clang-tidy on some code using C23 `#embed` to include a JSON schema file into a `const char []`. The shortened output from clang-tidy (the [full-output](https://github.com/user-attachments/files/16920084/clang-tidy19-embed-crash.txt) is attached just in case):
```
LLVM ERROR: Support for EmbedExpr is not implemented.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/local/llvm19/bin/clang-tidy main.c -- -I/usr/local/include -fblocks
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling get_schema at line 99
#1 Calling main
3. /home/crest/friendly-s6/main.c:1074:3: Error evaluating statement
4. /home/crest/friendly-s6/main.c:1074:3: Error evaluating statement
```
Here's the trimmed down code to the function that triggers the error (with line numbers to match up against the crash report).
|
steakhal
pushed a commit
that referenced
this issue
Sep 9, 2024
steakhal
pushed a commit
to steakhal/llvm-project
that referenced
this issue
Sep 9, 2024
Fix llvm#107724. (cherry picked from commit d84d955)
tru
pushed a commit
to steakhal/llvm-project
that referenced
this issue
Sep 10, 2024
Fix llvm#107724. (cherry picked from commit d84d955)
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this issue
Sep 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into the following crash trying to run clang-tidy on some code using C23
#embed
to include a JSON schema file into aconst char []
. The shortened output from clang-tidy (the full-output is attached just in case):Here's the trimmed down code to the function that triggers the error (with line numbers to match up against the crash report).
The text was updated successfully, but these errors were encountered: