[PATCH] D34339: [XRay] fix and clarify comments in the log file decoder [NFC]

Martin Pelikán via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 01:26:20 PDT 2017


pelikan added inline comments.


================
Comment at: lib/XRay/Trace.cpp:62
     return make_error<StringError>(
-        "Not enough bytes for an XRay log.",
+        "Not enough bytes for an XRay log header.",
         std::make_error_code(std::errc::invalid_argument));
----------------
dberris wrote:
> The error was already correct -- there's not enough data for an XRay log.
I'd appreciate for it to be more specific but at least now we can keep it NFC.


================
Comment at: lib/XRay/Trace.cpp:327
     default:
-      // When initializing the error, convert to uint16_t so that the record
+      // When initializing the error, convert to an integer so that the record
       // type isn't interpreted as a char.
----------------
dberris wrote:
> unsigned integer?
You are technically correct.  I've made the comment even smaller as this (for me) is a common enough thing to do.


https://reviews.llvm.org/D34339





More information about the llvm-commits mailing list