[llvm] 398834f - Update usage comments in Printable.h. NFC.
Fraser Cormack via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 08:29:35 PDT 2022
Author: Fraser Cormack
Date: 2022-06-20T16:18:10+01:00
New Revision: 398834f45b615f394496fadba5e72cfd4b8be2e5
URL: https://github.com/llvm/llvm-project/commit/398834f45b615f394496fadba5e72cfd4b8be2e5
DIFF: https://github.com/llvm/llvm-project/commit/398834f45b615f394496fadba5e72cfd4b8be2e5.diff
LOG: Update usage comments in Printable.h. NFC.
The example wouldn't compile, and used an invalid case style for a
function.
Reviewed By: MatzeB
Differential Revision: https://reviews.llvm.org/D128176
Added:
Modified:
llvm/include/llvm/Support/Printable.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/Printable.h b/llvm/include/llvm/Support/Printable.h
index 6403c32aad67..8e76f01f6ba2 100644
--- a/llvm/include/llvm/Support/Printable.h
+++ b/llvm/include/llvm/Support/Printable.h
@@ -24,12 +24,12 @@ class raw_ostream;
/// 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 @@ inline raw_ostream &operator<<(raw_ostream &OS, const Printable &P) {
return OS;
}
-}
+} // namespace llvm
#endif
More information about the llvm-commits
mailing list