summaryrefslogtreecommitdiff
path: root/unittests/Support
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-12-23 00:58:24 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-12-23 00:58:24 +0000
commit8e68c3873549ca31533e2e3e40dda3a43cb79566 (patch)
tree66cf9b65eff62b5ad43e27bb1751a6118ed971a2 /unittests/Support
parent65e43a259ff532f66ff1f04bd5d67c17bcffdc9d (diff)
downloadllvm-8e68c3873549ca31533e2e3e40dda3a43cb79566.tar.gz
llvm-8e68c3873549ca31533e2e3e40dda3a43cb79566.tar.bz2
llvm-8e68c3873549ca31533e2e3e40dda3a43cb79566.tar.xz
Change all self assignments X=X to (void)X, so that we can turn on a
new gcc warning that complains on self-assignments and self-initializations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-rw-r--r--unittests/Support/ValueHandleTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/Support/ValueHandleTest.cpp b/unittests/Support/ValueHandleTest.cpp
index ba610ea4ff..2e5e5b167c 100644
--- a/unittests/Support/ValueHandleTest.cpp
+++ b/unittests/Support/ValueHandleTest.cpp
@@ -108,7 +108,7 @@ TEST_F(ValueHandle, WeakVH_NullOnDeletion) {
TEST_F(ValueHandle, AssertingVH_BasicOperation) {
AssertingVH<CastInst> AVH(BitcastV.get());
CastInst *implicit_to_exact_type = AVH;
- implicit_to_exact_type = implicit_to_exact_type; // Avoid warning.
+ (void)implicit_to_exact_type; // Avoid warning.
AssertingVH<Value> GenericAVH(BitcastV.get());
EXPECT_EQ(BitcastV.get(), GenericAVH);
@@ -125,7 +125,7 @@ TEST_F(ValueHandle, AssertingVH_Const) {
const CastInst *ConstBitcast = BitcastV.get();
AssertingVH<const CastInst> AVH(ConstBitcast);
const CastInst *implicit_to_exact_type = AVH;
- implicit_to_exact_type = implicit_to_exact_type; // Avoid warning.
+ (void)implicit_to_exact_type; // Avoid warning.
}
TEST_F(ValueHandle, AssertingVH_Comparisons) {