diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-30 15:12:28 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-30 15:12:28 +0000 |
commit | fc600dc2ec249a9fa37b7a62847d1477e4b4bb2e (patch) | |
tree | e474ea4062e499697145c793a551d72a64a311c5 /clang/lib/AST/Stmt.cpp | |
parent | 2985400a0e3437ddec523563b9403347c8bcd85f (diff) | |
download | bcm5719-llvm-fc600dc2ec249a9fa37b7a62847d1477e4b4bb2e.tar.gz bcm5719-llvm-fc600dc2ec249a9fa37b7a62847d1477e4b4bb2e.zip |
[OpenMP] Make the filetered clause iterator a real iterator and type safe.
This replaces the filtered generic iterator with a type-specfic one based
on dyn_cast instead of comparing the kind enum. This allows us to use
range-based for loops and eliminates casts. No functionality change
intended.
llvm-svn: 246384
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 22b557dadc6..2169da32453 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -1621,18 +1621,6 @@ OMPDependClause *OMPDependClause::CreateEmpty(const ASTContext &C, unsigned N) { return new (Mem) OMPDependClause(N); } -const OMPClause * -OMPExecutableDirective::getSingleClause(OpenMPClauseKind K) const { - auto &&I = getClausesOfKind(K); - - if (I) { - auto *Clause = *I; - assert(!++I && "There are at least 2 clauses of the specified kind"); - return Clause; - } - return nullptr; -} - OMPParallelDirective *OMPParallelDirective::Create( const ASTContext &C, SourceLocation StartLoc, |