diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-17 20:35:08 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-17 20:35:08 +0000 |
commit | e4ee647b662bd42a3cc7b96577c1b0bb3b151143 (patch) | |
tree | 7c1418a65313a726442bbad73d47acc7596c03c8 /lib | |
parent | 68798ad421f79deef8f9be75dd3c6ae3a25f412f (diff) |
[OPENMP]Dow not emit warnings for uninitialized loop counters.
In OpenMP constructs all counters are initialized and we should not emit
warnings about uninitialized privatized loop control variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/CFG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 687cf57059..54fb388b0c 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -4824,7 +4824,8 @@ CFGBlock *CFGBuilder::VisitOMPExecutableDirective(OMPExecutableDirective *D, } // Visit associated structured block if any. if (!D->isStandaloneDirective()) - if (Stmt *S = D->getStructuredBlock()) { + if (CapturedStmt *CS = D->getInnermostCapturedStmt()) { + Stmt *S = CS->getCapturedStmt(); if (!isa<CompoundStmt>(S)) addLocalScopeAndDtors(S); if (CFGBlock *R = addStmt(S)) |