dump_sem_ir_ranges_ignore.carbon 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=ignore
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/dump_sem_ir_ranges_ignore.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/dump_sem_ir_ranges_ignore.carbon
  12. // --- with-range.carbon
  13. library "[[@TEST_NAME]]";
  14. //@dump-sem-ir-begin
  15. fn F();
  16. //@dump-sem-ir-end
  17. // --- without-range.carbon
  18. library "[[@TEST_NAME]]";
  19. fn F();
  20. // CHECK:STDOUT: --- with-range.carbon
  21. // CHECK:STDOUT:
  22. // CHECK:STDOUT: constants {
  23. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  24. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: file {
  28. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  29. // CHECK:STDOUT: .F = %F.decl
  30. // CHECK:STDOUT: }
  31. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  32. // CHECK:STDOUT: }
  33. // CHECK:STDOUT:
  34. // CHECK:STDOUT: fn @F();
  35. // CHECK:STDOUT:
  36. // CHECK:STDOUT: --- without-range.carbon
  37. // CHECK:STDOUT:
  38. // CHECK:STDOUT: constants {
  39. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  40. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  41. // CHECK:STDOUT: }
  42. // CHECK:STDOUT:
  43. // CHECK:STDOUT: file {
  44. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  45. // CHECK:STDOUT: .F = %F.decl
  46. // CHECK:STDOUT: }
  47. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  48. // CHECK:STDOUT: }
  49. // CHECK:STDOUT:
  50. // CHECK:STDOUT: fn @F();
  51. // CHECK:STDOUT: