summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-expr-2.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-01 16:58:52 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-01 16:58:52 +0000
commit32e2c8472ee95cb806b38a2966b4fdefc5b6941c (patch)
tree90edcbb0eb3c271b4690da087a544eedadb98b6a /clang/test/SemaTemplate/instantiate-expr-2.cpp
parent6cdf83c1927961adb5f3ac300c5ace977a8d81f0 (diff)
downloadbcm5719-llvm-32e2c8472ee95cb806b38a2966b4fdefc5b6941c.tar.gz
bcm5719-llvm-32e2c8472ee95cb806b38a2966b4fdefc5b6941c.zip
Fix a crasher involving template instantiation of non-dependent
expressions making use of an overloaded operator. Thanks for the test case, Anders! llvm-svn: 80679
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-2.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-expr-2.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-2.cpp b/clang/test/SemaTemplate/instantiate-expr-2.cpp
index 2c3ccb06e42..5351701cdcd 100644
--- a/clang/test/SemaTemplate/instantiate-expr-2.cpp
+++ b/clang/test/SemaTemplate/instantiate-expr-2.cpp
@@ -146,3 +146,17 @@ namespace N8 {
test_plus(&x, x, x);
}
}
+
+namespace N9 {
+ struct A {
+ bool operator==(int value);
+ };
+
+ template<typename T> struct B {
+ bool f(A a) {
+ return a == 1;
+ }
+ };
+
+ template struct B<int>;
+}
OpenPOWER on IntegriCloud