From 38a5344664168db192fb7c8549e36eca0ab1405a Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 23 Sep 2019 12:49:39 +0000 Subject: [PATCH] Function::BuildLazyArguments() - fix "variable used but never read" analyzer warning. NFCI. Simplify the code by separating the masking of the SDC variable from using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372598 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Function.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp index 1a2783f12fe..a4632762c20 100644 --- a/lib/IR/Function.cpp +++ b/lib/IR/Function.cpp @@ -293,7 +293,8 @@ void Function::BuildLazyArguments() const { // Clear the lazy arguments bit. unsigned SDC = getSubclassDataFromValue(); - const_cast(this)->setValueSubclassData(SDC &= ~(1<<0)); + SDC &= ~(1 << 0); + const_cast(this)->setValueSubclassData(SDC); assert(!hasLazyArguments()); } -- 2.50.1