fixit-errors-1.c 556 B

123456789101112131415
  1. // RUN: cp %s %t
  2. // RUN: %clang_cc1 -pedantic -fixit %t
  3. // RUN: %clang_cc1 -pedantic -Werror -x c %t
  4. /* This is a test of the various code modification hints that are
  5. provided as part of warning or extension diagnostics. All of the
  6. warnings will be fixed by -fixit, and the resulting file should
  7. compile cleanly with -Werror -pedantic. */
  8. // FIXME: If you put a space at the end of the line, it doesn't work yet!
  9. char *s = "hi\
  10. there";
  11. // The following line isn't terminated, don't fix it.
  12. int i; // expected-error{{no newline at end of file}}