summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-19 07:35:19 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-19 07:35:19 +0000
commita0296f7987c0a50aa2a0b3ff6895b6980392640f (patch)
treea329976e3ad9fc4850c2f58ffa669d16dbdca691 /clang/lib/Sema/SemaOverload.h
parent3cab27578316dbf30ecbeff9288e31c400a64b6f (diff)
downloadbcm5719-llvm-a0296f7987c0a50aa2a0b3ff6895b6980392640f.tar.gz
bcm5719-llvm-a0296f7987c0a50aa2a0b3ff6895b6980392640f.zip
Remember the "found declaration" for an overload candidate, which is the
entity (if applicable) which was actually looked up. If a candidate was found via a using declaration, this is the UsingShadowDecl; otherwise, if the candidate is template specialization, this is the template; otherwise, this is the function. The point of this exercise is that "found declarations" are the entities we do access control for, not their underlying declarations. Broadly speaking, this patch fixes access control for using declarations. There is a *lot* of redundant code calling into the overload-resolution APIs; we really ought to clean that up. llvm-svn: 98945
Diffstat (limited to 'clang/lib/Sema/SemaOverload.h')
-rw-r--r--clang/lib/Sema/SemaOverload.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaOverload.h b/clang/lib/Sema/SemaOverload.h
index 58e416c87e5..cff4774fba2 100644
--- a/clang/lib/Sema/SemaOverload.h
+++ b/clang/lib/Sema/SemaOverload.h
@@ -18,6 +18,7 @@
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/Type.h"
+#include "clang/AST/UnresolvedSet.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
@@ -450,6 +451,11 @@ namespace clang {
/// function pointer or reference (C++ [over.call.object]).
FunctionDecl *Function;
+ /// FoundDecl - The original declaration that was looked up /
+ /// invented / otherwise found, together with its access.
+ /// Might be a UsingShadowDecl or a FunctionTemplateDecl.
+ DeclAccessPair FoundDecl;
+
// BuiltinTypes - Provides the return and parameter types of a
// built-in overload candidate. Only valid when Function is NULL.
struct {
@@ -486,14 +492,6 @@ namespace clang {
/// Actually an OverloadFailureKind.
unsigned char FailureKind;
- /// PathAccess - The 'path access' to the given function/conversion.
- /// Actually an AccessSpecifier.
- unsigned Access;
-
- AccessSpecifier getAccess() const {
- return AccessSpecifier(Access);
- }
-
/// A structure used to record information about a failed
/// template argument deduction.
struct DeductionFailureInfo {
OpenPOWER on IntegriCloud