Files
clang-p2996/clang/test/Modules/Inputs/namespaces-left.h
Richard Smith 645d755d3e Fix handling of module imports adding names to a DeclContext after qualified
name lookup has been performed in that context (this probably only happens in
C++).

1) Whenever we add names to a context, set a flag on it, and if we perform
lookup and discover that the context has had a lookup table built but has the
flag set, update all entries in the lookup table with additional names from
the external source.

2) When marking a DeclContext as having external visible decls, mark the
context in which lookup is performed, not the one we are adding. These won't
be the same if we're adding another copy of a pre-existing namespace.

llvm-svn: 174577
2013-02-07 03:37:08 +00:00

61 lines
558 B
C++

@import namespaces_top;
float &global(float);
float &global2(float);
namespace LookupBeforeImport {
float &f(float);
}
namespace N1 { }
namespace N1 {
float& f(float);
}
namespace N2 {
float& f(float);
}
namespace N5 {
int &f(int);
}
namespace N6 {
int &f(int);
}
namespace N7 {
int &f(int);
}
namespace N8 {
int &f(int);
}
namespace N9 {
int &f(int);
}
namespace N10 {
int &f(int);
}
namespace N11 {
namespace {
class Foo;
}
Foo *getFoo();
}
namespace N12 {
namespace {
class Foo;
}
Foo *getFoo();
}