diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /include/clang/Sema/Scope.h | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'include/clang/Sema/Scope.h')
-rw-r--r-- | include/clang/Sema/Scope.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/clang/Sema/Scope.h b/include/clang/Sema/Scope.h index d016b9b..249a4c7 100644 --- a/include/clang/Sema/Scope.h +++ b/include/clang/Sema/Scope.h @@ -91,7 +91,10 @@ public: TryScope = 0x2000, /// \brief This is the scope for a function-level C++ try or catch scope. - FnTryCatchScope = 0x4000 + FnTryCatchScope = 0x4000, + + /// \brief This is the scope of OpenMP executable directive + OpenMPDirectiveScope = 0x8000 }; private: /// The parent scope for this scope. This is null for the translation-unit @@ -143,11 +146,10 @@ private: typedef llvm::SmallPtrSet<Decl *, 32> DeclSetTy; DeclSetTy DeclsInScope; - /// Entity - The entity with which this scope is associated. For + /// The DeclContext with which this scope is associated. For /// example, the entity of a class scope is the class itself, the - /// entity of a function scope is a function, etc. This field is - /// maintained by the Action implementation. - void *Entity; + /// entity of a function scope is a function, etc. + DeclContext *Entity; typedef SmallVector<UsingDirectiveDecl *, 2> UsingDirectivesTy; UsingDirectivesTy UsingDirectives; @@ -236,8 +238,8 @@ public: return DeclsInScope.count(D) != 0; } - void* getEntity() const { return Entity; } - void setEntity(void *E) { Entity = E; } + DeclContext *getEntity() const { return Entity; } + void setEntity(DeclContext *E) { Entity = E; } bool hasErrorOccurred() const { return ErrorTrap.hasErrorOccurred(); } @@ -301,7 +303,12 @@ public: } return false; } - + + /// \brief Determines whether this scope is the OpenMP directive scope + bool isOpenMPDirectiveScope() const { + return (getFlags() & Scope::OpenMPDirectiveScope); + } + /// \brief Determine whether this scope is a C++ 'try' block. bool isTryScope() const { return getFlags() & Scope::TryScope; } |