diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-24 07:20:36 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-24 07:20:36 +0000 |
| commit | cf4ab520b555bb764a72d648f2820f3deb943d29 (patch) | |
| tree | ceb26c690189dff5c396c40aa1732dfa0920cf4e /clang/test/Modules | |
| parent | ce1ae387d658f872c8495bf51b6823b1d6aa1fa9 (diff) | |
| download | bcm5719-llvm-cf4ab520b555bb764a72d648f2820f3deb943d29.tar.gz bcm5719-llvm-cf4ab520b555bb764a72d648f2820f3deb943d29.zip | |
Avoid adding entries to the DeclContext lookup table multiple times when lazily
constructing a lookup table.
Previously, buildLookup would add lookup table entries for each item lexically
within the DC, and adding the first entry with a given name would trigger the
external source to add all its entries with that name. Then buildLookup would
carry on and re-add those entries all over again.
Instead, follow a simple rule: a declaration from an external source is only
ever made visible by the external source. One exception to this: since we don't
usually build a lookup table for the TU in C, and we never serialize one, we
don't expect the external source to provide lookups in the TU in C, so we build
those ones ourselves.
llvm-svn: 184696
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/cxx-templates.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/test/Modules/cxx-templates.cpp b/clang/test/Modules/cxx-templates.cpp index bc96772083a..79268127389 100644 --- a/clang/test/Modules/cxx-templates.cpp +++ b/clang/test/Modules/cxx-templates.cpp @@ -27,10 +27,6 @@ void g() { // CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' // CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' // CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' -// CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' -// CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' -// CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' -// CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f' // CHECK-GLOBAL-NEXT: `-FunctionTemplate {{.*}} 'f' // FIXME: There should only be two 'f's here. |

