Clang 7 warns on two intentional self-assignments. According to the
release notes "the warning can be suppressed by adding *& to the
right-hand side or casting it to the appropriate reference type."
Component: Framework
VK-GL-CTS issue: 1401
Change-Id: I3145b1965d46f617eb10ff8a60d038ce9bbb5cbf
SharedPtr<Object> ptrA;
SharedPtr<Object> ptrB;
ptrB = ptrA;
- ptrB = ptrB;
+ ptrB = *&ptrB;
}
// Basic test.
SharedPtr<Object> ptr(new Object(exists));
DE_TEST_ASSERT(exists);
DE_TEST_ASSERT(ptr.get() != DE_NULL);
- ptr = ptr;
+ ptr = *&ptr;
}
DE_TEST_ASSERT(!exists);
}