2
0

macro_fn_lparen_scan.c 483 B

123456789101112131415161718192021222324252627
  1. // RUN: %clang_cc1 -E %s | grep 'noexp: foo y'
  2. // RUN: %clang_cc1 -E %s | grep 'expand: abc'
  3. // RUN: %clang_cc1 -E %s | grep 'noexp2: foo nonexp'
  4. // RUN: %clang_cc1 -E %s | grep 'expand2: abc'
  5. #define A foo
  6. #define foo() abc
  7. #define X A y
  8. // This should not expand to abc, because the foo macro isn't followed by (.
  9. noexp: X
  10. // This should expand to abc.
  11. #undef X
  12. #define X A ()
  13. expand: X
  14. // This should be 'foo nonexp'
  15. noexp2: A nonexp
  16. // This should expand
  17. expand2: A (
  18. )