[OpenMP] diagnose assign to firstprivate const
Clang does not diagnose assignments to const variables declared
firstprivate. Furthermore, codegen is broken such that, at run time,
such assignments simply have no effect. For example, the following
prints 0 not 1:
int main() {
const int i = 0; #pragma omp parallel firstprivate(i) { i=1; printf("%d\n", i); } return 0;
}
This commit makes these assignments a compile error, which is
consistent with other OpenMP compilers I've tried (pgcc 17.4-0, gcc
6.3.0).
hasConst must start from capital letter HasConst.