bkramer added a subscriber: bkramer.

================
Comment at: clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp:21
@@ +20,3 @@
+// Retrieve the character at offset |offset| of the string literal |SL|.
+static unsigned int GetCharAt(const StringLiteral *SL, size_t offset) {
+  if (offset >= SL->getLength()) return 0;
----------------
Isn't this identical to StringLiteral::getCodeUnit? Also returning 0 for 
unknown sizes is not a good idea imo.


http://reviews.llvm.org/D18783



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to