diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-05 07:07:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-05 07:07:10 +0000 |
commit | 1df0ee91a9d55b5c2eb0d96e7590f1c8b8fe8734 (patch) | |
tree | 55af033af89b6fa52c23beff3ad92d394f78b71d /test/Parser/cxx-template-decl.cpp | |
parent | b054e3804ca95255ecbc4521af7d2626367de0cf (diff) |
Teach C++ name lookup that it's okay to look in a scope without a
context. This happens fairly rarely (which is why we got away with
this bug). Fixes PR6184, where we skipped over the template parameter
scope while tentatively parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-template-decl.cpp')
-rw-r--r-- | test/Parser/cxx-template-decl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp index 5cb84a6306..3f8f1ec9d0 100644 --- a/test/Parser/cxx-template-decl.cpp +++ b/test/Parser/cxx-template-decl.cpp @@ -96,3 +96,13 @@ void f2() { // PR3844 template <> struct S<int> { }; // expected-error{{explicit specialization of non-template struct 'S'}} + +namespace PR6184 { + namespace N { + template <typename T> + void bar(typename T::x); + } + + template <typename T> + void N::bar(typename T::x) { } +} |