bool ExpandedRegion = false;
// Move the start of the interesting region left until we've
// pulled in something else interesting.
- if (CaretStart && !StartIsFixed &&
- CaretEnd - CaretStart < TargetColumns) {
+ if (CaretStart && !StartIsFixed) {
unsigned NewStart = CaretStart;
bool BadStart = false;
// Move the end of the interesting region right until we've
// pulled in something else interesting.
- if (CaretEnd != SourceLength &&
- CaretEnd - CaretStart < TargetColumns) {
+ if (CaretEnd != SourceLength) {
unsigned NewEnd = CaretEnd;
// Skip over any whitespace we see here; we're looking for
CaretEnd = NewEnd;
ExpandedRegion = true;
}
-
- if (!ExpandedRegion)
- break;
}
+
+ if (!ExpandedRegion)
+ break;
}
// [CaretStart, CaretEnd) is the slice we want. Update the various
-// RUN: clang -fsyntax-only -fmessage-length=72 %s
+// RUN: clang -fsyntax-only -fmessage-length=72 %s 2> %t &&
+
+// RUN: grep -A4 "FILE:23" %t > %t.msg &&
+// FIXME: This diagnostic is getting truncated very poorly.
+// RUN: grep -e '^ ... ' %t.msg &&
+// RUN: grep -e '^ \^' %t.msg &&
+
+// RUN: true
+
+// Hack so we can check things better, force the file name and line.
+
+# 1 "FILE" 1
/* It's tough to verify the results of this test mechanically, since
the length of the filename (and, therefore, how the word-wrapping
int array0[] = { [3] 3, 5, 7, 4, 2, 7, 6, 3, 4, 5, 6, 7, 8, 9, 12, 345, 14, 345, 789, 234, 678, 345, 123, 765, 234 };
}
+
+#pragma STDC CX_LIMITED_RANGE // some long comment text and a brace, eh {}