Clang asserts on any undeclared variables on the to or link clause in the declare target directive. The patch is to properly diagnose the error.
// foo1 and foo2 are not declared #pragma omp declare target to(foo1) #pragma omp declare target link(foo2)
The diagnostic messages are:
d1.cpp:3:31: error: use of undeclared identifier 'foo1' #pragma omp declare target to(foo1) ^ d1.cpp:4:33: error: use of undeclared identifier 'foo2' #pragma omp declare target link(foo2) ^ 2 errors generated.