[PATCH] D74069: [NFC] Fix error handling documentation
Miloš Stojanović via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 01:23:25 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb093b663707a: [NFC] Fix error handling documentation (authored by mstojanovic).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74069/new/
https://reviews.llvm.org/D74069
Files:
llvm/docs/ProgrammersManual.rst
llvm/include/llvm/Object/MachO.h
Index: llvm/include/llvm/Object/MachO.h
===================================================================
--- llvm/include/llvm/Object/MachO.h
+++ llvm/include/llvm/Object/MachO.h
@@ -65,7 +65,7 @@
/// ExportEntry encapsulates the current-state-of-the-walk used when doing a
/// non-recursive walk of the trie data structure. This allows you to iterate
/// across all exported symbols using:
-/// Error Err;
+/// Error Err = Error::success();
/// for (const llvm::object::ExportEntry &AnExport : Obj->exports(&Err)) {
/// }
/// if (Err) { report error ...
@@ -160,7 +160,7 @@
/// MachORebaseEntry encapsulates the current state in the decompression of
/// rebasing opcodes. This allows you to iterate through the compressed table of
/// rebasing using:
-/// Error Err;
+/// Error Err = Error::success();
/// for (const llvm::object::MachORebaseEntry &Entry : Obj->rebaseTable(&Err)) {
/// }
/// if (Err) { report error ...
@@ -204,7 +204,7 @@
/// MachOBindEntry encapsulates the current state in the decompression of
/// binding opcodes. This allows you to iterate through the compressed table of
/// bindings using:
-/// Error Err;
+/// Error Err = Error::success();
/// for (const llvm::object::MachOBindEntry &Entry : Obj->bindTable(&Err)) {
/// }
/// if (Err) { report error ...
Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -847,7 +847,7 @@
public:
static Expected<Foo> Create(Resource R1, Resource R2) {
- Error Err;
+ Error Err = Error::success();
Foo F(R1, R2, Err);
if (Err)
return std::move(Err);
@@ -946,7 +946,7 @@
.. code-block:: c++
- Error Err;
+ Error Err = Error::success();
for (auto &Child : Ar->children(Err)) {
// Use Child - only enter the loop when it's valid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74069.242830.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/7709c3a9/attachment.bin>
More information about the llvm-commits
mailing list