summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-08-30 15:12:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-08-30 15:12:28 +0000
commitfc600dc2ec249a9fa37b7a62847d1477e4b4bb2e (patch)
treee474ea4062e499697145c793a551d72a64a311c5 /clang/lib/AST/Stmt.cpp
parent2985400a0e3437ddec523563b9403347c8bcd85f (diff)
downloadbcm5719-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.cpp12
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,
OpenPOWER on IntegriCloud