summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-12 17:06:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-12 17:06:20 +0000
commitc119dd50c28b5d2aa6f34249f6df3cad463e1e5a (patch)
treea994b71065048f5784346373bad79b11402224ea /clang/test
parentd815825c7d8372936d7fb0f28819dd578a8ba1ca (diff)
downloadbcm5719-llvm-c119dd50c28b5d2aa6f34249f6df3cad463e1e5a.tar.gz
bcm5719-llvm-c119dd50c28b5d2aa6f34249f6df3cad463e1e5a.zip
When determining whether a given name is a template in a dependent
context, do not attempt typo correction. This harms performance (as Abramo noted) and can cause some amusing errors, as in this new testcase. llvm-svn: 93240
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/typo-dependent-name.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/typo-dependent-name.cpp b/clang/test/SemaTemplate/typo-dependent-name.cpp
new file mode 100644
index 00000000000..96554e9dcf4
--- /dev/null
+++ b/clang/test/SemaTemplate/typo-dependent-name.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+template<typename T>
+struct Base {
+ T inner;
+};
+
+template<typename T>
+struct X {
+ template<typename U>
+ struct Inner {
+ };
+
+ bool f(T other) {
+ return this->inner < other;
+ }
+};
OpenPOWER on IntegriCloud