summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/casts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/casts.cpp')
-rw-r--r--clang/test/CodeGenCXX/casts.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/casts.cpp b/clang/test/CodeGenCXX/casts.cpp
index 91ae6af19e0..436b722e69d 100644
--- a/clang/test/CodeGenCXX/casts.cpp
+++ b/clang/test/CodeGenCXX/casts.cpp
@@ -5,6 +5,8 @@ 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;
+}
OpenPOWER on IntegriCloud