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 | 9c5d76ff4d15e2cabf976911bd150302ae5fdeea (patch) | |
| tree | 00483a9636c33c0340e87dddc2d2a77ba8c1c15b /clang/lib | |
| parent | d5282dfc410c6af5518b046c3ec02339aaf19950 (diff) | |
| download | bcm5719-llvm-9c5d76ff4d15e2cabf976911bd150302ae5fdeea.tar.gz bcm5719-llvm-9c5d76ff4d15e2cabf976911bd150302ae5fdeea.zip | |
[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.
llvm-svn: 375167
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Analysis/CFG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 687cf570591..54fb388b0c6 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/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)) |

