[OPENMP]Fix PR46357: Do not allow types declarations in pragmas.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 17 Jun 2020 15:02:49 +0000 (11:02 -0400)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 18 Jun 2020 17:17:03 +0000 (13:17 -0400)
commit437cbad3b35c7cf0f49d2bcea05555a521651113
tree970ec2d0052a31bf705b514c47f88aa6770d5f1a
parentce82b8e8af6d9e95e15624c4fb8af2faac68ff63
[OPENMP]Fix PR46357: Do not allow types declarations in pragmas.

Summary:
Compiler may erroneously treat current context in OpenMP pragmas as the
context where new type declaration/definition is allowed. But the
declartation/definition of the new types in OpenMP pragmas should not be
allowed.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82019
clang/include/clang/Parse/RAIIObjectsForParser.h
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseOpenMP.cpp
clang/test/OpenMP/declare_reduction_ast_print.cpp