Suppress a clang warning about self assignment.
Bug
MODIFY
testing/vector.cu
testing/vector.cu
@@ -253,6 +253,10 @@ void TestVectorToAndFromHostVector(void)
ASSERT_EQUAL(v, h);
+ THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING(v = v);
+
+ ASSERT_EQUAL(v, h);
+
v[0] = 10;
v[1] = 11;
v[2] = 12;
@@ -306,6 +310,10 @@ void TestVectorToAndFromDeviceVector(void)
ASSERT_EQUAL(v, h);
+ THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING(v = v);
+
+ ASSERT_EQUAL(v, h);
+
v[0] = 10;
v[1] = 11;
v[2] = 12;

MODIFY
thrust/detail/config/compiler.h
thrust/detail/config/compiler.h
#define THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING_END \
THRUST_DISABLE_CLANG_WARNING_END(-Wself-assign) \
/**/
-#define THRUST_DISABLE_MSVC_SELF_ASSIGNMENT_WARNING(x) \
+#define THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING(x) \
THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING_BEGIN \
x; \
THRUST_DISABLE_CLANG_SELF_ASSIGNMENT_WARNING_END \

Suppress a clang warning about self assignment.

Bug 200467946