aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/undefined-internal.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-01-31 01:34:31 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-01-31 01:34:31 +0000
commit4ceaf337be78fa89b4a97f351be6d0bda962d7de (patch)
tree7cb4e0f160c91fd6bc3dbaebe6775ac4f5fb7f77 /test/SemaCXX/undefined-internal.cpp
parent5255f27362ffbfedea889870bf8d5812dae97553 (diff)
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/undefined-internal.cpp')
-rw-r--r--test/SemaCXX/undefined-internal.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/undefined-internal.cpp b/test/SemaCXX/undefined-internal.cpp
index e8ee4c1e90..62c6ff96ca 100644
--- a/test/SemaCXX/undefined-internal.cpp
+++ b/test/SemaCXX/undefined-internal.cpp
@@ -199,3 +199,16 @@ namespace test8 {
}
} *A;
}
+
+namespace test9 {
+ namespace {
+ struct X {
+ virtual void notused() = 0;
+ virtual void used() = 0; // expected-warning {{function 'test9::<anonymous namespace>::X::used' has internal linkage but is not defined}}
+ };
+ }
+ void test(X &x) {
+ x.notused();
+ x.X::used(); // expected-note {{used here}}
+ }
+}