zinovy.nis marked an inline comment as done.
zinovy.nis added inline comments.


================
Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:70-72
+  if (Bytes.find_if([](char C) {
+        return static_cast<unsigned char>(C) > 0x7Fu;
+      }) != StringRef::npos)
----------------
aaron.ballman wrote:
> I think you can use `isASCII()` from CharInfo.h rather than reimplement it.
Nice finding! Thanks!


================
Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:44
+char const *const MultibyteSnowman("\xE2\x98\x83");
+// CHECK-FIXES: {{^}}char const *const MultibyteSnowman("\xE2\x98\x83");{{$}}
 
----------------
LegalizeAdulthood wrote:
> IIRC, the default behavior is that if no matching CHECK-FIXES line is found, 
> then it is considered a failure.  Have you tried your test code without your 
> change to verify that this is the case?
1. Without my fix my test fails with a Python decoder error as it cannot print 
Unicode symbols in Windows console. But no FileCheck errors occur:


```
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 974: 
ordinal not in range(128)
```


2. Regardless of my changes when I replace `"char const *const 
Delete("\\\177");"` with `"char const *const Delete("\000\\\177");"` (leading 
`\0`) test still passes! Looks like CHECK-FIXes must be explicit.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45932



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

Reply via email to