The check for the value passed to __buildtin_return_address needs to be guarded by check for the Dependent context, or else it runs into an assertion failure in the test case given below.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Fix looks fine, I'm on the fence about how to handle the test, whether it is valuable to convert it to a C++ test and omit the #ifdef/extra run line, or leave it as it is (without the 2nd run with Wmost).
I'll leave the opinion here to other reviewers/submitter to deal with before commit.
clang/test/Sema/builtin-returnaddress.c | ||
---|---|---|
3 | I don't think the -Wmost test 'RUN' line is valuable for the C++ mode, it is simply validating that this diagnostic is in Wmost mode (which running in C mode is sufficient). |
clang/test/Sema/builtin-returnaddress.c | ||
---|---|---|
3 | Good point. I will remove that. |
I don't think the -Wmost test 'RUN' line is valuable for the C++ mode, it is simply validating that this diagnostic is in Wmost mode (which running in C mode is sufficient).