diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-16 14:51:46 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-16 14:51:46 +0000 |
commit | 655cb4a2d702b70899f3ad384d047537e02698d8 (patch) | |
tree | a80526516048bdccc5d8eb557ba0588e2618ed62 /clang/lib/Analysis | |
parent | 22c4a147a96447b38ce90e59b27c33079f1aa203 (diff) | |
download | bcm5719-llvm-655cb4a2d702b70899f3ad384d047537e02698d8.tar.gz bcm5719-llvm-655cb4a2d702b70899f3ad384d047537e02698d8.zip |
[OPENMP]Add support for analysis of if clauses.
Summary:
Added support for analysis of if clauses in the OpenMP directives to be
able to check for the use of uninitialized variables.
Reviewers: NoQ
Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, cfe-commits
Tags: clang
Differential Revision: https://reviews.llvm.org/D64646
llvm-svn: 366211
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/CFG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index de89105a292..0ed1e988a19 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -4746,8 +4746,9 @@ CFGBlock *CFGBuilder::VisitOMPExecutableDirective(OMPExecutableDirective *D, // Reverse the elements to process them in natural order. Iterators are not // bidirectional, so we need to create temp vector. - for (Stmt *S : llvm::reverse(llvm::to_vector<8>( - OMPExecutableDirective::used_clauses_children(D->clauses())))) { + SmallVector<Stmt *, 8> Used( + OMPExecutableDirective::used_clauses_children(D->clauses())); + for (Stmt *S : llvm::reverse(Used)) { assert(S && "Expected non-null used-in-clause child."); if (CFGBlock *R = Visit(S)) B = R; |