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.

llvm-svn: 122458
This commit is contained in:
Jeffrey Yasskin
2010-12-23 00:58:24 +00:00
parent f14bb1e98b
commit 9b43f33620
20 changed files with 31 additions and 37 deletions

View File

@@ -155,7 +155,7 @@ int StringMapImpl::FindKey(StringRef Key) const {
void StringMapImpl::RemoveKey(StringMapEntryBase *V) {
const char *VStr = (char*)V + ItemSize;
StringMapEntryBase *V2 = RemoveKey(StringRef(VStr, V->getKeyLength()));
V2 = V2;
(void)V2;
assert(V == V2 && "Didn't find key?");
}