| Issue |
204413
|
| Summary |
[OpenMP] Bogus warning about undefined function when a variant was selected for a call
|
| Labels |
clang:openmp
|
| Assignees |
|
| Reporter |
Endilll
|
The following example (https://godbolt.org/z/96hvs3K1j):
```cpp
static void also_before(void);
#pragma omp begin declare variant match(implementation={vendor(llvm)})
static void also_after(void) {};
static void also_before(void) {};
#pragma omp end declare variant
static void also_after(void);
int main(void) {
(also_after)();
(also_before)();
(&also_after)();
(&also_before)();
}
```
produces the following errors on Clang 21 and trunk:
```
<source>:1:13: warning: function 'also_before' has internal linkage but is not defined [-Wundefined-internal]
1 | static void also_before(void);
| ^
<source>:12:4: note: used here
12 | (also_before)();
| ^
1 warning generated.
```
This diagnostic is issued despite the fact that the emitted LLVM IR uses only the functions defined withing the `variant` clause.
CC @jdoerfert
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs