summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-04-02 07:48:16 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-04-02 07:48:16 +0000
commita8d4a5434688bd4a724a404f4244d2af026752bf (patch)
tree1f8f15bbcbf73344b89a33bf79c8705d72aab261 /clang/lib/Parse/ParseOpenMP.cpp
parentb709f8b6ef470c96dc48bcd79548e5d8e4116586 (diff)
downloadbcm5719-llvm-a8d4a5434688bd4a724a404f4244d2af026752bf.tar.gz
bcm5719-llvm-a8d4a5434688bd4a724a404f4244d2af026752bf.zip
[OPENMP] Fix crash on private variables not used in OpenMP region.
llvm-svn: 233902
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 764619aae6f..143ef704db9 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -257,13 +257,8 @@ Parser::ParseOpenMPDeclarativeOrExecutableDirective(bool StandAloneAllowed) {
// Parse statement
AssociatedStmt = ParseStatement();
Actions.ActOnFinishOfCompoundStmt();
- if (!AssociatedStmt.isUsable()) {
- Actions.ActOnCapturedRegionError();
- CreateDirective = false;
- } else {
- AssociatedStmt = Actions.ActOnCapturedRegionEnd(AssociatedStmt.get());
- CreateDirective = AssociatedStmt.isUsable();
- }
+ AssociatedStmt = Actions.ActOnOpenMPRegionEnd(AssociatedStmt, Clauses);
+ CreateDirective = AssociatedStmt.isUsable();
}
if (CreateDirective)
Directive = Actions.ActOnOpenMPExecutableDirective(
OpenPOWER on IntegriCloud