aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/casts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/casts.cpp')
-rw-r--r--test/CodeGenCXX/casts.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGenCXX/casts.cpp b/test/CodeGenCXX/casts.cpp
index 045f2d4fe031..436b722e69d2 100644
--- a/test/CodeGenCXX/casts.cpp
+++ b/test/CodeGenCXX/casts.cpp
@@ -1,10 +1,12 @@
-// RUN: clang-cc %s -emit-llvm -o %t
+// RUN: %clang_cc1 %s -emit-llvm -o %t
// PR5248
namespace PR5248 {
struct A {
void copyFrom(const A &src);
void addRef(void);
+
+ A& operator=(int);
};
void A::copyFrom(const A &src) {
@@ -12,3 +14,7 @@ void A::copyFrom(const A &src) {
}
}
+// reinterpret_cast to self
+void test(PR5248::A* a) {
+ reinterpret_cast<PR5248::A&>(*a) = 17;
+}