From 4abe0a8d82667092aea76f3942f9ab13fdc3a7d3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 9 Sep 2013 07:34:56 +0000 Subject: C++ modules: fix a bug where loading a declaration with some name would prevent name lookup from lazily deserializing the other declarations with the same name, by tracking a bit to indicate whether a name in a DeclContext might have additional external results. This also allows lazier reconciling of the lookup table if a module import adds decls to a pre-existing DC. However, this exposes a pre-existing bug, which causes a regression in test/Modules/decldef.mm: if we have a reference to a declaration, and a later-imported module adds a redeclaration, nothing causes us to load that redeclaration when we use or emit the reference (which can manifest as a reference to an undefined inline function, a use of an incomplete type, and so on). decldef.mm has been extended with an additional testcase which fails with or without this change. llvm-svn: 190293 --- clang/test/Modules/Inputs/namespaces-top.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/test/Modules/Inputs/namespaces-top.h') diff --git a/clang/test/Modules/Inputs/namespaces-top.h b/clang/test/Modules/Inputs/namespaces-top.h index 0c607f52851..7aa8490eb7e 100644 --- a/clang/test/Modules/Inputs/namespaces-top.h +++ b/clang/test/Modules/Inputs/namespaces-top.h @@ -12,3 +12,8 @@ namespace N3 { namespace N12 { } +namespace N13 { + void f(); + int f(int); + void (*p)() = &f; +} -- cgit v1.2.3