]> granicus.if.org Git - llvm/commitdiff
Function::BuildLazyArguments() - fix "variable used but never read" analyzer warning...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 12:49:39 +0000 (12:49 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 12:49:39 +0000 (12:49 +0000)
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

index 1a2783f12fe7ea27a876df7e1e6565bd0c937406..a4632762c20e287517f9158d4ce43dfeb8e3cc37 100644 (file)
@@ -293,7 +293,8 @@ void Function::BuildLazyArguments() const {
 
   // Clear the lazy arguments bit.
   unsigned SDC = getSubclassDataFromValue();
-  const_cast<Function*>(this)->setValueSubclassData(SDC &= ~(1<<0));
+  SDC &= ~(1 << 0);
+  const_cast<Function*>(this)->setValueSubclassData(SDC);
   assert(!hasLazyArguments());
 }