[PATCH] D128176: Update usage comments in Printable.h. NFC.
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 03:18:35 PDT 2022
frasercrmck created this revision.
frasercrmck added reviewers: MatzeB, dblaikie.
Herald added a project: All.
frasercrmck requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The example wouldn't compile, and used an invalid case style for a
function.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128176
Files:
llvm/include/llvm/Support/Printable.h
Index: llvm/include/llvm/Support/Printable.h
===================================================================
--- llvm/include/llvm/Support/Printable.h
+++ llvm/include/llvm/Support/Printable.h
@@ -24,12 +24,12 @@
/// This class is useful to construct print helpers for raw_ostream.
///
/// Example:
-/// Printable PrintRegister(unsigned Register) {
+/// Printable printRegister(unsigned Register) {
/// return Printable([Register](raw_ostream &OS) {
/// OS << getRegisterName(Register);
-/// }
+/// });
/// }
-/// ... OS << PrintRegister(Register); ...
+/// ... OS << printRegister(Register); ...
///
/// Implementation note: Ideally this would just be a typedef, but doing so
/// leads to operator << being ambiguous as function has matching constructors
@@ -47,6 +47,6 @@
return OS;
}
-}
+} // namespace llvm
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128176.438323.patch
Type: text/x-patch
Size: 886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220620/4877f414/attachment.bin>
More information about the llvm-commits
mailing list