summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/namespaces.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename -fmodule-cache-path <blah> to -fmodules-cache-path=<blah> for ↵Douglas Gregor2013-02-071-1/+1
| | | | | | consistency. llvm-svn: 174645
* Fix handling of module imports adding names to a DeclContext after qualifiedRichard Smith2013-02-071-6/+19
| | | | | | | | | | | | | | | | 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
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-111-2/+2
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* Fix PR10447: lazily building name lookup tables for DeclContexts was broken.Richard Smith2012-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | The deferred lookup table building step couldn't accurately tell which Decls should be included in the lookup table, and consequently built different tables in some cases. Fix this by removing lazy building of DeclContext name lookup tables. In practice, the laziness was frequently not worthwhile in C++, because we performed lookup into most DeclContexts. In C, it had a bit more value, since there is no qualified lookup. In the place of lazy lookup table building, we simply don't build lookup tables for function DeclContexts at all. Such name lookup tables are not useful, since they don't capture the scoping information required to correctly perform name lookup in a function scope. The resulting performance delta is within the noise on my testing, but appears to be a very slight win for C++ and a very slight loss for C. The C performance can probably be recovered (if it is a measurable problem) by avoiding building the lookup table for the translation unit. llvm-svn: 152608
* Change @import to @__experimental_modules_import. We are not ready to ↵Ted Kremenek2012-03-011-2/+2
| | | | | | | | commit to a particular syntax for modules, and don't have time to push it forward in the near future. llvm-svn: 151841
* When deserializing an anonymous namespace from a module, do not attachDouglas Gregor2012-01-091-0/+11
| | | | | | | | the anonymous namespace to its parent. Semantically, this means that the anonymous namespaces defined in one module are distinct from the anonymous namespaces defined in another module. llvm-svn: 147782
* Implement merging of namespace-scope declarations across modules, soDouglas Gregor2012-01-091-0/+13
| | | | | | | | | | that we can merge, for example, two occurrences of namespace N { void f(); } in two disjoint modules. llvm-svn: 147780
* Implement redeclaration merging for namespaces defined in distinctDouglas Gregor2012-01-091-0/+21
| | | | | | | | | modules. Teach name lookup into namespaces to search in each of the merged DeclContexts as well as the (now-primary) DeclContext. This supports the common case where two different modules put something into the same namespace. llvm-svn: 147778
* Switch NamespaceDecl from its own hand-rolled redeclaration chain overDouglas Gregor2012-01-071-0/+15
to Redeclarable<NamespaceDecl>, so that we benefit from the improveed redeclaration deserialization and merging logic provided by Redeclarable<T>. Otherwise, no functionality change. As a drive-by fix, collapse the "inline" bit into the low bit of the original namespace/anonymous namespace, saving 8 bytes per NamespaceDecl on x86_64. llvm-svn: 147729
OpenPOWER on IntegriCloud