]> granicus.if.org Git - llvm/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337583 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Any.h

index f62d6039bc957d1331403438a95b4a91a1c4ed90..2be15bb1d8897fb8c46a7aedad7addc3236d58ae 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) {