include-stack-for-note-flag.cpp 1.3 KB

12345678910111213141516171819202122232425262728
  1. // RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
  2. // RUN: not %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
  3. // RUN: not %clang_cc1 -fsyntax-only -fno-diagnostics-show-note-include-stack -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACK
  4. // RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-show-note-include-stack -fno-diagnostics-show-note-include-stack %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
  5. // RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s -check-prefix=STACKLESS
  6. #include "Inputs/include.h"
  7. int test() {
  8. return foo(1, 1);
  9. }
  10. bool macro(int x, int y) {
  11. return EQUALS(&x, y);
  12. }
  13. // STACK: error: no matching function for call to 'foo'
  14. // STACK: In file included from
  15. // STACK: note: candidate function not viable
  16. // STACK: error: comparison between pointer and integer
  17. // STACK: In file included from
  18. // STACK: note: expanded from macro
  19. // STACKLESS: error: no matching function for call to 'foo'
  20. // STACKLESS-NOT: In file included from
  21. // STACKLESS: note: candidate function not viable
  22. // STACKLESS: error: comparison between pointer and integer
  23. // STACKLESS-NOT: In file included from
  24. // STACKLESS: note: expanded from macro