redeclaration_introducer.carbon 2.2 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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/redeclaration_introducer.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/redeclaration_introducer.carbon
  10. class A;
  11. base class B;
  12. abstract class C;
  13. class A {}
  14. base class B {}
  15. abstract class C {}
  16. // CHECK:STDOUT: --- redeclaration_introducer.carbon
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: constants {
  19. // CHECK:STDOUT: %A: type = class_type @A [template]
  20. // CHECK:STDOUT: %B: type = class_type @B [template]
  21. // CHECK:STDOUT: %C: type = class_type @C [template]
  22. // CHECK:STDOUT: %.1: type = struct_type {} [template]
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT:
  25. // CHECK:STDOUT: file {
  26. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  27. // CHECK:STDOUT: .Core = %Core
  28. // CHECK:STDOUT: .A = %A.decl.loc11
  29. // CHECK:STDOUT: .B = %B.decl.loc12
  30. // CHECK:STDOUT: .C = %C.decl.loc13
  31. // CHECK:STDOUT: }
  32. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  33. // CHECK:STDOUT: %A.decl.loc11: type = class_decl @A [template = constants.%A] {}
  34. // CHECK:STDOUT: %B.decl.loc12: type = class_decl @B [template = constants.%B] {}
  35. // CHECK:STDOUT: %C.decl.loc13: type = class_decl @C [template = constants.%C] {}
  36. // CHECK:STDOUT: %A.decl.loc15: type = class_decl @A [template = constants.%A] {}
  37. // CHECK:STDOUT: %B.decl.loc16: type = class_decl @B [template = constants.%B] {}
  38. // CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {}
  39. // CHECK:STDOUT: }
  40. // CHECK:STDOUT:
  41. // CHECK:STDOUT: class @A {
  42. // CHECK:STDOUT: !members:
  43. // CHECK:STDOUT: .Self = constants.%A
  44. // CHECK:STDOUT: }
  45. // CHECK:STDOUT:
  46. // CHECK:STDOUT: class @B {
  47. // CHECK:STDOUT: !members:
  48. // CHECK:STDOUT: .Self = constants.%B
  49. // CHECK:STDOUT: }
  50. // CHECK:STDOUT:
  51. // CHECK:STDOUT: class @C {
  52. // CHECK:STDOUT: !members:
  53. // CHECK:STDOUT: .Self = constants.%C
  54. // CHECK:STDOUT: }
  55. // CHECK:STDOUT: