[OpenMP] diagnose orphaned teams construct
authorKelvin Li <kkwli0@gmail.com>
Tue, 26 Jul 2016 04:32:50 +0000 (04:32 +0000)
committerKelvin Li <kkwli0@gmail.com>
Tue, 26 Jul 2016 04:32:50 +0000 (04:32 +0000)
commit2b51f7284b293f4cda9ba2368e9a93dc98604ed7
tree606078f187482da172876de96c30eb7a423009d0
parent06ac2f4a7e72d9635d78e4a7c6a88746a6060a4a
[OpenMP] diagnose orphaned teams construct

The OpenMP spec mandates that 'a teams construct must be contained within a
target construct'. Currently, this scenario is not diagnosed. This patch is
to add check for orphaned teams construct and issue an error message.

Differential Revision: https://reviews.llvm.org/D22785

llvm-svn: 276726
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/nesting_of_regions.cpp