]> granicus.if.org Git - clang/commitdiff
Fix LookupResult's sanity-check to handle shadow decls.
authorJohn McCall <rjmccall@apple.com>
Sun, 22 Nov 2009 20:57:36 +0000 (20:57 +0000)
committerJohn McCall <rjmccall@apple.com>
Sun, 22 Nov 2009 20:57:36 +0000 (20:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89624 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Lookup.h

index 87d0c0d05c5042803249b060073a62e144eadcc8..b30590661c5763a637b5877518a36a8ae0f097d1 100644 (file)
@@ -450,7 +450,8 @@ private:
     assert(ResultKind != NotFound || Decls.size() == 0);
     assert(ResultKind != Found || Decls.size() == 1);
     assert(ResultKind != FoundOverloaded || Decls.size() > 1 ||
-           (Decls.size() == 1 && isa<FunctionTemplateDecl>(Decls[0])));
+           (Decls.size() == 1 &&
+            isa<FunctionTemplateDecl>(Decls[0]->getUnderlyingDecl())));
     assert(ResultKind != FoundUnresolvedValue || sanityCheckUnresolved());
     assert(ResultKind != Ambiguous || Decls.size() > 1 ||
            (Decls.size() == 1 && Ambiguity == AmbiguousBaseSubobjects));