diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-01-12 10:17:46 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-01-12 10:17:46 +0000 |
commit | f52aaa57ce7d918e8d00b6b618a6d19e2ff614d5 (patch) | |
tree | 2517ce12ec894be66bc32eb13836d6f465a1b88d /include | |
parent | cd4fa1779103c10a487f2a9b7fe778b79ab299b4 (diff) |
Rename RefersToCapturedVariable to RefersToEnclosingVariableOrCapture, NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/Expr.h | 27 | ||||
-rw-r--r-- | include/clang/AST/Stmt.h | 2 |
2 files changed, 16 insertions, 13 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 975e1b3f99..c410f2358b 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -891,9 +891,9 @@ public: /// DeclRefExprBits.HasTemplateKWAndArgsInfo: /// Specifies when this declaration reference expression has an explicit /// C++ template keyword and/or template argument list. -/// DeclRefExprBits.RefersToCapturedVariable +/// DeclRefExprBits.RefersToEnclosingVariableOrCapture /// Specifies when this declaration reference expression (validly) -/// refers to a captured variable. +/// refers to an enclosed local or a captured variable. class DeclRefExpr : public Expr { /// \brief The declaration that we are referencing. ValueDecl *D; @@ -938,7 +938,7 @@ class DeclRefExpr : public Expr { DeclRefExpr(const ASTContext &Ctx, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, - ValueDecl *D, bool RefersToCapturedVariable, + ValueDecl *D, bool RefersToEnlosingVariableOrCapture, const DeclarationNameInfo &NameInfo, NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs, @@ -953,7 +953,7 @@ class DeclRefExpr : public Expr { void computeDependence(const ASTContext &C); public: - DeclRefExpr(ValueDecl *D, bool RefersToCapturedVariable, QualType T, + DeclRefExpr(ValueDecl *D, bool RefersToEnclosingVariableOrCapture, QualType T, ExprValueKind VK, SourceLocation L, const DeclarationNameLoc &LocInfo = DeclarationNameLoc()) : Expr(DeclRefExprClass, T, VK, OK_Ordinary, false, false, false, false), @@ -962,22 +962,24 @@ public: DeclRefExprBits.HasTemplateKWAndArgsInfo = 0; DeclRefExprBits.HasFoundDecl = 0; DeclRefExprBits.HadMultipleCandidates = 0; - DeclRefExprBits.RefersToCapturedVariable = RefersToCapturedVariable; + DeclRefExprBits.RefersToEnclosingVariableOrCapture = + RefersToEnclosingVariableOrCapture; computeDependence(D->getASTContext()); } static DeclRefExpr * Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *D, - bool RefersToCapturedVariable, SourceLocation NameLoc, QualType T, - ExprValueKind VK, NamedDecl *FoundD = nullptr, + bool RefersToEnclosingVariableOrCapture, SourceLocation NameLoc, + QualType T, ExprValueKind VK, NamedDecl *FoundD = nullptr, const TemplateArgumentListInfo *TemplateArgs = nullptr); static DeclRefExpr * Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *D, - bool RefersToCapturedVariable, const DeclarationNameInfo &NameInfo, - QualType T, ExprValueKind VK, NamedDecl *FoundD = nullptr, + bool RefersToEnclosingVariableOrCapture, + const DeclarationNameInfo &NameInfo, QualType T, ExprValueKind VK, + NamedDecl *FoundD = nullptr, const TemplateArgumentListInfo *TemplateArgs = nullptr); /// \brief Construct an empty declaration reference expression. @@ -1149,9 +1151,10 @@ public: DeclRefExprBits.HadMultipleCandidates = V; } - /// \brief Does this DeclRefExpr refer to a captured variable? - bool refersToCapturedVariable() const { - return DeclRefExprBits.RefersToCapturedVariable; + /// \brief Does this DeclRefExpr refer to an enclosing local or a captured + /// variable? + bool refersToEnclosingVariableOrCapture() const { + return DeclRefExprBits.RefersToEnclosingVariableOrCapture; } static bool classof(const Stmt *T) { diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 9a623d1504..eb6836f886 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -212,7 +212,7 @@ protected: unsigned HasTemplateKWAndArgsInfo : 1; unsigned HasFoundDecl : 1; unsigned HadMultipleCandidates : 1; - unsigned RefersToCapturedVariable : 1; + unsigned RefersToEnclosingVariableOrCapture : 1; }; class CastExprBitfields { |