summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-complete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-13 20:41:14 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-13 20:41:14 +0000
commitd07ba34a44a05708d37b8e0120d901bc726207ab (patch)
treefdeece274aebcd05e77c79bdebaa416426637d93 /clang/test/SemaTemplate/instantiate-complete.cpp
parentfb07ef19cc4318920d0a1ed2904f712e79760b07 (diff)
downloadbcm5719-llvm-d07ba34a44a05708d37b8e0120d901bc726207ab.tar.gz
bcm5719-llvm-d07ba34a44a05708d37b8e0120d901bc726207ab.zip
There is no reason for dereferencing a pointer-to-member to require
that the class type into which the pointer points be complete, even though the standard requires it. GCC/EDG do not require a complete type here, so we're calling this a problem with the standard. Fixes PR8328. llvm-svn: 116429
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-complete.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-complete.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/instantiate-complete.cpp b/clang/test/SemaTemplate/instantiate-complete.cpp
index c13930d108c..91d4d327073 100644
--- a/clang/test/SemaTemplate/instantiate-complete.cpp
+++ b/clang/test/SemaTemplate/instantiate-complete.cpp
@@ -11,8 +11,7 @@ struct X {
// expected-error{{data member instantiated with function type 'int (int)'}} \
// expected-error{{data member instantiated with function type 'char (char)'}} \
// expected-error{{data member instantiated with function type 'short (short)'}} \
- // expected-error{{data member instantiated with function type 'float (float)'}} \
- // expected-error{{data member instantiated with function type 'long (long)'}}
+ // expected-error{{data member instantiated with function type 'float (float)'}}
};
X<int> f() { return 0; }
@@ -44,7 +43,6 @@ void test_memptr(X<long> *p1, long X<long>::*pm1,
X<long(long)> *p2,
long (X<long(long)>::*pm2)(long)) {
(void)(p1->*pm1);
- (void)((p2->*pm2)(0)); // expected-note{{in instantiation of template class 'X<long (long)>' requested here}}
}
// Reference binding to a base
OpenPOWER on IntegriCloud