emit-html.c 609 B

1234567891011121314151617181920212223242526
  1. // RUN: %clang_cc1 %s -emit-html -o -
  2. // rdar://6562329
  3. #line 42 "foo.c"
  4. // PR3635
  5. #define F(fmt, ...) fmt, ## __VA_ARGS__
  6. int main(int argc, char **argv) {
  7. return F(argc, 1);
  8. }
  9. // PR3798
  10. #define FOR_ALL_FILES(f,i) i
  11. #if 0
  12. FOR_ALL_FILES(f) { }
  13. #endif
  14. // <rdar://problem/11625964>
  15. // -emit-html filters out # directives, but not _Pragma (or MS __pragma)
  16. // Diagnostic push/pop is stateful, so re-lexing a file can cause problems
  17. // if these pragmas are interpreted normally.
  18. _Pragma("clang diagnostic push")
  19. _Pragma("clang diagnostic ignored \"-Wformat-extra-args\"")
  20. _Pragma("clang diagnostic pop")