summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-01-20 09:07:54 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-01-20 09:07:54 +0000
commit48c0bfb99f12c1075a55bbe7722dd3f66eb3bab0 (patch)
treedc8d0717f555c338b931b8b0c688f6d87f9e67e0 /clang/lib/Sema/SemaExpr.cpp
parenteba303923857fbb102491eecc03f5f53d203419f (diff)
downloadbcm5719-llvm-48c0bfb99f12c1075a55bbe7722dd3f66eb3bab0.tar.gz
bcm5719-llvm-48c0bfb99f12c1075a55bbe7722dd3f66eb3bab0.zip
[OPENMP 4.5] Allow to use non-static data members in non-static member functions in 'private' clause.
OpenMP 4.5 allows to use non-static members of current class in non-static member functions in 'private' clause. Patch adds initial support for privatizing data members. llvm-svn: 258299
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 008a2fc4c45..aacbda402f7 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -12894,7 +12894,7 @@ static bool captureInCapturedRegion(CapturedRegionScopeInfo *RSI,
// Using an LValue reference type is consistent with Lambdas (see below).
if (S.getLangOpts().OpenMP) {
ByRef = S.IsOpenMPCapturedByRef(Var, RSI);
- if (S.IsOpenMPCapturedVar(Var))
+ if (S.IsOpenMPCapturedDecl(Var))
DeclRefType = DeclRefType.getUnqualifiedType();
}
@@ -13085,7 +13085,7 @@ bool Sema::tryCaptureVariable(
// Capture global variables if it is required to use private copy of this
// variable.
bool IsGlobal = !Var->hasLocalStorage();
- if (IsGlobal && !(LangOpts.OpenMP && IsOpenMPCapturedVar(Var)))
+ if (IsGlobal && !(LangOpts.OpenMP && IsOpenMPCapturedDecl(Var)))
return true;
// Walk up the stack to determine whether we can capture the variable,
@@ -13280,14 +13280,14 @@ bool Sema::tryCaptureVariable(
// just break here. Similarly, global variables that are captured in a
// target region should not be captured outside the scope of the region.
if (RSI->CapRegionKind == CR_OpenMP) {
- auto isTargetCap = isOpenMPTargetCapturedVar(Var, OpenMPLevel);
+ auto isTargetCap = isOpenMPTargetCapturedDecl(Var, OpenMPLevel);
// When we detect target captures we are looking from inside the
// target region, therefore we need to propagate the capture from the
// enclosing region. Therefore, the capture is not initially nested.
if (isTargetCap)
FunctionScopesIndex--;
- if (isTargetCap || isOpenMPPrivateVar(Var, OpenMPLevel)) {
+ if (isTargetCap || isOpenMPPrivateDecl(Var, OpenMPLevel)) {
Nested = !isTargetCap;
DeclRefType = DeclRefType.getUnqualifiedType();
CaptureType = Context.getLValueReferenceType(DeclRefType);
OpenPOWER on IntegriCloud