diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2019-04-12 15:36:02 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2019-04-12 15:36:02 +0000 |
commit | 78607564933f0543d0e9cc402b7652be7ec59b71 (patch) | |
tree | 07ec7550d0b139e1be73cd90d9d4256a38d2373a /lib/AST/Stmt.cpp | |
parent | 289230c994d946a75dd1bca18ffedd067939de24 (diff) | |
download | clang-78607564933f0543d0e9cc402b7652be7ec59b71.tar.gz |
[AST][NFC] Add const children() accessors to all AST nodes
Systematically add the const-qualified version of children()
to all statement/expression nodes. Previously the const-qualified
variant was only defined for some nodes. NFC.
Patch by: Nicolas Manichon
Differential Revision: https://reviews.llvm.org/D60029
Reviewed By: riccibruno
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index f2bb289719..4796ee87f7 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -1254,6 +1254,10 @@ Stmt::child_range CapturedStmt::children() { return child_range(getStoredStmts(), getStoredStmts() + NumCaptures); } +Stmt::const_child_range CapturedStmt::children() const { + return const_child_range(getStoredStmts(), getStoredStmts() + NumCaptures); +} + CapturedDecl *CapturedStmt::getCapturedDecl() { return CapDeclAndKind.getPointer(); } |