Files
swift-mirror/test/Serialization/attr-invalid.swift
Keith Smiley bf4aaacb02 Remove @frozen without library evolution warning
This warning is produced if you annotate an enum with `@frozen` but
build without library evolution enabled. The problem is that if you
only build with library evolution enabled for release builds, this
leaves you with a warning for all debug builds. The downside of this
change is that if you never build with library evolution, you may have
this unnecessary annotation without noticing.
2019-11-12 19:35:05 -08:00

15 lines
660 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/attr.swiftmodule %s -verify -warnings-as-errors
// RUN: llvm-bcanalyzer -dump %t/attr.swiftmodule | %FileCheck -check-prefix=CHECK-NON-RESILIENT %s
// RUN: %target-swift-frontend -emit-module -o %t/attr_resilient.swiftmodule -enable-library-evolution -warnings-as-errors %s
// RUN: llvm-bcanalyzer -dump %t/attr_resilient.swiftmodule | %FileCheck -check-prefix=CHECK-RESILIENT %s
// These two should be checking for the same thing.
// CHECK-RESILIENT: Frozen_DECL_ATTR
// CHECK-NON-RESILIENT-NOT: Frozen_DECL_ATTR
@frozen // expected-no-warning
public enum SomeEnum {
case x
}