| Issue |
208087
|
| Summary |
[clang][X86] psABI diagnostics are not emitted when no FunctionDecl is available
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
freaknbigpanda
|
We have psABI diagnostics implemented but they only work when there is a valid FunctionDecl. We should expand this to also cover cases where no FunctionDecl is available.
For example gcc emits a warning here but clang does not:
typedef short avx256Type __attribute__((vector_size(32)));
typedef void (*fp_arg_t)(avx256Type);
__attribute__((used)) static void call_fp_arg(fp_arg_t fp) {
avx256Type x = (avx256Type){0};
fp(x); // Missing -Wpsabi warning.
}
https://godbolt.org/z/6xG9EETqa
For context see discussion in https://github.com/llvm/llvm-project/pull/199091
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs