Author: Adrian Prantl
Date: 2021-01-08T13:24:07-08:00
New Revision: aa1943a2d167823e6d506895292477f79874dd20

URL: 
https://github.com/llvm/llvm-project/commit/aa1943a2d167823e6d506895292477f79874dd20
DIFF: 
https://github.com/llvm/llvm-project/commit/aa1943a2d167823e6d506895292477f79874dd20.diff

LOG: Don't take the address of a temporary

Added: 
    

Modified: 
    lldb/source/Core/ValueObject.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/ValueObject.cpp 
b/lldb/source/Core/ValueObject.cpp
index bcd76f5a74be4..da90092336d69 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -3205,7 +3205,7 @@ bool ValueObject::CanProvideValue() {
   // we need to support invalid types as providers of values because some bare-
   // board debugging scenarios have no notion of types, but still manage to
   // have raw numeric values for things like registers. sigh.
-  const CompilerType &type(GetCompilerType());
+  CompilerType type = GetCompilerType();
   return (!type.IsValid()) || (0 != (type.GetTypeInfo() & eTypeHasValue));
 }
 


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to