Fixes https://github.com/llvm/llvm-project/issues/114402. This patch accept empty enum in C as a microsoft extension and introduce an new warning `-Wmicrosoft-empty-enum`. --------- Signed-off-by: yicuixi <qin_17914@126.com> Co-authored-by: Erich Keane <ekeane@nvidia.com> Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
8 lines
355 B
C
8 lines
355 B
C
// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -Wno-implicit-function-declaration -emit-llvm %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -fms-extensions -triple i386-windows-msvc -Wno-implicit-function-declaration -emit-llvm %s -o - | FileCheck %s
|
|
|
|
typedef enum tag1 {} A;
|
|
|
|
// CHECK: void @empty_enum(i32 noundef %a)
|
|
void empty_enum(A a) {}
|