diff options
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 5de302e1741..49ad45ad7ae 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -329,7 +329,7 @@ bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *, const CXXScopeSpec *SS) { CXXRecordDecl *CurDecl; if (SS && SS->isSet() && !SS->isInvalid()) { - DeclContext *DC = computeDeclContext(*SS); + DeclContext *DC = computeDeclContext(*SS, true); CurDecl = dyn_cast_or_null<CXXRecordDecl>(DC); } else CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext); diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp index c1da8a1f480..84454900bb5 100644 --- a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp @@ -5,6 +5,9 @@ class X0 { public: typedef int size_type; + X0(int); + ~X0(); + void f0(const T&, const U&); T& operator[](int i) const; @@ -46,4 +49,10 @@ template<typename T, typename U> void X0<T, U>::f0(const T&, const U&) { // expected-error{{redefinition}} } -// FIXME: test out-of-line constructors, destructors +// Test out-of-line constructors, destructors +template<typename T, typename U> +X0<T, U>::X0(int x) : value(x) { } + +template<typename T, typename U> +X0<T, U>::~X0() { } + |

