From 29d18a8b93b6a8bf546211093534a747055f556b Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 30 Jan 2013 02:10:08 +0000 Subject: [PATCH] Unresolved lookups can have using declarations that refer to unresolved using declarations. Fixes PR14768 / . llvm-svn: 173883 --- clang/include/clang/Sema/Lookup.h | 2 +- .../CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h index 68b36e7d3cab..3e7e3a16ebc8 100644 --- a/clang/include/clang/Sema/Lookup.h +++ b/clang/include/clang/Sema/Lookup.h @@ -625,7 +625,7 @@ private: bool sanityCheckUnresolved() const { for (iterator I = begin(), E = end(); I != E; ++I) - if (isa(*I)) + if (isa((*I)->getUnderlyingDecl())) return true; return false; } diff --git a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp index ae40062fe14c..a38ff15525d2 100644 --- a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp +++ b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp @@ -33,3 +33,12 @@ namespace test1 { } } +// PR 14768 +namespace PR14768 { + template class Mat; + template class Col : public Mat { + using Mat::operator(); + using Col::operator(); + void operator() (); + }; +}