aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/undefined-internal.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-02-02 00:25:55 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-02-02 00:25:55 +0000
commitb7e5eec2f57bd82c6ddb762ca3dd7b7d8697e9d5 (patch)
tree7888570249ff2e98a75a4a6ec5ca6d4f6171e256 /test/SemaCXX/undefined-internal.cpp
parent0c4394c7f63008fbf4d335710b34f71afab362a3 (diff)
This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug that caused us to not mark the function referenced just because we didn't want to mark it odr used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/undefined-internal.cpp')
-rw-r--r--test/SemaCXX/undefined-internal.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaCXX/undefined-internal.cpp b/test/SemaCXX/undefined-internal.cpp
index 62c6ff96ca..227e6b4a85 100644
--- a/test/SemaCXX/undefined-internal.cpp
+++ b/test/SemaCXX/undefined-internal.cpp
@@ -212,3 +212,22 @@ namespace test9 {
x.X::used(); // expected-note {{used here}}
}
}
+
+namespace test10 {
+ namespace {
+ struct X {
+ virtual void notused() = 0;
+ virtual void used() = 0; // expected-warning {{function 'test10::<anonymous namespace>::X::used' has internal linkage but is not defined}}
+
+ void test() {
+ notused();
+ (void)&X::notused;
+ (this->*&X::notused)();
+ X::used(); // expected-note {{used here}}
+ }
+ };
+ struct Y : X {
+ using X::notused;
+ };
+ }
+}