// Check struct:
//
// First check compiling and printing of this file.
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -emit-llvm \
// RUN: -DKW=struct -DBASES= -o - %s \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -DKW=struct -DBASES= %s > %t.c
// RUN: FileCheck --check-prefixes=CHECK,PRINT -DKW=struct -DBASES= \
// RUN: %s --input-file %t.c
//
// Now check compiling and printing of the printed file.
//
// RUN: echo "// expected""-warning@* 10 {{'T' is deprecated}}" >> %t.c
// RUN: echo "// expected""-note@* 10 {{'T' has been explicitly marked deprecated here}}" >> %t.c
//
// RUN: %clang -target x86_64-linux -Xclang -verify -Wno-strict-prototypes -S -emit-llvm -o - %t.c \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -Wno-strict-prototypes %t.c \
// RUN: | FileCheck --check-prefixes=CHECK,PRINT -DKW=struct \
// RUN: -DBASES= %s
// Repeat for union:
//
// First check compiling and printing of this file.
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -emit-llvm \
// RUN: -DKW=union -DBASES= -o - %s \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -DKW=union -DBASES= %s > %t.c
// RUN: FileCheck --check-prefixes=CHECK,PRINT -DKW=union -DBASES= \
// RUN: %s --input-file %t.c
//
// Now check compiling and printing of the printed file.
//
// RUN: echo "// expected""-warning@* 10 {{'T' is deprecated}}" >> %t.c
// RUN: echo "// expected""-note@* 10 {{'T' has been explicitly marked deprecated here}}" >> %t.c
//
// RUN: %clang -target x86_64-linux -Xclang -verify -Wno-strict-prototypes -S -emit-llvm -o - %t.c \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -Wno-strict-prototypes %t.c \
// RUN: | FileCheck --check-prefixes=CHECK,PRINT -DKW=union \
// RUN: -DBASES= %s
// Repeat for C++ (BASES helps ensure we're printing as C++ not as C):
//
// First check compiling and printing of this file.
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -emit-llvm \
// RUN: -DKW=struct -DBASES=' : B' -o - -xc++ %s \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -DKW=struct -DBASES=' : B' -xc++ %s \
// RUN: > %t.cpp
// RUN: FileCheck --check-prefixes=CHECK,PRINT,PRINT-CXX -DKW=struct \
// RUN: -DBASES=' : B' %s --input-file %t.cpp
//
// Now check compiling and printing of the printed file.
//
// RUN: echo "// expected""-warning@* 10 {{'T' is deprecated}}" > %t.diags
// RUN: echo "// expected""-note@* 10 {{'T' has been explicitly marked deprecated here}}" >> %t.diags
// RUN: cat %t.diags >> %t.cpp
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -Wno-strict-prototypes -emit-llvm -o - %t.cpp \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -Wno-strict-prototypes %t.cpp \
// RUN: | FileCheck --check-prefixes=CHECK,PRINT,PRINT-CXX -DKW=struct \
// RUN: -DBASES=' : B' %s
//
// Make sure implicit attributes aren't printed. See comments in inMemberPtr
// for details.
//
// RUN: %clang_cc1 -triple i686-pc-win32 -verify -ast-print -DKW=struct \
// RUN: -DBASES=' : B' -xc++ %s > %t.cpp
// RUN: FileCheck --check-prefixes=CHECK,PRINT,PRINT-CXX -DKW=struct \
// RUN: -DBASES=' : B' %s --input-file %t.cpp
//
// RUN: cat %t.diags >> %t.cpp
// RUN: %clang_cc1 -triple i686-pc-win32 -verify -ast-print %t.cpp \
// RUN: | FileCheck --check-prefixes=CHECK,PRINT,PRINT-CXX -DKW=struct \
// RUN: -DBASES=' : B' %s
// END.
;
// CHECK-LABEL: defFirst
void
// CHECK-LABEL: defLast
void
// CHECK-LABEL: defMiddle
void
// CHECK-LABEL: defSelfRef
void
// CHECK-LABEL: declsOnly
void
// Make sure expanded printing of tag types is turned back off in other parts
// of a tag declaration. The base class list is checked above.
// CHECK-LABEL: inMembers
void
// CHECK-LABEL: inInit
void
// PRINT-CXX-LABEL: inMemberPtr
void
// Check that tag decl groups stay together in decl contexts.
// PRINT-LABEL: DeclGroupAtFileScope {
// PRINT-NEXT: int i;
// PRINT-NEXT: } *DeclGroupAtFileScopePtr;
KW DeclGroupAtFileScope *DeclGroupAtFileScopePtr;
// PRINT-LABEL: DeclGroupInMemberList {
KW DeclGroupInMemberList ;
// A tag decl group in the tag decl's own member list is exercised in
// defSelfRef above.