2018-05-01 02:19:03 +08:00
|
|
|
// RUN: %clang_cc1 -S -fno-strict-float-cast-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=NOSTRICT
|
|
|
|
// NOSTRICT-LABEL: main
|
|
|
|
// NOSTRICT: attributes #0 = {{.*}}"strict-float-cast-overflow"="false"{{.*}}
|
2018-04-27 22:22:48 +08:00
|
|
|
|
|
|
|
// The workaround attribute is not applied by default.
|
|
|
|
|
2018-05-01 02:19:03 +08:00
|
|
|
// RUN: %clang_cc1 -S %s -fstrict-float-cast-overflow -emit-llvm -o - | FileCheck %s --check-prefix=STRICT
|
|
|
|
// STRICT-LABEL: main
|
|
|
|
// STRICT-NOT: strict-float-cast-overflow
|
|
|
|
|
2018-04-27 22:22:48 +08:00
|
|
|
// RUN: %clang_cc1 -S %s -emit-llvm -o - | FileCheck %s --check-prefix=DEFAULT
|
|
|
|
// DEFAULT-LABEL: main
|
2018-05-01 02:19:03 +08:00
|
|
|
// DEFAULT-NOT: strict-float-cast-overflow
|
2018-04-27 22:22:48 +08:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|