nested.carbon 1011 B

123456789101112131415161718192021222324252627282930313233
  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/lower/testdata/namespace/nested.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/namespace/nested.carbon
  10. namespace Foo;
  11. namespace Foo.Bar;
  12. fn Foo.Bar.Wiz() {
  13. }
  14. fn Foo.Bar.Baz() {
  15. Foo.Bar.Wiz();
  16. }
  17. // CHECK:STDOUT: ; ModuleID = 'nested.carbon'
  18. // CHECK:STDOUT: source_filename = "nested.carbon"
  19. // CHECK:STDOUT:
  20. // CHECK:STDOUT: define void @Wiz() {
  21. // CHECK:STDOUT: entry:
  22. // CHECK:STDOUT: ret void
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT:
  25. // CHECK:STDOUT: define void @Baz() {
  26. // CHECK:STDOUT: entry:
  27. // CHECK:STDOUT: call void @Wiz()
  28. // CHECK:STDOUT: ret void
  29. // CHECK:STDOUT: }