From 217a29303dfbd51093d2cefa3c24460520935f85 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 9 Jan 2014 00:25:25 +0000 Subject: [PATCH] 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 --- include/llvm/Support/ErrorOr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.34.1