From: Rafael Espindola Date: Thu, 9 Jan 2014 00:25:25 +0000 (+0000) Subject: Use the existing typedef to avoid forming a reference to a reference. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=217a29303dfbd51093d2cefa3c24460520935f85;p=oota-llvm.git Use the existing typedef to avoid forming a reference to a reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198817 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index bc376e97aef..4914a1d7d5f 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -178,8 +178,8 @@ public: return HasError ? 0 : unspecified_bool_true; } - T &get() { return *getStorage(); } - const T &get() const { return const_cast >(this)->get(); } + reference get() { return *getStorage(); } + const reference get() const { return const_cast >(this)->get(); } error_code getError() const { return HasError ? *getErrorStorage() : error_code::success();