params_zero.carbon 1.2 KB

12345678910111213141516171819202122232425262728293031
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon
  10. fn Foo() {}
  11. // CHECK:STDOUT: --- params_zero.carbon
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: constants {
  14. // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [concrete]
  15. // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [concrete]
  16. // CHECK:STDOUT: }
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: file {
  19. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  20. // CHECK:STDOUT: .Foo = %Foo.decl
  21. // CHECK:STDOUT: }
  22. // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {} {}
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT:
  25. // CHECK:STDOUT: fn @Foo() {
  26. // CHECK:STDOUT: !entry:
  27. // CHECK:STDOUT: return
  28. // CHECK:STDOUT: }
  29. // CHECK:STDOUT: