diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-12-23 01:01:28 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-12-23 01:01:28 +0000 |
commit | b3321531a8bb95ad9bbafb4e240382e2eaae1055 (patch) | |
tree | 918fc85f4c7591f48d98d05097979b0ddd1e5bf0 /clang/lib/GR | |
parent | 9b43f336205a63e8875f8b87fe0402f2e315369e (diff) | |
download | bcm5719-llvm-b3321531a8bb95ad9bbafb4e240382e2eaae1055.tar.gz bcm5719-llvm-b3321531a8bb95ad9bbafb4e240382e2eaae1055.zip |
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. Fix one bug found by the warning, in which one
clang::OverloadCandidate constructor failed to initialize its
FunctionTemplate member.
llvm-svn: 122459
Diffstat (limited to 'clang/lib/GR')
-rw-r--r-- | clang/lib/GR/Checkers/ExprEngine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/GR/Checkers/ExprEngine.cpp b/clang/lib/GR/Checkers/ExprEngine.cpp index e7048ef0ca3..6e82504f374 100644 --- a/clang/lib/GR/Checkers/ExprEngine.cpp +++ b/clang/lib/GR/Checkers/ExprEngine.cpp @@ -1373,7 +1373,7 @@ void ExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) { // Sanity checks. These go away in Release builds. assert(b && V1.Val.isInt() && !V1.HasSideEffects && "Case condition must evaluate to an integer constant."); - b = b; // silence unused variable warning + (void)b; // silence unused variable warning assert(V1.Val.getInt().getBitWidth() == getContext().getTypeSize(CondE->getType())); @@ -1384,7 +1384,7 @@ void ExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) { b = E->Evaluate(V2, getContext()); assert(b && V2.Val.isInt() && !V2.HasSideEffects && "Case condition must evaluate to an integer constant."); - b = b; // silence unused variable warning + (void)b; // silence unused variable warning } else V2 = V1; |