diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-10 19:52:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-10 19:52:54 +0000 |
commit | 68c69931412548fa89117e9b12633f84a8e74010 (patch) | |
tree | 445c3649c3f3c1423beb9a24a6a9e30749af6867 /lib/Parse/ParseTemplate.cpp | |
parent | d684b0027e16163c4bdba3e2f8bfadda7d62a0d3 (diff) |
Fix a problem with bogus template shadowing warnings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | lib/Parse/ParseTemplate.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index d17d244535..742453046b 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -251,9 +251,12 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { SourceLocation TemplateLoc = ConsumeToken(); TemplateParameterList TemplateParams; SourceLocation LAngleLoc, RAngleLoc; - if(!ParseTemplateParameters(Depth + 1, TemplateParams, LAngleLoc, - RAngleLoc)) { - return 0; + { + ParseScope TemplateParmScope(this, Scope::TemplateParamScope); + if(!ParseTemplateParameters(Depth + 1, TemplateParams, LAngleLoc, + RAngleLoc)) { + return 0; + } } // Generate a meaningful error if the user forgot to put class before the |