[Any] Fix a typo: didn't use the correct argument
authorPhilip Pfaffe <philip.pfaffe@gmail.com>
Fri, 20 Jul 2018 17:24:11 +0000 (17:24 +0000)
committerPhilip Pfaffe <philip.pfaffe@gmail.com>
Fri, 20 Jul 2018 17:24:11 +0000 (17:24 +0000)
llvm-svn: 337583

llvm/include/llvm/ADT/Any.h

index f62d603..2be15bb 100644 (file)
@@ -110,7 +110,7 @@ template <typename T> bool any_isa(const Any &Value) {
 template <class T> T any_cast(const Any &Value) {
   using U =
       typename std::remove_cv<typename std::remove_reference<T>::type>::type;
-  return static_cast<T>(*any_cast<U>(&operand));
+  return static_cast<T>(*any_cast<U>(&Value));
 }
 
 template <class T> T any_cast(Any &Value) {