summaryrefslogtreecommitdiff
path: root/test/SemaCXX
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-11-01 03:57:27 +0000
committerRichard Trieu <rtrieu@google.com>2017-11-01 03:57:27 +0000
commitbcfd8ea6e72cf5f685c1a682bd29464e3fb47762 (patch)
treed7e5abfd7b9ef82d286a28a3e49bdb8f14cd9c84 /test/SemaCXX
parentdd478afe4c5a4f486cc2bcdb0974f4ac001532b1 (diff)
Change assertion to quick exit from checking function.
Remove the assertion that could be triggered by invalid code. Replace it with an early exit from the checking function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r--test/SemaCXX/missing-members.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/missing-members.cpp b/test/SemaCXX/missing-members.cpp
index 96bed074db..61dddcbe50 100644
--- a/test/SemaCXX/missing-members.cpp
+++ b/test/SemaCXX/missing-members.cpp
@@ -37,3 +37,17 @@ struct S : A::B::C {
using A::B::C::f; // expected-error {{no member named 'f' in 'A::B::C'}}
};
+
+struct S1 {};
+
+struct S2 : S1 {};
+
+struct S3 : S2 {
+ void run();
+};
+
+struct S4: S3 {};
+
+void test(S4 *ptr) {
+ ptr->S1::run(); // expected-error {{no member named 'run' in 'S1'}}
+}