Go to file
Roman Lebedev b32a02b5bc Revert "[OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none)."
This implementation isn't sound as per the standard.
It erroneously diagnoses e.g. the following case:
```
$ cat test.cpp
void f(int n) {
 #pragma omp parallel default(none) if(n)
    ;
}
```
```
$ ./bin/clang -fopenmp test.cpp
test.cpp:2:40: error: variable 'n' must have explicitly specified data sharing attributes
 #pragma omp parallel default(none) if(n)
                                       ^
test.cpp:2:31: note: explicit data sharing attribute requested here
 #pragma omp parallel default(none) if(n)
                              ^
1 error generated.
```

As per OpenMP Application Programming Interface Version 5.0 November 2018:
* 2.19.4.1default Clause
  The default clause explicitly determines the data-sharing attributes of
  variables that are referenced *in a parallel, teams, or task generating
  construct and would otherwise be implicitly determined
  (see Section 2.19.1.1 on page 270).
* 2.6.1 Determining the Number of Threads for a parallel Region
  Using a variable in an if or num_threads clause expression of a parallel
  construct causes an implicit reference to the variable in all enclosing
  constructs. The if clause expression and the num_threads clause expression
  are evaluated in the context outside of the parallel construct,

This reverts commit r360073.

llvm-svn: 360326
2019-05-09 10:47:45 +00:00
clang Revert "[OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none)." 2019-05-09 10:47:45 +00:00
clang-tools-extra [clang-tidy] Update documentation on ReSharper integration. 2019-05-08 18:12:12 +00:00
compiler-rt [scudo][standalone] Introduce the chunk header 2019-05-08 21:54:02 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx force the bots to cycle 2019-05-09 02:34:37 +00:00
libcxxabi minor cmake formatting style fix 2019-05-07 13:14:14 +00:00
libunwind [gn] Support for building libunwind 2019-05-02 17:29:37 +00:00
lld [LLD][NFC] Refactor: BuildID hash size now computed in one place. 2019-05-09 08:08:09 +00:00
lldb Fix up lldb after clang r360311. 2019-05-09 04:40:57 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [SPIR] Simplified target checking. 2019-05-09 10:16:33 +00:00
openmp [OpenMP] Workaround gfortran bugzilla build bug 41755 2019-05-08 23:12:31 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [polly][SCEV] Expand SCEV matcher cases for new smin/umin ops 2019-05-08 10:36:04 +00:00
pstl [pstl] Make the default backend be the serial backend and always provide parallel policies 2019-04-24 20:12:36 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.