summaryrefslogtreecommitdiff
path: root/test/SemaObjCXX
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-04-20 22:23:10 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-04-20 22:23:10 +0000
commitb8a9d6cf3ba65f6c2048db8df7a8bdd946613815 (patch)
treeb1d8623cb1bd4f48713026a4c838f21b986ca088 /test/SemaObjCXX
parent0229ffa91b35240bff435429f316b641d890544f (diff)
downloadclang-b8a9d6cf3ba65f6c2048db8df7a8bdd946613815.tar.gz
Sema: protect against ObjC++ typo-correction failure
ObjC++ has two different types of "pointer" types (ObjCClassPointerType and PointerType). Both can be indirected through. However, the former is not a member expression. Ensure that we do not try to rebuild the MRE in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX')
-rw-r--r--test/SemaObjCXX/pr32725.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaObjCXX/pr32725.mm b/test/SemaObjCXX/pr32725.mm
new file mode 100644
index 0000000000..8d7d116325
--- /dev/null
+++ b/test/SemaObjCXX/pr32725.mm
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macosx -fsyntax-only -verify -x objective-c++ %s -o /dev/null
+// REQUIRES: asserts
+
+struct objc_class {
+ unsigned long long bits;
+};
+typedef struct objc_class *Class;
+static void f(Class c) { (void)(c->bits & RW_HAS_OVERFLOW_REFCOUNT); }
+// expected-error@-1{{use of undeclared identifier 'RW_HAS_OVERFLOW_REFCOUNT}}