From 75fc3bf5fe9ad5ad38492902b07ede50de3f18d4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 8 Feb 2013 00:37:45 +0000 Subject: Fix stack overflow and improve performance when a module contains many overloads of a name by claiming that there are no lookup results for that name in modules while loading the names from the module. Lookups in deserialization really don't want to find names which they themselves are in the process of introducing. This also has the pleasant side-effect of automatically caching PCH lookups which found no names. The runtime here is still quadratic in the number of overloads, but the constant is lower. llvm-svn: 174685 --- clang/test/Modules/cxx-many-overloads.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 clang/test/Modules/cxx-many-overloads.cpp (limited to 'clang/test/Modules/cxx-many-overloads.cpp') diff --git a/clang/test/Modules/cxx-many-overloads.cpp b/clang/test/Modules/cxx-many-overloads.cpp new file mode 100644 index 00000000000..84e4140b939 --- /dev/null +++ b/clang/test/Modules/cxx-many-overloads.cpp @@ -0,0 +1,9 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify + +// expected-no-diagnostics +@import cxx_many_overloads; + +void g() { + f(N::X<0>()); +} -- cgit v1.2.3