summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-30 21:47:33 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-30 21:47:33 +0000
commit16df1e59f2bb77de9ccdbc36262679d84f8a7d54 (patch)
treeee052fb68e2d926668439e8d67cb88dd5c8e481d /clang/lib/Sema/Sema.h
parentcf35648ebe0b23c3a0eb0917f1dd21e5b3693e07 (diff)
downloadbcm5719-llvm-16df1e59f2bb77de9ccdbc36262679d84f8a7d54.tar.gz
bcm5719-llvm-16df1e59f2bb77de9ccdbc36262679d84f8a7d54.zip
Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate" MemberExprs required for (e.g.) template instantiation. This is necessary because of the access semantics of member accesses to using declarations: only the base class *containing the using decl* need be accessible from the naming class. This allows us to complete an access-controlled selfhost, if there are no recent regressions. llvm-svn: 99936
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 859e4975764..d3e55f381e1 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -1119,6 +1119,7 @@ public:
CXXRecordDecl *ActingContext);
bool PerformObjectArgumentInitialization(Expr *&From,
NestedNameSpecifier *Qualifier,
+ NamedDecl *FoundDecl,
CXXMethodDecl *Method);
ImplicitConversionSequence TryContextuallyConvertToBool(Expr *From);
@@ -1126,6 +1127,7 @@ public:
bool PerformObjectMemberConversion(Expr *&From,
NestedNameSpecifier *Qualifier,
+ NamedDecl *FoundDecl,
NamedDecl *Member);
// Members have to be NamespaceDecl* or TranslationUnitDecl*.
@@ -1246,11 +1248,15 @@ public:
const PartialDiagnostic &PDiag);
FunctionDecl *ResolveAddressOfOverloadedFunction(Expr *From, QualType ToType,
- bool Complain);
+ bool Complain,
+ DeclAccessPair &Found);
FunctionDecl *ResolveSingleFunctionTemplateSpecialization(Expr *From);
- Expr *FixOverloadedFunctionReference(Expr *E, FunctionDecl *Fn);
+ Expr *FixOverloadedFunctionReference(Expr *E,
+ NamedDecl *FoundDecl,
+ FunctionDecl *Fn);
OwningExprResult FixOverloadedFunctionReference(OwningExprResult,
+ NamedDecl *FoundDecl,
FunctionDecl *Fn);
void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
@@ -2395,7 +2401,9 @@ public:
Expr *BuildObjCEncodeExpression(SourceLocation AtLoc,
QualType EncodedType,
SourceLocation RParenLoc);
- CXXMemberCallExpr *BuildCXXMemberCallExpr(Expr *Exp, CXXMethodDecl *Method);
+ CXXMemberCallExpr *BuildCXXMemberCallExpr(Expr *Exp,
+ NamedDecl *FoundDecl,
+ CXXMethodDecl *Method);
virtual ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc,
SourceLocation EncodeLoc,
@@ -2640,6 +2648,8 @@ public:
Expr *ObjectExpr,
Expr *ArgExpr,
DeclAccessPair FoundDecl);
+ AccessResult CheckAddressOfMemberAccess(Expr *OvlExpr,
+ DeclAccessPair FoundDecl);
AccessResult CheckBaseClassAccess(SourceLocation AccessLoc,
QualType Base, QualType Derived,
const CXXBasePath &Path,
OpenPOWER on IntegriCloud