Update example to be more idiomatic.

llvm-svn: 198872
This commit is contained in:
Rafael Espindola 2014-01-09 14:40:43 +00:00
parent 174b012524
commit a24f5cf273
1 changed files with 2 additions and 3 deletions

View File

@ -70,11 +70,10 @@ public:
/// It is used like the following.
/// \code
/// ErrorOr<Buffer> getBuffer();
/// void handleError(error_code ec);
///
/// auto buffer = getBuffer();
/// if (!buffer)
/// handleError(buffer);
/// if (error_code ec = buffer.getError())
/// return ec;
/// buffer->write("adena");
/// \endcode
///