diff options
| author | John McCall <rjmccall@apple.com> | 2010-06-16 08:42:20 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-06-16 08:42:20 +0000 | 
| commit | e9cccd86da2fe29b7488e4888fa09c6834c82f31 (patch) | |
| tree | 5a7b17c3fc2c082838d3ecae813af472a552eab5 /clang/lib/Sema/SemaDeclCXX.cpp | |
| parent | f128bdcb557e20b20d02ca0351aa4ff19a1b0c42 (diff) | |
| download | bcm5719-llvm-e9cccd86da2fe29b7488e4888fa09c6834c82f31.tar.gz bcm5719-llvm-e9cccd86da2fe29b7488e4888fa09c6834c82f31.zip | |
Fix a point of semantics with using declaration hiding:  method templates
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids.  Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types.  You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 7 | 
1 files changed, 1 insertions, 6 deletions
| diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 595a05b6339..43ddf8c06c9 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -3649,7 +3649,7 @@ bool Sema::CheckUsingShadowDecl(UsingDecl *Using, NamedDecl *Orig,        FD = cast<FunctionDecl>(Target);      NamedDecl *OldDecl = 0; -    switch (CheckOverload(FD, Previous, OldDecl)) { +    switch (CheckOverload(0, FD, Previous, OldDecl, /*IsForUsingDecl*/ true)) {      case Ovl_Overload:        return false; @@ -3659,11 +3659,6 @@ bool Sema::CheckUsingShadowDecl(UsingDecl *Using, NamedDecl *Orig,      // We found a decl with the exact signature.      case Ovl_Match: -      if (isa<UsingShadowDecl>(OldDecl)) { -        // Silently ignore the possible conflict. -        return false; -      } -        // If we're in a record, we want to hide the target, so we        // return true (without a diagnostic) to tell the caller not to        // build a shadow decl. | 

