[llvm] r198817 - Use the existing typedef to avoid forming a reference to a reference.

Rafael Espindola rafael.espindola at gmail.com
Wed Jan 8 16:25:25 PST 2014


Author: rafael
Date: Wed Jan  8 18:25:25 2014
New Revision: 198817

URL: http://llvm.org/viewvc/llvm-project?rev=198817&view=rev
Log:
Use the existing typedef to avoid forming a reference to a reference.

Modified:
    llvm/trunk/include/llvm/Support/ErrorOr.h

Modified: llvm/trunk/include/llvm/Support/ErrorOr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ErrorOr.h?rev=198817&r1=198816&r2=198817&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ErrorOr.h (original)
+++ llvm/trunk/include/llvm/Support/ErrorOr.h Wed Jan  8 18:25:25 2014
@@ -178,8 +178,8 @@ public:
     return HasError ? 0 : unspecified_bool_true;
   }
 
-  T &get() { return *getStorage(); }
-  const T &get() const { return const_cast<ErrorOr<T> >(this)->get(); }
+  reference get() { return *getStorage(); }
+  const reference get() const { return const_cast<ErrorOr<T> >(this)->get(); }
 
   error_code getError() const {
     return HasError ? *getErrorStorage() : error_code::success();





More information about the llvm-commits mailing list