<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 10, 2013, at 13:51 , Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Thu, Jan 10, 2013 at 11:47 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:<br><blockquote type="cite"><br>On Jan 10, 2013, at 13:41 , Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br><br><blockquote type="cite">On Thu, Jan 10, 2013 at 8:50 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:<br><blockquote type="cite">--- cfe/trunk/test/TableGen/tg-fixits.td (added)<br>+++ cfe/trunk/test/TableGen/tg-fixits.td Thu Jan 10 12:50:46 2013<br>@@ -0,0 +1,41 @@<br>+// RUN: clang-tblgen -gen-clang-diag-groups -I%S %s -o /dev/null 2>&1 | FileCheck --strict-whitespace %s<br>+include "DiagnosticBase.inc"<br>+<br>+def NamedGroup : DiagGroup<"name">;<br>+<br>+def InNamedGroup : Warning<"">, InGroup<DiagGroup<"name">>;<br>+//      CHECK: tg-fixits.td:[[@LINE-1]]:41: error: group 'name' is referred to anonymously<br>+// CHECK-NEXT: {{^def InNamedGroup : Warning<"">, InGroup<DiagGroup<"name">>;}}<br>+// CHECK-NEXT: {{^                                ~~~~~~~~\^~~~~~~~~~~~~~~~~~}}<br>+// CHECK-NEXT: {{^                                InGroup<NamedGroup>}}<br>+<br>+def Wrapped : Warning<"">, InGroup<DiagGroup<<br>+  "name">>;<br>+//      CHECK: tg-fixits.td:[[@LINE-2]]:36: error: group 'name' is referred to anonymously<br>+// CHECK-NEXT: {{^def Wrapped : Warning<"">, InGroup<DiagGroup<}}<br>+// CHECK-NEXT: {{^                           ~~~~~~~~\^~~~~~~~~~}}<br>+// CHECK-NEXT: {{^                           InGroup<NamedGroup>}}<br>+<br>+def AlsoWrapped : Warning<"">, InGroup<<br>+  DiagGroup<"name">>;<br>+//      CHECK: tg-fixits.td:[[@LINE-1]]:3: error: group 'name' is referred to anonymously<br>+// CHECK-NEXT: {{^  DiagGroup<"name">>;}}<br>+// CHECK-NEXT: {{^~~\^~~~~~~~~~~~~~~~~~}}<br>+// CHECK-NEXT: {{^InGroup<NamedGroup>}}<br>+<br>+// The following lines contain hard tabs (\t); do not change this!<br>+def HardTabs : Warning<"">,<br>+       InGroup<        DiagGroup<"name">       >;<br>+//      CHECK: tg-fixits.td:[[@LINE-1]]:11: error: group 'name' is referred to anonymously<br>+// CHECK-NEXT: {{^        InGroup<        DiagGroup<"name">       >;}}<br>+// CHECK-NEXT: {{^        ~~~~~~~~~~~~~~~~\^~~~~~~~~~~~~~~~~~~~~~~~~}}<br>+// CHECK-NEXT: {{^        InGroup<NamedGrop>}}<br>+<br>+// The following line has Unicode characters in it; do not change them!<br>+// FIXME: For now, we just give up on printing carets/ranges/fixits for<br>+// lines with Unicode in them, because SMDiagnostic don't keep a byte<->column<br>+// map around to line things up like Clang does.<br>+def Unicode : Warning<"ユニコード">, InGroup<DiagGroup<"name">>;<br>+//      CHECK: tg-fixits.td:[[@LINE-1]]:51: error: group 'name' is referred to anonymously<br>+// CHECK-NEXT: def Unicode : Warning<"{{[^"]+}}">, InGroup<DiagGroup<"name">>;<br>+// CHECK-NEXT: note:<br></blockquote><br>Hello Jordan,<br><br>The Unicode test fails:<br><a href="http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/119">http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/119</a><br><br>Dmitri<br></blockquote><br>Hm. That doesn't make sense to me; the Unicode is clearly in the output, Japanese characters require three bytes of UTF-8, and presumably take 1 or 2 columns each. Is there a way to get the input that FileCheck is seeing from this builder?<br></blockquote><br>The Japanese characters are fine (but since they are double-width, our<br>underlining in the terminal is funny).  The issue is with missing<br>CHECK lines.<br></blockquote></div><br><div>Right, but the code in SourceMgr.cpp is supposed to say "oh, we can't print a caret here because we'll get it wrong", and leave out the caret and fixit lines (see LLVM <span style="font-family: Menlo-Regular; font-size: 11px;">r172086)</span>. Why would that fail?</div></body></html>