forked from OSchip/llvm-project
Revert "Compress formatting of array type names (int [4] -> int[4])"
Looks like lldb has some issues with this - somehow it causes lldb to
treat a "char[N]" type as an array of chars (prints them out
individually) but a "char [N]" is printed as a string. (even though the
DWARF doesn't have this string in it - it's something to do with the
string lldb generates for itself using clang)
This reverts commit 277623f4d5
.
This commit is contained in:
parent
1062f989af
commit
f9ad1d1c77
|
@ -503,6 +503,7 @@ void TypePrinter::printMemberPointerAfter(const MemberPointerType *T,
|
|||
void TypePrinter::printConstantArrayBefore(const ConstantArrayType *T,
|
||||
raw_ostream &OS) {
|
||||
IncludeStrongLifetimeRAII Strong(Policy);
|
||||
SaveAndRestore<bool> NonEmptyPH(HasEmptyPlaceHolder, false);
|
||||
printBefore(T->getElementType(), OS);
|
||||
}
|
||||
|
||||
|
@ -525,6 +526,7 @@ void TypePrinter::printConstantArrayAfter(const ConstantArrayType *T,
|
|||
void TypePrinter::printIncompleteArrayBefore(const IncompleteArrayType *T,
|
||||
raw_ostream &OS) {
|
||||
IncludeStrongLifetimeRAII Strong(Policy);
|
||||
SaveAndRestore<bool> NonEmptyPH(HasEmptyPlaceHolder, false);
|
||||
printBefore(T->getElementType(), OS);
|
||||
}
|
||||
|
||||
|
@ -537,6 +539,7 @@ void TypePrinter::printIncompleteArrayAfter(const IncompleteArrayType *T,
|
|||
void TypePrinter::printVariableArrayBefore(const VariableArrayType *T,
|
||||
raw_ostream &OS) {
|
||||
IncludeStrongLifetimeRAII Strong(Policy);
|
||||
SaveAndRestore<bool> NonEmptyPH(HasEmptyPlaceHolder, false);
|
||||
printBefore(T->getElementType(), OS);
|
||||
}
|
||||
|
||||
|
@ -583,6 +586,7 @@ void TypePrinter::printDependentSizedArrayBefore(
|
|||
const DependentSizedArrayType *T,
|
||||
raw_ostream &OS) {
|
||||
IncludeStrongLifetimeRAII Strong(Policy);
|
||||
SaveAndRestore<bool> NonEmptyPH(HasEmptyPlaceHolder, false);
|
||||
printBefore(T->getElementType(), OS);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ int check_non_pod_block1[__is_pod(int (^ __unsafe_unretained)(int))? 1 : -1];
|
|||
|
||||
struct FlexibleArrayMember0 {
|
||||
int length;
|
||||
id array[]; // expected-error{{flexible array member 'array' of type '__strong id[]' with non-trivial destruction}}
|
||||
id array[]; // expected-error{{flexible array member 'array' of type '__strong id []' with non-trivial destruction}}
|
||||
};
|
||||
|
||||
struct FlexibleArrayMember1 {
|
||||
|
|
|
@ -36,13 +36,13 @@ void Test() {
|
|||
// CHECK-NEXT: | |-value: ComplexFloat 3.141500e+00 + 4.200000e+01i
|
||||
|
||||
constexpr _Complex int ArrayOfComplexInt[10] = {ComplexInt, ComplexInt, ComplexInt, ComplexInt};
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} ArrayOfComplexInt 'const _Complex int[10]' constexpr cinit
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} ArrayOfComplexInt 'const _Complex int [10]' constexpr cinit
|
||||
// CHECK-NEXT: | |-value: Array size=10
|
||||
// CHECK-NEXT: | | |-elements: ComplexInt 42 + 24i, ComplexInt 42 + 24i, ComplexInt 42 + 24i, ComplexInt 42 + 24i
|
||||
// CHECK-NEXT: | | `-filler: 6 x ComplexInt 0 + 0i
|
||||
|
||||
constexpr _Complex float ArrayOfComplexFloat[10] = {ComplexFloat, ComplexFloat, ComplexInt, ComplexInt};
|
||||
// CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} ArrayOfComplexFloat 'const _Complex float[10]' constexpr cinit
|
||||
// CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} ArrayOfComplexFloat 'const _Complex float [10]' constexpr cinit
|
||||
// CHECK-NEXT: |-value: Array size=10
|
||||
// CHECK-NEXT: | |-elements: ComplexFloat 3.141500e+00 + 4.200000e+01i, ComplexFloat 3.141500e+00 + 4.200000e+01i, ComplexFloat 4.200000e+01 + 2.400000e+01i, ComplexFloat 4.200000e+01 + 2.400000e+01i
|
||||
// CHECK-NEXT: | `-filler: 6 x ComplexFloat 0.000000e+00 + 0.000000e+00i
|
||||
|
|
|
@ -43,7 +43,7 @@ void Test() {
|
|||
constexpr float arr_f[3][5] = {
|
||||
{1, 2, 3, 4, 5},
|
||||
};
|
||||
// CHECK: | `-VarDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} arr_f 'const float[3][5]' constexpr cinit
|
||||
// CHECK: | `-VarDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} arr_f 'const float [3][5]' constexpr cinit
|
||||
// CHECK-NEXT: | |-value: Array size=3
|
||||
// CHECK-NEXT: | | |-element: Array size=5
|
||||
// CHECK-NEXT: | | | |-elements: Float 1.000000e+00, Float 2.000000e+00, Float 3.000000e+00, Float 4.000000e+00
|
||||
|
@ -52,7 +52,7 @@ void Test() {
|
|||
// CHECK-NEXT: | | `-filler: 5 x Float 0.000000e+00
|
||||
|
||||
constexpr S0 arr_s0[2] = {{1, 2}, {3, 4}};
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_s0 'const S0[2]' constexpr cinit
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_s0 'const S0 [2]' constexpr cinit
|
||||
// CHECK-NEXT: | |-value: Array size=2
|
||||
// CHECK-NEXT: | | |-element: Struct
|
||||
// CHECK-NEXT: | | | `-field: Array size=2
|
||||
|
@ -62,12 +62,12 @@ void Test() {
|
|||
// CHECK-NEXT: | | `-elements: Int 3, Int 4
|
||||
|
||||
constexpr U0 arr_u0[2] = {{.i = 42}, {.f = 3.1415f}};
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_u0 'const U0[2]' constexpr cinit
|
||||
// CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_u0 'const U0 [2]' constexpr cinit
|
||||
// CHECK-NEXT: | |-value: Array size=2
|
||||
// CHECK-NEXT: | | `-elements: Union .i Int 42, Union .f Float 3.141500e+00
|
||||
|
||||
constexpr S1 arr_s1[2] = {};
|
||||
// CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_s1 'const S1[2]' constexpr cinit
|
||||
// CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} arr_s1 'const S1 [2]' constexpr cinit
|
||||
// CHECK-NEXT: |-value: Array size=2
|
||||
// CHECK-NEXT: | |-element: Struct
|
||||
// CHECK-NEXT: | | |-field: Struct
|
||||
|
|
|
@ -13,7 +13,7 @@ void testArrayInitExpr()
|
|||
int a[10];
|
||||
auto l = [a]{
|
||||
};
|
||||
// CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} <col:15> 'int[10]'
|
||||
// CHECK: |-ArrayInitLoopExpr 0x{{[^ ]*}} <col:15> 'int [10]'
|
||||
// CHECK: | `-ArrayInitIndexExpr 0x{{[^ ]*}} <<invalid sloc>> 'unsigned long'
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ class array {
|
|||
T data[Size];
|
||||
|
||||
using array_T_size = T[Size];
|
||||
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T[Size]' dependent <col:25, col:30>
|
||||
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'T [Size]' dependent <col:25, col:30>
|
||||
using const_array_T_size = const T[Size];
|
||||
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'const T[Size]' dependent <col:37, col:42>
|
||||
// CHECK: `-DependentSizedArrayType 0x{{[^ ]*}} 'const T [Size]' dependent <col:37, col:42>
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ struct Invalid {
|
|||
//CHECK: {{^}}[[GREEN:.\[0;1;32m]]TranslationUnitDecl[[RESET:.\[0m]][[Yellow:.\[0;33m]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]]{{$}}
|
||||
//CHECK: {{^}}[[Blue:.\[0;34m]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN:.\[0;1;36m]] __int128_t[[RESET]] [[Green:.\[0;32m]]'__int128'[[RESET]]{{$}}
|
||||
//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN]] __uint128_t[[RESET]] [[Green]]'unsigned __int128'[[RESET]]{{$}}
|
||||
//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag[1]'[[RESET]]{{$}}
|
||||
//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag [1]'[[RESET]]{{$}}
|
||||
//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]{{.*}}ast-dump-color.cpp:6:1[[RESET]], [[Yellow]]col:5[[RESET]]> [[Yellow]]col:5[[RESET]][[CYAN]] Test[[RESET]] [[Green]]'int'[[RESET]]
|
||||
//CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE:.\[0;1;34m]]UnusedAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:25[[RESET]]> unused{{$}}
|
||||
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:4:4[[RESET]], [[Yellow]]line:5:8[[RESET]]>{{$}}
|
||||
|
|
|
@ -4689,7 +4689,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[4]"
|
||||
// CHECK-NEXT: "qualType": "int [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
@ -4709,7 +4709,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[4]"
|
||||
// CHECK-NEXT: "qualType": "int [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "prvalue",
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
@ -5106,7 +5106,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[2]"
|
||||
// CHECK-NEXT: "qualType": "char [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"a\""
|
||||
|
@ -5151,7 +5151,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[2]"
|
||||
// CHECK-NEXT: "qualType": "int [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "L\"a\""
|
||||
|
@ -5196,7 +5196,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[2]"
|
||||
// CHECK-NEXT: "qualType": "char [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "u8\"a\""
|
||||
|
@ -5241,7 +5241,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "unsigned int[2]"
|
||||
// CHECK-NEXT: "qualType": "unsigned int [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "U\"a\""
|
||||
|
@ -5286,7 +5286,7 @@ void PrimaryExpressions(int a) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "unsigned short[2]"
|
||||
// CHECK-NEXT: "qualType": "unsigned short [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "u\"a\""
|
||||
|
|
|
@ -2003,7 +2003,7 @@ void TestNonADLCall3() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[2]"
|
||||
// CHECK-NEXT: "qualType": "int [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "prvalue",
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
|
|
@ -181,7 +181,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[2]"
|
||||
// CHECK-NEXT: "qualType": "char [2]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "encodedType": {
|
||||
|
@ -228,7 +228,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[3]"
|
||||
// CHECK-NEXT: "qualType": "char [3]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "encodedType": {
|
||||
|
@ -3490,7 +3490,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
@ -3698,7 +3698,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
@ -4177,7 +4177,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
@ -4420,7 +4420,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
@ -4560,7 +4560,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
@ -4745,7 +4745,7 @@ void TestObjCBoolLiteral() {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "char[4]"
|
||||
// CHECK-NEXT: "qualType": "char [4]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "value": "\"key\""
|
||||
|
|
|
@ -271,8 +271,8 @@ void PostfixOperators(int *a, struct S b, struct S *c) {
|
|||
|
||||
(int [4]){1, 2, 3, 4, };
|
||||
// CHECK: ImplicitCastExpr
|
||||
// CHECK-NEXT: CompoundLiteralExpr 0x{{[^ ]*}} <col:3, col:25> 'int[4]' lvalue
|
||||
// CHECK-NEXT: InitListExpr 0x{{[^ ]*}} <col:12, col:25> 'int[4]'
|
||||
// CHECK-NEXT: CompoundLiteralExpr 0x{{[^ ]*}} <col:3, col:25> 'int [4]' lvalue
|
||||
// CHECK-NEXT: InitListExpr 0x{{[^ ]*}} <col:12, col:25> 'int [4]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:13> 'int' 1
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:16> 'int' 2
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:19> 'int' 3
|
||||
|
@ -300,23 +300,23 @@ void PrimaryExpressions(int a) {
|
|||
|
||||
"a";
|
||||
// ImplicitCastExpr
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'char[2]' lvalue "a"
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'char [2]' lvalue "a"
|
||||
|
||||
L"a";
|
||||
// ImplicitCastExpr
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'int[2]' lvalue L"a"
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'int [2]' lvalue L"a"
|
||||
|
||||
u8"a";
|
||||
// ImplicitCastExpr
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'char[2]' lvalue u8"a"
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'char [2]' lvalue u8"a"
|
||||
|
||||
U"a";
|
||||
// ImplicitCastExpr
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'unsigned int[2]' lvalue U"a"
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'unsigned int [2]' lvalue U"a"
|
||||
|
||||
u"a";
|
||||
// ImplicitCastExpr
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'unsigned short[2]' lvalue u"a"
|
||||
// CHECK: StringLiteral 0x{{[^ ]*}} <col:3> 'unsigned short [2]' lvalue u"a"
|
||||
|
||||
1;
|
||||
// CHECK: IntegerLiteral 0x{{[^ ]*}} <line:[[@LINE-1]]:3> 'int' 1
|
||||
|
|
|
@ -147,7 +147,7 @@ void UnaryExpressions(int *p) {
|
|||
// CHECK: CXXNewExpr 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:18> 'int *' array Function 0x{{[^ ]*}} 'operator new[]' 'void *(unsigned long)'
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:11> 'int' 2
|
||||
// CHECK-NEXT: InitListExpr 0x{{[^ ]*}} <col:13, col:18> 'int[2]'
|
||||
// CHECK-NEXT: InitListExpr 0x{{[^ ]*}} <col:13, col:18> 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:14> 'int' 1
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:17> 'int' 2
|
||||
|
||||
|
|
|
@ -137,14 +137,14 @@ int e;
|
|||
// CHECK-NEXT: "isImplicit": true,
|
||||
// CHECK-NEXT: "name": "__builtin_va_list",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "struct __va_list_tag[1]"
|
||||
// CHECK-NEXT: "qualType": "struct __va_list_tag [1]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "inner": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "id": "0x{{.*}}",
|
||||
// CHECK-NEXT: "kind": "ConstantArrayType",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "struct __va_list_tag[1]"
|
||||
// CHECK-NEXT: "qualType": "struct __va_list_tag [1]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "size": 1,
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
|
|
@ -67,18 +67,18 @@ int main() {
|
|||
// C-NEXT: `-FunctionDecl [[ADDR_28:0x[a-z0-9]*]] <line:24:1, line:32:1> line:24:5 main 'int ({{.*}})'
|
||||
// C-NEXT: `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] <col:12, line:32:1>
|
||||
// C-NEXT: |-DeclStmt [[ADDR_30:0x[a-z0-9]*]] <line:26:3, col:12>
|
||||
// C-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] <col:3, col:11> col:6 used fns 'fd[2]'
|
||||
// C-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] <col:3, col:11> col:6 used fns 'fd [2]'
|
||||
// C-NEXT: |-BinaryOperator [[ADDR_32:0x[a-z0-9]*]] <line:27:3, col:13> 'fd':'int (*)({{.*}})' '='
|
||||
// C-NEXT: | |-ArraySubscriptExpr [[ADDR_33:0x[a-z0-9]*]] <col:3, col:8> 'fd':'int (*)({{.*}})' lvalue
|
||||
// C-NEXT: | | |-ImplicitCastExpr [[ADDR_34:0x[a-z0-9]*]] <col:3> 'fd *' <ArrayToPointerDecay>
|
||||
// C-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] <col:3> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// C-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] <col:3> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// C-NEXT: | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:7> 'int' 0
|
||||
// C-NEXT: | `-UnaryOperator [[ADDR_37:0x[a-z0-9]*]] <col:12, col:13> 'int (*)({{.*}})' prefix '&' cannot overflow
|
||||
// C-NEXT: | `-DeclRefExpr [[ADDR_38:0x[a-z0-9]*]] <col:13> 'int ({{.*}})' Function [[ADDR_0]] 'also_before' 'int ({{.*}})'
|
||||
// C-NEXT: |-BinaryOperator [[ADDR_39:0x[a-z0-9]*]] <line:28:3, col:12> 'fd':'int (*)({{.*}})' '='
|
||||
// C-NEXT: | |-ArraySubscriptExpr [[ADDR_40:0x[a-z0-9]*]] <col:3, col:8> 'fd':'int (*)({{.*}})' lvalue
|
||||
// C-NEXT: | | |-ImplicitCastExpr [[ADDR_41:0x[a-z0-9]*]] <col:3> 'fd *' <ArrayToPointerDecay>
|
||||
// C-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] <col:3> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// C-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] <col:3> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// C-NEXT: | | `-IntegerLiteral [[ADDR_43:0x[a-z0-9]*]] <col:7> 'int' 1
|
||||
// C-NEXT: | `-ImplicitCastExpr [[ADDR_44:0x[a-z0-9]*]] <col:12> 'int (*)({{.*}})' <FunctionToPointerDecay>
|
||||
// C-NEXT: | `-DeclRefExpr [[ADDR_45:0x[a-z0-9]*]] <col:12> 'int ({{.*}})' Function [[ADDR_17]] 'also_after' 'int ({{.*}})'
|
||||
|
@ -98,7 +98,7 @@ int main() {
|
|||
// C-NEXT: | `-ParenExpr [[ADDR_59:0x[a-z0-9]*]] <col:10, col:17> 'fd':'int (*)({{.*}})' lvalue
|
||||
// C-NEXT: | `-ArraySubscriptExpr [[ADDR_60:0x[a-z0-9]*]] <col:11, col:16> 'fd':'int (*)({{.*}})' lvalue
|
||||
// C-NEXT: | |-ImplicitCastExpr [[ADDR_61:0x[a-z0-9]*]] <col:11> 'fd *' <ArrayToPointerDecay>
|
||||
// C-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] <col:11> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// C-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] <col:11> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// C-NEXT: | `-IntegerLiteral [[ADDR_63:0x[a-z0-9]*]] <col:15> 'int' 0
|
||||
// C-NEXT: `-CallExpr [[ADDR_64:0x[a-z0-9]*]] <line:31:10, col:19> 'int'
|
||||
// C-NEXT: `-ImplicitCastExpr [[ADDR_65:0x[a-z0-9]*]] <col:10, col:17> 'fd':'int (*)({{.*}})' <LValueToRValue>
|
||||
|
@ -106,7 +106,7 @@ int main() {
|
|||
// C-NEXT: `-ArraySubscriptExpr [[ADDR_67:0x[a-z0-9]*]] <col:11, col:16> 'fd':'int (*)({{.*}})' lvalue
|
||||
// C-NEXT: |-IntegerLiteral [[ADDR_68:0x[a-z0-9]*]] <col:11> 'int' 1
|
||||
// C-NEXT: `-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] <col:13> 'fd *' <ArrayToPointerDecay>
|
||||
// C-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] <col:13> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// C-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] <col:13> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
|
||||
// CXX: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:7:1> line:5:5 used also_before 'int ({{.*}})'
|
||||
// CXX-NEXT: | |-CompoundStmt [[ADDR_1:0x[a-z0-9]*]] <col:23, line:7:1>
|
||||
|
@ -140,18 +140,18 @@ int main() {
|
|||
// CXX-NEXT: `-FunctionDecl [[ADDR_28:0x[a-z0-9]*]] <line:24:1, line:32:1> line:24:5 main 'int ({{.*}})'
|
||||
// CXX-NEXT: `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] <col:12, line:32:1>
|
||||
// CXX-NEXT: |-DeclStmt [[ADDR_30:0x[a-z0-9]*]] <line:26:3, col:12>
|
||||
// CXX-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] <col:3, col:11> col:6 used fns 'fd[2]'
|
||||
// CXX-NEXT: | `-VarDecl [[ADDR_31:0x[a-z0-9]*]] <col:3, col:11> col:6 used fns 'fd [2]'
|
||||
// CXX-NEXT: |-BinaryOperator [[ADDR_32:0x[a-z0-9]*]] <line:27:3, col:13> 'fd':'int (*)({{.*}})' {{.*}}'='
|
||||
// CXX-NEXT: | |-ArraySubscriptExpr [[ADDR_33:0x[a-z0-9]*]] <col:3, col:8> 'fd':'int (*)({{.*}})' lvalue
|
||||
// CXX-NEXT: | | |-ImplicitCastExpr [[ADDR_34:0x[a-z0-9]*]] <col:3> 'fd *' <ArrayToPointerDecay>
|
||||
// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] <col:3> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_35:0x[a-z0-9]*]] <col:3> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// CXX-NEXT: | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:7> 'int' 0
|
||||
// CXX-NEXT: | `-UnaryOperator [[ADDR_37:0x[a-z0-9]*]] <col:12, col:13> 'int (*)({{.*}})' prefix '&' cannot overflow
|
||||
// CXX-NEXT: | `-DeclRefExpr [[ADDR_38:0x[a-z0-9]*]] <col:13> 'int ({{.*}})' {{.*}}Function [[ADDR_0]] 'also_before' 'int ({{.*}})'
|
||||
// CXX-NEXT: |-BinaryOperator [[ADDR_39:0x[a-z0-9]*]] <line:28:3, col:12> 'fd':'int (*)({{.*}})' {{.*}}'='
|
||||
// CXX-NEXT: | |-ArraySubscriptExpr [[ADDR_40:0x[a-z0-9]*]] <col:3, col:8> 'fd':'int (*)({{.*}})' lvalue
|
||||
// CXX-NEXT: | | |-ImplicitCastExpr [[ADDR_41:0x[a-z0-9]*]] <col:3> 'fd *' <ArrayToPointerDecay>
|
||||
// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] <col:3> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// CXX-NEXT: | | | `-DeclRefExpr [[ADDR_42:0x[a-z0-9]*]] <col:3> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// CXX-NEXT: | | `-IntegerLiteral [[ADDR_43:0x[a-z0-9]*]] <col:7> 'int' 1
|
||||
// CXX-NEXT: | `-ImplicitCastExpr [[ADDR_44:0x[a-z0-9]*]] <col:12> 'int (*)({{.*}})' <FunctionToPointerDecay>
|
||||
// CXX-NEXT: | `-DeclRefExpr [[ADDR_45:0x[a-z0-9]*]] <col:12> 'int ({{.*}})' {{.*}}Function [[ADDR_17]] 'also_after' 'int ({{.*}})'
|
||||
|
@ -171,7 +171,7 @@ int main() {
|
|||
// CXX-NEXT: | `-ParenExpr [[ADDR_59:0x[a-z0-9]*]] <col:10, col:17> 'fd':'int (*)({{.*}})' lvalue
|
||||
// CXX-NEXT: | `-ArraySubscriptExpr [[ADDR_60:0x[a-z0-9]*]] <col:11, col:16> 'fd':'int (*)({{.*}})' lvalue
|
||||
// CXX-NEXT: | |-ImplicitCastExpr [[ADDR_61:0x[a-z0-9]*]] <col:11> 'fd *' <ArrayToPointerDecay>
|
||||
// CXX-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] <col:11> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// CXX-NEXT: | | `-DeclRefExpr [[ADDR_62:0x[a-z0-9]*]] <col:11> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
// CXX-NEXT: | `-IntegerLiteral [[ADDR_63:0x[a-z0-9]*]] <col:15> 'int' 0
|
||||
// CXX-NEXT: `-CallExpr [[ADDR_64:0x[a-z0-9]*]] <line:31:10, col:19> 'int'
|
||||
// CXX-NEXT: `-ImplicitCastExpr [[ADDR_65:0x[a-z0-9]*]] <col:10, col:17> 'fd':'int (*)({{.*}})' <LValueToRValue>
|
||||
|
@ -179,4 +179,4 @@ int main() {
|
|||
// CXX-NEXT: `-ArraySubscriptExpr [[ADDR_67:0x[a-z0-9]*]] <col:11, col:16> 'fd':'int (*)({{.*}})' lvalue
|
||||
// CXX-NEXT: |-IntegerLiteral [[ADDR_68:0x[a-z0-9]*]] <col:11> 'int' 1
|
||||
// CXX-NEXT: `-ImplicitCastExpr [[ADDR_69:0x[a-z0-9]*]] <col:13> 'fd *' <ArrayToPointerDecay>
|
||||
// CXX-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] <col:13> 'fd[2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd[2]'
|
||||
// CXX-NEXT: `-DeclRefExpr [[ADDR_70:0x[a-z0-9]*]] <col:13> 'fd [2]' {{.*}}Var [[ADDR_31]] 'fns' 'fd [2]'
|
||||
|
|
|
@ -1338,7 +1338,7 @@ struct Derived6 : virtual public Bases... {
|
|||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "name": "b",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
|
@ -1364,7 +1364,7 @@ struct Derived6 : virtual public Bases... {
|
|||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "name": "c",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[]"
|
||||
// CHECK-NEXT: "qualType": "int []"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
|
|
@ -84,9 +84,9 @@ struct D {
|
|||
int a;
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:7> col:7 a 'int'
|
||||
int b[10];
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:11> col:7 b 'int[10]'
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:11> col:7 b 'int [10]'
|
||||
int c[];
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:9> col:7 c 'int[]'
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:9> col:7 c 'int []'
|
||||
};
|
||||
|
||||
union E;
|
||||
|
|
|
@ -132,9 +132,9 @@ struct D {
|
|||
int a;
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:7> col:7 a 'int'
|
||||
int b[10];
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:11> col:7 b 'int[10]'
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:11> col:7 b 'int [10]'
|
||||
int c[];
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:9> col:7 c 'int[]'
|
||||
// CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:9> col:7 c 'int []'
|
||||
};
|
||||
|
||||
union E;
|
||||
|
|
|
@ -2965,7 +2965,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: "name": "us",
|
||||
// CHECK-NEXT: "mangledName": "_ZZ17TestUnionInitListvE2us",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "U[3]"
|
||||
// CHECK-NEXT: "qualType": "U [3]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "init": "c",
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
@ -2985,7 +2985,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "U[3]"
|
||||
// CHECK-NEXT: "qualType": "U [3]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "prvalue",
|
||||
// CHECK-NEXT: "array_filler": [
|
||||
|
@ -4392,7 +4392,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: "name": "vals",
|
||||
// CHECK-NEXT: "mangledName": "_ZZ13TestIterationvE4vals",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
@ -4478,7 +4478,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
@ -4486,7 +4486,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: "kind": "VarDecl",
|
||||
// CHECK-NEXT: "name": "vals",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
|
@ -4577,7 +4577,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
@ -4699,7 +4699,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
@ -6039,7 +6039,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
@ -6047,7 +6047,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: "kind": "VarDecl",
|
||||
// CHECK-NEXT: "name": "vals",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: }
|
||||
|
@ -6138,7 +6138,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
@ -6260,7 +6260,7 @@ void TestDependentGenericSelectionExpr(Ty T) {
|
|||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[10]"
|
||||
// CHECK-NEXT: "qualType": "int [10]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "valueCategory": "lvalue",
|
||||
// CHECK-NEXT: "referencedDecl": {
|
||||
|
|
|
@ -97,8 +97,8 @@ union U {
|
|||
void TestUnionInitList()
|
||||
{
|
||||
U us[3] = {1};
|
||||
// CHECK: VarDecl {{.+}} <col:3, col:15> col:5 us 'U[3]' cinit
|
||||
// CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U[3]'
|
||||
// CHECK: VarDecl {{.+}} <col:3, col:15> col:5 us 'U [3]' cinit
|
||||
// CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U [3]'
|
||||
// CHECK-NEXT: |-array_filler: InitListExpr {{.+}} <col:15> 'U' field Field {{.+}} 'i' 'int'
|
||||
// CHECK-NEXT: `-InitListExpr {{.+}} <col:14> 'U' field Field {{.+}} 'i' 'int'
|
||||
// CHECK-NEXT: `-IntegerLiteral {{.+}} <col:14> 'int' 1
|
||||
|
@ -196,16 +196,16 @@ void TestIteration() {
|
|||
// CHECK-NEXT: <<<NULL>>>
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:16> col:16 implicit used __range1 'int (&)[10]' cinit
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:16> 'int[10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:16> 'int [10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int [10]'
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:14> col:14 implicit used __begin1 'int *':'int *' cinit
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:14> 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:14> 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:14, col:16> col:14 implicit used __end1 'int *':'int *' cinit
|
||||
// CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} <col:14, col:16> 'int *' '+'
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:14> 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:14> 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:16> 'long' 10
|
||||
// CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} <col:14> 'bool' '!='
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
|
@ -264,16 +264,16 @@ void TestIteration() {
|
|||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:8, col:12> col:12 a 'int'
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:23> col:23 implicit used __range1 'int (&)[10]' cinit
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:23> 'int[10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:23> 'int [10]' lvalue Var 0x{{[^ ]*}} 'vals' 'int [10]'
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:21> col:21 implicit used __begin1 'int *':'int *' cinit
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:21> 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:21> 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclStmt
|
||||
// CHECK-NEXT: VarDecl 0x{{[^ ]*}} <col:21, col:23> col:21 implicit used __end1 'int *':'int *' cinit
|
||||
// CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} <col:21, col:23> 'int *' '+'
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:21> 'int[10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:21> 'int [10]' lvalue Var 0x{{[^ ]*}} '__range1' 'int (&)[10]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:23> 'long' 10
|
||||
// CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} <col:21> 'bool' '!='
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
|
|
|
@ -185,14 +185,14 @@ void i();
|
|||
// CHECK-NEXT: "isImplicit": true,
|
||||
// CHECK-NEXT: "name": "__builtin_va_list",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "__va_list_tag[1]"
|
||||
// CHECK-NEXT: "qualType": "__va_list_tag [1]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "inner": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "id": "0x{{.*}}",
|
||||
// CHECK-NEXT: "kind": "ConstantArrayType",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "__va_list_tag[1]"
|
||||
// CHECK-NEXT: "qualType": "__va_list_tag [1]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "size": 1,
|
||||
// CHECK-NEXT: "inner": [
|
||||
|
|
|
@ -46,9 +46,9 @@ template <typename ...T> struct A {
|
|||
};
|
||||
|
||||
// CHECK1-LABEL: template <typename ...T> void f(T ...[3]) {
|
||||
// CHECK1-NEXT: A<T[3]...> a;
|
||||
// CHECK1-NEXT: A<T [3]...> a;
|
||||
template <typename ...T> void f(T ...[3]) {
|
||||
A<T[3]...> a;
|
||||
A<T [3]...> a;
|
||||
}
|
||||
|
||||
namespace test2 {
|
||||
|
|
|
@ -24,14 +24,14 @@ using TestContainsErrors = int[sizeof(undef())];
|
|||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "name": "TestContainsErrors",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[sizeof (<recovery-expr>(undef))]"
|
||||
// CHECK-NEXT: "qualType": "int [sizeof (<recovery-expr>(undef))]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "inner": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "id": "0x{{.*}}",
|
||||
// CHECK-NEXT: "kind": "DependentSizedArrayType",
|
||||
// CHECK-NEXT: "type": {
|
||||
// CHECK-NEXT: "qualType": "int[sizeof (<recovery-expr>(undef))]"
|
||||
// CHECK-NEXT: "qualType": "int [sizeof (<recovery-expr>(undef))]"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: "containsErrors": true,
|
||||
// CHECK-NEXT: "isDependent": true,
|
||||
|
|
|
@ -28,14 +28,14 @@ void useage(){
|
|||
// CHECK: AtomicExpr
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0
|
||||
// CHECK:FunctionDecl 0x{{[0-9a-f]+}} <line:{{.*}}:1, line:{{.*}}:1> line:{{.*}}:6 used pr43370
|
||||
// CHECK: AtomicExpr
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:20> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:28> 'int' 5
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:25> 'int' 0
|
||||
|
||||
|
@ -43,11 +43,11 @@ void useage(){
|
|||
// CHECK: AtomicExpr
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
|
@ -56,11 +56,11 @@ void useage(){
|
|||
// CHECK: AtomicExpr
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:37> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:53> 'int' 3
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
// CHECK-SAME: <ArrayToPointerDecay>
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int[2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int[2]'
|
||||
// CHECK-NEXT: DeclRefExpr 0x{{[0-9a-f]+}} <{{[^:]+}}:42> 'int [2]' lvalue Var 0x{{[0-9a-f]+}} 'arr' 'int [2]'
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:56> 'int' 4
|
||||
// CHECK-NEXT: IntegerLiteral 0x{{[0-9a-f]+}} <{{[^:]+}}:47> 'int' 1
|
||||
// CHECK-NEXT: ImplicitCastExpr
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace {
|
|||
//CHECK-NEXT: | |-VarDecl {{.*}} f1n '_Float16'
|
||||
//CHECK-NEXT: | |-VarDecl {{.*}} f2n '_Float16' cinit
|
||||
//CHECK-NEXT: | | `-FloatingLiteral {{.*}} '_Float16' 3.300000e+01
|
||||
//CHECK-NEXT: | |-VarDecl {{.*}} arr1n '_Float16[10]'
|
||||
//CHECK-NEXT: | |-VarDecl {{.*}} arr2n '_Float16[3]' cinit
|
||||
//CHECK-NEXT: | | `-InitListExpr {{.*}} '_Float16[3]'
|
||||
//CHECK-NEXT: | |-VarDecl {{.*}} arr1n '_Float16 [10]'
|
||||
//CHECK-NEXT: | |-VarDecl {{.*}} arr2n '_Float16 [3]' cinit
|
||||
//CHECK-NEXT: | | `-InitListExpr {{.*}} '_Float16 [3]'
|
||||
//CHECK-NEXT: | | |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>
|
||||
//CHECK-NEXT: | | | `-FloatingLiteral {{.*}} 'double' 1.200000e+00
|
||||
//CHECK-NEXT: | | |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>
|
||||
|
@ -55,9 +55,9 @@ _Float16 func1f(_Float16 arg);
|
|||
//CHECK-NEXT: |-VarDecl {{.*}} f2f '_Float16' cinit
|
||||
//CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>
|
||||
//CHECK-NEXT: | `-FloatingLiteral {{.*}} 'double' 3.240000e+01
|
||||
//CHECK-NEXT: |-VarDecl {{.*}} arr1f '_Float16[10]'
|
||||
//CHECK-NEXT: |-VarDecl {{.*}} arr2f '_Float16[3]' cinit
|
||||
//CHECK-NEXT: | `-InitListExpr {{.*}} '_Float16[3]'
|
||||
//CHECK-NEXT: |-VarDecl {{.*}} arr1f '_Float16 [10]'
|
||||
//CHECK-NEXT: |-VarDecl {{.*}} arr2f '_Float16 [3]' cinit
|
||||
//CHECK-NEXT: | `-InitListExpr {{.*}} '_Float16 [3]'
|
||||
//CHECK-NEXT: | |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>
|
||||
//CHECK-NEXT: | | `-UnaryOperator {{.*}} 'double' prefix '-'
|
||||
//CHECK-NEXT: | | `-FloatingLiteral {{.*}} 'double' 1.200000e+00
|
||||
|
@ -297,8 +297,8 @@ int main(void) {
|
|||
//CHECK-NEXT: | `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f4l' '_Float16'
|
||||
|
||||
_Float16 arr1l[] = { -1.f16, -0.f16, -11.f16 };
|
||||
//CHECK: `-VarDecl {{.*}} arr1l '_Float16[3]' cinit
|
||||
//CHECK-NEXT: `-InitListExpr {{.*}} '_Float16[3]'
|
||||
//CHECK: `-VarDecl {{.*}} arr1l '_Float16 [3]' cinit
|
||||
//CHECK-NEXT: `-InitListExpr {{.*}} '_Float16 [3]'
|
||||
//CHECK-NEXT: |-UnaryOperator {{.*}} '_Float16' prefix '-'
|
||||
//CHECK-NEXT: | `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00
|
||||
//CHECK-NEXT: |-UnaryOperator {{.*}} '_Float16' prefix '-'
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
int(&&intu_rvref)[] {1,2,3,4};
|
||||
// CHECK: VarDecl 0x[[GLOB_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'int[4]'
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'int [4]'
|
||||
|
||||
// CHECK: FunctionDecl {{.*}} static_const
|
||||
void static_const() {
|
||||
static const int(&&intu_rvref)[] {1,2,3,4};
|
||||
// CHECK: VarDecl 0x[[STATIC_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'const int (&&)[4]' static listinit
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'const int[4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int[4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'const int[4]'
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'const int [4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int [4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'const int [4]'
|
||||
}
|
||||
|
||||
// CHECK: FunctionDecl {{.*}} const_expr
|
||||
constexpr int const_expr() {
|
||||
int(&&intu_rvref)[]{1, 2, 3, 4};
|
||||
// CHECK: VarDecl 0x[[CE_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'int[4]'
|
||||
// CHECK-NEXT: ExprWithCleanups {{.*}} 'int [4]' xvalue
|
||||
// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int [4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]'
|
||||
// CHECK-NEXT: InitListExpr {{.*}} 'int [4]'
|
||||
return intu_rvref[0];
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ enum B {};
|
|||
typedef int C;
|
||||
}
|
||||
|
||||
// CHECK: VarDecl {{0x[0-9a-fA-F]+}} <line:[[@LINE+1]]:1, col:36> col:15 ImplicitConstrArray 'foo::A[2]'
|
||||
// CHECK: VarDecl {{0x[0-9a-fA-F]+}} <line:[[@LINE+1]]:1, col:36> col:15 ImplicitConstrArray 'foo::A [2]'
|
||||
static foo::A ImplicitConstrArray[2];
|
||||
|
||||
int main() {
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
// CHECK: var2.c:3:5: warning: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double')
|
||||
// CHECK: In file included from{{.*}}var1.c:3:
|
||||
// CHECK: var1.h:1:8: note: declared here with type 'double'
|
||||
// CHECK: warning: external variable 'xarray3' declared with incompatible types in different translation units ('int[17]' vs. 'int[18]')
|
||||
// CHECK: var1.c:7:5: note: declared here with type 'int[18]'
|
||||
// CHECK: warning: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]')
|
||||
// CHECK: var1.c:7:5: note: declared here with type 'int [18]'
|
||||
// CHECK: 3 warnings generated
|
||||
|
|
|
@ -334,7 +334,7 @@ void test_aggregate_array_lifetime_extension() {
|
|||
// CHECK-NEXT: 61: ~A() (Temporary object destructor)
|
||||
// CHECK-NEXT: 62: ~A() (Temporary object destructor)
|
||||
// CHECK-NEXT: 63: ~A() (Temporary object destructor)
|
||||
// CHECK-NEXT: 64: [B1.57].~D[2]() (Implicit destructor)
|
||||
// CHECK-NEXT: 64: [B1.57].~D [2]() (Implicit destructor)
|
||||
// CHECK-NEXT: 65: [B1.18].~D() (Implicit destructor)
|
||||
// CHECK-NEXT: Preds (1): B2
|
||||
// CHECK-NEXT: Succs (1): B0
|
||||
|
@ -357,13 +357,13 @@ void test_aggregate_with_nontrivial_own_destructor() {
|
|||
// CHECK: [B2 (ENTRY)]
|
||||
// CHECK-NEXT: Succs (1): B1
|
||||
// CHECK: [B1]
|
||||
// WARNINGS-NEXT: 1: (CXXConstructExpr, class A[2])
|
||||
// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A[2])
|
||||
// WARNINGS-NEXT: 1: (CXXConstructExpr, class A [2])
|
||||
// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A [2])
|
||||
// CHECK-NEXT: 2: A a[2];
|
||||
// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[0])
|
||||
// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[0])
|
||||
// WARNINGS-NEXT: 3: (CXXConstructExpr, class A [0])
|
||||
// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A [0])
|
||||
// CHECK-NEXT: 4: A b[0];
|
||||
// CHECK-NEXT: 5: [B1.2].~A[2]() (Implicit destructor)
|
||||
// CHECK-NEXT: 5: [B1.2].~A [2]() (Implicit destructor)
|
||||
// CHECK-NEXT: Preds (1): B2
|
||||
// CHECK-NEXT: Succs (1): B0
|
||||
// CHECK: [B0 (EXIT)]
|
||||
|
|
|
@ -116,8 +116,8 @@ void test_deletedtor() {
|
|||
// CHECK: [B1]
|
||||
// CHECK-NEXT: 1: 5
|
||||
// CHECK-NEXT: 2: CFGNewAllocator(A *)
|
||||
// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[5])
|
||||
// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[5])
|
||||
// WARNINGS-NEXT: 3: (CXXConstructExpr, class A [5])
|
||||
// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A [5])
|
||||
// CHECK-NEXT: 4: new A {{\[\[}}B1.1]]
|
||||
// CHECK-NEXT: 5: A *a = new A [5];
|
||||
// CHECK-NEXT: 6: a
|
||||
|
@ -342,8 +342,8 @@ void test_placement_new() {
|
|||
// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *)
|
||||
// CHECK-NEXT: 5: 5
|
||||
// CHECK-NEXT: 6: CFGNewAllocator(MyClass *)
|
||||
// WARNINGS-NEXT: 7: (CXXConstructExpr, class MyClass[5])
|
||||
// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], class MyClass[5])
|
||||
// WARNINGS-NEXT: 7: (CXXConstructExpr, class MyClass [5])
|
||||
// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], class MyClass [5])
|
||||
// CHECK-NEXT: 8: new ([B1.4]) MyClass {{\[\[}}B1.5]]
|
||||
// CHECK-NEXT: 9: MyClass *obj = new (buffer) MyClass [5];
|
||||
// CHECK-NEXT: Preds (1): B2
|
||||
|
@ -513,7 +513,7 @@ void vla_typedef(int x) {
|
|||
// CHECK: [B1]
|
||||
// CHECK-NEXT: 1: x
|
||||
// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int)
|
||||
// CHECK-NEXT: 3: using VLA = int[x];
|
||||
// CHECK-NEXT: 3: using VLA = int [x];
|
||||
void vla_typealias(int x) {
|
||||
using VLA = int[x];
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ void vla_typedef_multi(int x, int y) {
|
|||
// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, LValueToRValue, int)
|
||||
// CHECK-NEXT: 6: typedef VLA VLA1[y];
|
||||
// CHECK-NEXT: 7: 3
|
||||
// CHECK-NEXT: 8: using VLA2 = VLA1[3];
|
||||
// CHECK-NEXT: 8: using VLA2 = VLA1 [3];
|
||||
// CHECK-NEXT: 9: 4
|
||||
// CHECK-NEXT: 10: VLA2 vla[4];
|
||||
void vla_typedefname_multi(int x, int y) {
|
||||
|
@ -557,8 +557,8 @@ void vla_typedefname_multi(int x, int y) {
|
|||
// CHECK-NEXT: 5: x
|
||||
// CHECK-NEXT: 6: ++[B1.5]
|
||||
// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, LValueToRValue, int)
|
||||
// CHECK-NEXT: 8: sizeof(int[++x])
|
||||
// CHECK-NEXT: 9: alignof(int[++x])
|
||||
// CHECK-NEXT: 8: sizeof(int [++x])
|
||||
// CHECK-NEXT: 9: alignof(int [++x])
|
||||
// CHECK-NEXT: 10: 0
|
||||
// CHECK-NEXT: 11: x
|
||||
// CHECK-NEXT: 12: [B1.11] (ImplicitCastExpr, LValueToRValue, int)
|
||||
|
|
|
@ -81,7 +81,7 @@ void test_4(int x, int y) {
|
|||
clang_analyzer_explain(&stat); // expected-warning-re{{{{^pointer to static local variable 'stat'$}}}}
|
||||
clang_analyzer_explain(stat_glob); // expected-warning-re{{{{^initial value of global variable 'stat_glob'$}}}}
|
||||
clang_analyzer_explain(&stat_glob); // expected-warning-re{{{{^pointer to global variable 'stat_glob'$}}}}
|
||||
clang_analyzer_explain((int[]){1, 2, 3}); // expected-warning-re{{{{^pointer to element of type 'int' with index 0 of temporary object constructed at statement '\(int\[3\]\)\{1, 2, 3\}'$}}}}
|
||||
clang_analyzer_explain((int[]){1, 2, 3}); // expected-warning-re{{{{^pointer to element of type 'int' with index 0 of temporary object constructed at statement '\(int \[3\]\)\{1, 2, 3\}'$}}}}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -84,9 +84,9 @@ void test_const_ref() {
|
|||
// CHECK: [B2 (ENTRY)]
|
||||
// CHECK-NEXT: Succs (1): B1
|
||||
// CHECK: [B1]
|
||||
// CHECK-NEXT: 1: (CXXConstructExpr, class A[2])
|
||||
// CHECK-NEXT: 1: (CXXConstructExpr, class A [2])
|
||||
// CHECK-NEXT: 2: A a[2];
|
||||
// CHECK-NEXT: 3: (CXXConstructExpr, class A[0])
|
||||
// CHECK-NEXT: 3: (CXXConstructExpr, class A [0])
|
||||
// CHECK-NEXT: 4: A b[0];
|
||||
// lifetime of a ends when its destructors are run
|
||||
// CHECK-NEXT: 5: [B1.2] (Lifetime ends)
|
||||
|
|
|
@ -49,6 +49,6 @@ int *mallocArraySize() {
|
|||
|
||||
int *mallocWrongArraySize() {
|
||||
static const double sTable[10];
|
||||
int *table = malloc(sizeof sTable); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'const double[10]'}}
|
||||
int *table = malloc(sizeof sTable); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'const double [10]'}}
|
||||
return table;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ void compound_literal() {
|
|||
// CHECK: void compound_literal()
|
||||
// CHECK: (CXXConstructExpr, struct Bar)
|
||||
// CHECK: (CXXConstructExpr, struct Bar)
|
||||
// CHECK: ~Bar[2]() (Temporary object destructor)
|
||||
// CHECK: ~Bar [2]() (Temporary object destructor)
|
||||
|
||||
Foo elided_return() {
|
||||
return get_foo();
|
||||
|
@ -258,17 +258,17 @@ void default_ctor_with_default_arg() {
|
|||
DefaultArgInCtor qux[3];
|
||||
}
|
||||
// CHECK: void default_ctor_with_default_arg()
|
||||
// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[3]
|
||||
// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor [3]
|
||||
// CXX14: ~Foo() (Temporary object destructor)
|
||||
// CHECK: ~Foo() (Temporary object destructor)
|
||||
// CHECK: .~DefaultArgInCtor[3]() (Implicit destructor)
|
||||
// CHECK: .~DefaultArgInCtor [3]() (Implicit destructor)
|
||||
|
||||
void new_default_ctor_with_default_arg(long count) {
|
||||
// Same problems as above.
|
||||
new DefaultArgInCtor[count];
|
||||
}
|
||||
// CHECK: void new_default_ctor_with_default_arg(long count)
|
||||
// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[]
|
||||
// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor []
|
||||
// CXX14: ~Foo() (Temporary object destructor)
|
||||
// CHECK: ~Foo() (Temporary object destructor)
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ extern const bool UV;
|
|||
// CHECK-NEXT: Succs (1): B1
|
||||
// CHECK: [B1]
|
||||
// CHECK-NEXT: 1: CFGScopeBegin(a)
|
||||
// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A[2])
|
||||
// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A [2])
|
||||
// CHECK-NEXT: 3: A a[2];
|
||||
// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class A[0])
|
||||
// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class A [0])
|
||||
// CHECK-NEXT: 5: A b[0];
|
||||
// CHECK-NEXT: 6: [B1.3].~A[2]() (Implicit destructor)
|
||||
// CHECK-NEXT: 6: [B1.3].~A [2]() (Implicit destructor)
|
||||
// CHECK-NEXT: 7: CFGScopeEnd(a)
|
||||
// CHECK-NEXT: Preds (1): B2
|
||||
// CHECK-NEXT: Succs (1): B0
|
||||
|
@ -810,7 +810,7 @@ void test_for_compound_and_break() {
|
|||
// CHECK-NEXT: 1: CFGScopeEnd(__end1)
|
||||
// CHECK-NEXT: 2: CFGScopeEnd(__begin1)
|
||||
// CHECK-NEXT: 3: CFGScopeEnd(__range1)
|
||||
// CHECK-NEXT: 4: [B5.3].~A[10]() (Implicit destructor)
|
||||
// CHECK-NEXT: 4: [B5.3].~A [10]() (Implicit destructor)
|
||||
// CHECK-NEXT: 5: CFGScopeEnd(a)
|
||||
// CHECK-NEXT: Preds (1): B2
|
||||
// CHECK-NEXT: Succs (1): B0
|
||||
|
@ -846,7 +846,7 @@ void test_for_compound_and_break() {
|
|||
// CHECK-NEXT: Succs (1): B3
|
||||
// CHECK: [B5]
|
||||
// CHECK-NEXT: 1: CFGScopeBegin(a)
|
||||
// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A[10])
|
||||
// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A [10])
|
||||
// CHECK-NEXT: 3: A a[10];
|
||||
// CHECK-NEXT: 4: a
|
||||
// CHECK-NEXT: 5: auto &&__range1 = a;
|
||||
|
|
|
@ -32,7 +32,7 @@ struct Incomplete; // expected-note 2{{forward declaration of 'Incomplete'}}
|
|||
template<class T> struct ClassTemp {};
|
||||
|
||||
constexpr Incomplete incomplete = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete'}} expected-note {{incomplete type 'const Incomplete' is not a literal type}}
|
||||
constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete[]'}} expected-note {{incomplete type 'const Incomplete[]' is not a literal type}}
|
||||
constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete []'}} expected-note {{incomplete type 'const Incomplete []' is not a literal type}}
|
||||
constexpr ClassTemp<int> classtemplate = {};
|
||||
constexpr ClassTemp<int> classtemplate2[] = {};
|
||||
|
||||
|
@ -132,12 +132,12 @@ struct ArrGood {
|
|||
constexpr int f(ArrGood) { return 0; }
|
||||
|
||||
struct ArrBad {
|
||||
S s[3]; // expected-note {{data member 's' of non-literal type 'S[3]'}}
|
||||
S s[3]; // expected-note {{data member 's' of non-literal type 'S [3]'}}
|
||||
};
|
||||
constexpr int f(ArrBad) { return 0; } // expected-error {{1st parameter type 'ArrBad' is not a literal type}}
|
||||
|
||||
constexpr int arb(int n) {
|
||||
int a[n]; // expected-error {{variable of non-literal type 'int[n]' cannot be defined in a constexpr function}}
|
||||
int a[n]; // expected-error {{variable of non-literal type 'int [n]' cannot be defined in a constexpr function}}
|
||||
}
|
||||
// expected-warning@+1 {{variable length array folded to constant array as an extension}}
|
||||
constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34 bits to represent}}
|
||||
|
|
|
@ -9,7 +9,7 @@ static_assert(alignof(X<int, char, 1>) == alignof(int), "");
|
|||
|
||||
|
||||
template<typename T, typename A, int N> struct Y {
|
||||
alignas(A) T buffer[N]; // expected-error {{requested alignment is less than minimum alignment of 4 for type 'int[1]'}}
|
||||
alignas(A) T buffer[N]; // expected-error {{requested alignment is less than minimum alignment of 4 for type 'int [1]'}}
|
||||
};
|
||||
|
||||
static_assert(alignof(Y<char, int, sizeof(int)>) == alignof(int), "");
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace VariableLengthArrays {
|
|||
const int m = 42;
|
||||
using U = int[m];
|
||||
using U = int[42]; // expected-note {{previous definition}}
|
||||
using U = int; // expected-error {{type alias redefinition with different types ('int' vs 'int[42]')}}
|
||||
using U = int; // expected-error {{type alias redefinition with different types ('int' vs 'int [42]')}}
|
||||
|
||||
void f() {
|
||||
int n = 42;
|
||||
|
|
|
@ -16,8 +16,8 @@ int array() {
|
|||
using X3 = X[3];
|
||||
auto [a3, b3, c3] = X3{1, 2, 3};
|
||||
|
||||
auto &[d, e] = arr; // expected-error {{type 'int[3]' decomposes into 3 elements, but only 2 names were provided}}
|
||||
auto &[f, g, h, i] = arr; // expected-error {{type 'int[3]' decomposes into 3 elements, but 4 names were provided}}
|
||||
auto &[d, e] = arr; // expected-error {{type 'int [3]' decomposes into 3 elements, but only 2 names were provided}}
|
||||
auto &[f, g, h, i] = arr; // expected-error {{type 'int [3]' decomposes into 3 elements, but 4 names were provided}}
|
||||
|
||||
auto &[r0, r1, r2] = arr;
|
||||
const auto &[cr0, cr1, cr2] = arr;
|
||||
|
|
|
@ -134,11 +134,11 @@ namespace rdar13395022 {
|
|||
|
||||
void test(MoveOnly mo) {
|
||||
auto &&list1 = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'std::initializer_list}}
|
||||
MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]'}}
|
||||
MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'rdar13395022::MoveOnly [1]'}}
|
||||
std::initializer_list<MoveOnly> &&list3 = {};
|
||||
MoveOnly (&&list4)[1] = {}; // expected-error {{no matching constructor}}
|
||||
// expected-note@-1 {{in implicit initialization of array element 0 with omitted initializer}}
|
||||
// expected-note@-2 {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]' created to list-initialize this reference}}
|
||||
// expected-note@-2 {{in initialization of temporary of type 'rdar13395022::MoveOnly [1]' created to list-initialize this reference}}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
namespace test0 {
|
||||
extern "C" int array[];
|
||||
void declare() { extern int array[100]; }
|
||||
int value1 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int value1 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
extern "C" int array[];
|
||||
int value2 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int value2 = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
namespace test1 {
|
||||
|
@ -18,21 +18,21 @@ namespace test1 {
|
|||
void test() {
|
||||
{ extern int array[100]; }
|
||||
extern int array[];
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
}
|
||||
|
||||
namespace test2 {
|
||||
void declare() { extern int array[100]; }
|
||||
extern int array[];
|
||||
int value = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int value = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
namespace test3 {
|
||||
void test() {
|
||||
{ extern int array[100]; }
|
||||
extern int array[];
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace test4 {
|
|||
extern int array[100];
|
||||
int x = sizeof(array);
|
||||
}
|
||||
int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
namespace test5 {
|
||||
|
@ -58,7 +58,7 @@ namespace test6 {
|
|||
extern int array[100];
|
||||
{
|
||||
extern int array[];
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
int y = sizeof(array);
|
||||
extern int array[];
|
||||
|
@ -70,7 +70,7 @@ namespace test7 {
|
|||
extern int array[100];
|
||||
void test() {
|
||||
extern int array[];
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
int y = sizeof(array);
|
||||
extern int array[];
|
||||
|
@ -83,9 +83,9 @@ namespace test8 {
|
|||
extern int array[100];
|
||||
int x = sizeof(array);
|
||||
}
|
||||
int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int y = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
extern int array[];
|
||||
int z = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int z = sizeof(array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
namespace dependent {
|
||||
|
@ -145,7 +145,7 @@ namespace dependent {
|
|||
|
||||
template<typename T, typename U> void l() {
|
||||
extern T arrX; // expected-note {{previous}}
|
||||
extern U arrX; // expected-error {{different type: 'int[4]' vs 'int[3]'}}
|
||||
extern U arrX; // expected-error {{different type: 'int [4]' vs 'int [3]'}}
|
||||
(void)sizeof(arrX); // expected-error {{incomplete}}
|
||||
}
|
||||
|
||||
|
@ -210,4 +210,4 @@ namespace use_outside_ns {
|
|||
|
||||
extern int arr[];
|
||||
void f1() { extern int arr[2]; } // expected-note {{previous}}
|
||||
void f2() { extern int arr[3]; } // expected-error {{different type: 'int[3]' vs 'int[2]'}}
|
||||
void f2() { extern int arr[3]; } // expected-error {{different type: 'int [3]' vs 'int [2]'}}
|
||||
|
|
|
@ -57,15 +57,15 @@ template<typename T>
|
|||
void b(T[] ...);
|
||||
|
||||
template<typename T>
|
||||
void c(T ... []); // expected-error{{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
void c(T ... []); // expected-error{{type 'T []' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
|
||||
template<typename T>
|
||||
void d(T ... x[]); // expected-error{{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
void d(T ... x[]); // expected-error{{type 'T []' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
|
||||
void ai(int[] ... x); // expected-error{{expected ')'}} expected-note{{to match this '('}}
|
||||
void bi(int[] ...);
|
||||
void ci(int ... []); // expected-error{{type 'int[]' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
void di(int ... x[]); // expected-error{{type 'int[]' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
void ci(int ... []); // expected-error{{type 'int []' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
void di(int ... x[]); // expected-error{{type 'int []' of function parameter pack does not contain any unexpanded parameter packs}}
|
||||
}
|
||||
|
||||
void f5a(auto fp(int)->unk ...) {} // expected-error{{unknown type name 'unk'}}
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace dr1772 { // dr1772: 14
|
|||
// CXX11: CXXRecordDecl
|
||||
// CXX11: CXXMethodDecl{{.+}} operator() 'void () const'
|
||||
// CXX11-NEXT: CompoundStmt
|
||||
// CXX11-NEXT: PredefinedExpr{{.+}} 'const char[11]' lvalue __func__
|
||||
// CXX11-NEXT: StringLiteral{{.+}} 'const char[11]' lvalue "operator()"
|
||||
// CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__
|
||||
// CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()"
|
||||
|
||||
void func() {
|
||||
// CXX11: FunctionDecl{{.+}} func
|
||||
|
@ -23,8 +23,8 @@ namespace dr1772 { // dr1772: 14
|
|||
// CXX11: CXXRecordDecl
|
||||
// CXX11: CXXMethodDecl{{.+}} operator() 'void () const'
|
||||
// CXX11-NEXT: CompoundStmt
|
||||
// CXX11-NEXT: PredefinedExpr{{.+}} 'const char[11]' lvalue __func__
|
||||
// CXX11-NEXT: StringLiteral{{.+}} 'const char[11]' lvalue "operator()"
|
||||
// CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__
|
||||
// CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()"
|
||||
}
|
||||
#endif // __cplusplus >= 201103L
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// RUN: %clang_cc1 -std=c++2a -verify %s
|
||||
|
||||
template<typename T> requires (sizeof(T) >= 4 && sizeof(T) <= 10)
|
||||
// expected-note@-1{{because 'sizeof(char[20]) <= 10' (20 <= 10) evaluated to false}}
|
||||
// expected-note@-1{{because 'sizeof(char [20]) <= 10' (20 <= 10) evaluated to false}}
|
||||
// expected-note@-2{{because 'sizeof(char) >= 4' (1 >= 4) evaluated to false}}
|
||||
void foo() requires (sizeof(T) <= 8) {}
|
||||
// expected-note@-1{{candidate template ignored: constraints not satisfied [with T = char]}}
|
||||
// expected-note@-2{{candidate template ignored: constraints not satisfied [with T = char[9]]}}
|
||||
// expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char[20]]}}
|
||||
// expected-note@-4{{because 'sizeof(char[9]) <= 8' (9 <= 8) evaluated to false}}
|
||||
// expected-note@-2{{candidate template ignored: constraints not satisfied [with T = char [9]]}}
|
||||
// expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char [20]]}}
|
||||
// expected-note@-4{{because 'sizeof(char [9]) <= 8' (9 <= 8) evaluated to false}}
|
||||
|
||||
void bar() {
|
||||
foo<char>(); // expected-error{{no matching function for call to 'foo'}}
|
||||
|
@ -15,4 +15,4 @@ void bar() {
|
|||
foo<unsigned long long int>();
|
||||
foo<char[9]>(); // expected-error{{no matching function for call to 'foo'}}
|
||||
foo<char[20]>(); // expected-error{{no matching function for call to 'foo'}}
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ namespace methods
|
|||
{
|
||||
template<typename T>
|
||||
struct A {
|
||||
static void foo(int) requires (sizeof(T) == 1) {} // expected-note 3{{because 'sizeof(char[2]) == 1' (2 == 1) evaluated to false}}
|
||||
static void foo(int) requires (sizeof(T) == 1) {} // expected-note 3{{because 'sizeof(char [2]) == 1' (2 == 1) evaluated to false}}
|
||||
static void bar(int) requires (sizeof(T) == 2) {} // expected-note 3{{because 'sizeof(char) == 2' (1 == 2) evaluated to false}}
|
||||
// Make sure the function body is not instantiated before constraints are checked.
|
||||
static auto baz(int) requires (sizeof(T) == 2) { return T::foo(); } // expected-note{{because 'sizeof(char) == 2' (1 == 2) evaluated to false}}
|
||||
|
@ -58,4 +58,4 @@ namespace operators
|
|||
auto* x = &A<int>::operator-; // expected-error{{invalid reference to function 'operator-': constraints not satisfied}}
|
||||
auto y = &A<char>::operator-;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,5 +48,5 @@ void test_result_type(int N) {
|
|||
auto l1 = [] () -> Incomplete { }; // expected-error{{incomplete result type 'Incomplete' in lambda expression}}
|
||||
|
||||
typedef int vla[N];
|
||||
auto l2 = [] () -> vla { }; // expected-error{{function cannot return array type 'vla' (aka 'int[N]')}}
|
||||
auto l2 = [] () -> vla { }; // expected-error{{function cannot return array type 'vla' (aka 'int [N]')}}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ struct B1 {
|
|||
const int a; // expected-note 2{{field 'a' is of const-qualified type}}
|
||||
};
|
||||
struct B2 {
|
||||
const void *const a[3][9][2]; // expected-note 2{{field 'a' is of const-qualified type 'const void *const[3][9][2]'}}
|
||||
const void *const a[3][9][2]; // expected-note 2{{field 'a' is of const-qualified type 'const void *const [3][9][2]'}}
|
||||
};
|
||||
struct B3 {
|
||||
const void *a[3];
|
||||
|
|
|
@ -57,7 +57,7 @@ class Deleted3a { const int a; }; // expected-note {{because field 'a' of const-
|
|||
expected-warning {{does not declare any constructor}} \
|
||||
expected-note {{will never be initialized}}
|
||||
Deleted3a d3a; // expected-error {{implicitly-deleted default constructor}}
|
||||
class Deleted3b { const DefaultedDefCtor1 a[42]; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor1[42]' would not be initialized}}
|
||||
class Deleted3b { const DefaultedDefCtor1 a[42]; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor1 [42]' would not be initialized}}
|
||||
Deleted3b d3b; // expected-error {{implicitly-deleted default constructor}}
|
||||
class Deleted3c { const DefaultedDefCtor2 a; }; // expected-note {{because field 'a' of const-qualified type 'const DefaultedDefCtor2' would not be initialized}}
|
||||
Deleted3c d3c; // expected-error {{implicitly-deleted default constructor}}
|
||||
|
|
|
@ -121,10 +121,10 @@ void g() {
|
|||
;
|
||||
|
||||
extern int incomplete[];
|
||||
for (auto a : incomplete) // expected-error {{cannot use incomplete type 'int[]' as a range}}
|
||||
for (auto a : incomplete) // expected-error {{cannot use incomplete type 'int []' as a range}}
|
||||
;
|
||||
extern struct Incomplete also_incomplete[2]; // expected-note 2{{forward declaration}}
|
||||
for (auto &a : also_incomplete) // expected-error {{cannot use incomplete type 'struct Incomplete[2]' as a range}}
|
||||
for (auto &a : also_incomplete) // expected-error {{cannot use incomplete type 'struct Incomplete [2]' as a range}}
|
||||
;
|
||||
|
||||
struct VoidBegin {
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace addr_of_obj_or_func {
|
|||
|
||||
X2<i> x2a;
|
||||
X2<&i> x2a_addr; // expected-error {{address taken}}
|
||||
X2<iarr> x2b; // expected-error {{cannot bind to template argument of type 'int[10]'}}
|
||||
X2<iarr> x2b; // expected-error {{cannot bind to template argument of type 'int [10]'}}
|
||||
X2<&iarr> x2b_addr; // expected-error {{address taken}}
|
||||
X2<ki> x2c; // expected-error {{ignores qualifiers}}
|
||||
#if __cplusplus <= 199711L
|
||||
|
|
|
@ -9,20 +9,20 @@ static_assert(A<int>::value == 4);
|
|||
static_assert(A<char>::value == 1); // expected-error{{constraints not satisfied for class template 'A' [with T = char]}}
|
||||
|
||||
template<typename T, typename U>
|
||||
requires (sizeof(T) != sizeof(U) // expected-note{{because 'sizeof(int) != sizeof(char[4])' (4 != 4) evaluated to false}}
|
||||
requires (sizeof(T) != sizeof(U) // expected-note{{because 'sizeof(int) != sizeof(char [4])' (4 != 4) evaluated to false}}
|
||||
&& sizeof(T) >= 4) // expected-note{{because 'sizeof(char) >= 4' (1 >= 4) evaluated to false}}
|
||||
constexpr int SizeDiff = sizeof(T) > sizeof(U) ? sizeof(T) - sizeof(U) : sizeof(U) - sizeof(T);
|
||||
|
||||
static_assert(SizeDiff<int, char> == 3);
|
||||
static_assert(SizeDiff<int, char[4]> == 0); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = int, U = char[4]]}}
|
||||
static_assert(SizeDiff<int, char[4]> == 0); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = int, U = char [4]]}}
|
||||
static_assert(SizeDiff<char, int> == 3); // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = char, U = int]}}
|
||||
|
||||
template<typename... Ts>
|
||||
requires ((sizeof(Ts) == 4) || ...) // expected-note{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}} expected-note{{'sizeof(long long) == 4' (8 == 4) evaluated to false}} expected-note{{'sizeof(int[20]) == 4' (80 == 4) evaluated to false}}
|
||||
requires ((sizeof(Ts) == 4) || ...) // expected-note{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}} expected-note{{'sizeof(long long) == 4' (8 == 4) evaluated to false}} expected-note{{'sizeof(int [20]) == 4' (80 == 4) evaluated to false}}
|
||||
constexpr auto SumSizes = (sizeof(Ts) + ...);
|
||||
|
||||
static_assert(SumSizes<char, long long, int> == 13);
|
||||
static_assert(SumSizes<char, long long, int[20]> == 89); // expected-error{{constraints not satisfied for variable template 'SumSizes' [with Ts = <char, long long, int[20]>]}}
|
||||
static_assert(SumSizes<char, long long, int[20]> == 89); // expected-error{{constraints not satisfied for variable template 'SumSizes' [with Ts = <char, long long, int [20]>]}}
|
||||
|
||||
template<typename T>
|
||||
concept IsBig = sizeof(T) > 100; // expected-note{{because 'sizeof(int) > 100' (4 > 100) evaluated to false}}
|
||||
|
@ -44,28 +44,28 @@ static_assert(S<S2>::value);
|
|||
template<typename T>
|
||||
struct AA
|
||||
{
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
struct B
|
||||
{
|
||||
static constexpr int a = 0;
|
||||
};
|
||||
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
static constexpr int b = 1;
|
||||
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int[2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
static constexpr int getB() { // expected-note{{candidate template ignored: constraints not satisfied [with U = int[2]]}}
|
||||
template<typename U> requires (sizeof(U) == sizeof(T)) // expected-note{{because 'sizeof(int [2]) == sizeof(int)' (8 == 4) evaluated to false}}
|
||||
static constexpr int getB() { // expected-note{{candidate template ignored: constraints not satisfied [with U = int [2]]}}
|
||||
return 2;
|
||||
}
|
||||
|
||||
static auto foo()
|
||||
{
|
||||
return B<T[2]>::a; // expected-error{{constraints not satisfied for class template 'B' [with U = int[2]]}}
|
||||
return B<T[2]>::a; // expected-error{{constraints not satisfied for class template 'B' [with U = int [2]]}}
|
||||
}
|
||||
|
||||
static auto foo1()
|
||||
{
|
||||
return b<T[2]>; // expected-error{{constraints not satisfied for variable template 'b' [with U = int[2]]}}
|
||||
return b<T[2]>; // expected-error{{constraints not satisfied for variable template 'b' [with U = int [2]]}}
|
||||
}
|
||||
|
||||
static auto foo2()
|
||||
|
|
|
@ -12,11 +12,11 @@ void test() {
|
|||
template<typename Head, typename ...Tail>
|
||||
void recurse_until_fail(const Head &, const Tail &...tail) { // expected-note{{candidate function template not viable: requires at least 1 argument, but 0 were provided}}
|
||||
recurse_until_fail(tail...); // expected-error{{no matching function for call to 'recurse_until_fail'}} \
|
||||
// expected-note{{in instantiation of function template specialization 'recurse_until_fail<char[7]>' requested here}} \
|
||||
// expected-note{{in instantiation of function template specialization 'recurse_until_fail<double, char[7]>' requested here}}
|
||||
// expected-note{{in instantiation of function template specialization 'recurse_until_fail<char [7]>' requested here}} \
|
||||
// expected-note{{in instantiation of function template specialization 'recurse_until_fail<double, char [7]>' requested here}}
|
||||
}
|
||||
|
||||
void test_recurse_until_fail() {
|
||||
recurse_until_fail(1, 3.14159, "string"); // expected-note{{in instantiation of function template specialization 'recurse_until_fail<int, double, char[7]>' requested here}}
|
||||
recurse_until_fail(1, 3.14159, "string"); // expected-note{{in instantiation of function template specialization 'recurse_until_fail<int, double, char [7]>' requested here}}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
|
||||
|
||||
template<typename T, typename S = char> requires (sizeof(T) + sizeof(S) < 10)
|
||||
// expected-note@-1{{because 'sizeof(char[100]) + sizeof(char) < 10' (101 < 10) evaluated to false}}
|
||||
// expected-note@-1{{because 'sizeof(char [100]) + sizeof(char) < 10' (101 < 10) evaluated to false}}
|
||||
void f(T t, S s) requires (sizeof(t) == 1 && sizeof(s) == 1) { };
|
||||
// expected-note@-1{{candidate template ignored: constraints not satisfied [with T = int, S = char]}}
|
||||
// expected-note@-2{{because 'sizeof (t) == 1' (4 == 1) evaluated to false}}
|
||||
// expected-note@-3{{candidate template ignored: constraints not satisfied [with T = char, S = short]}}
|
||||
// expected-note@-4{{because 'sizeof (s) == 1' (2 == 1) evaluated to false}}
|
||||
// expected-note@-5{{candidate template ignored: constraints not satisfied [with T = char[100], S = char]}}
|
||||
// expected-note@-5{{candidate template ignored: constraints not satisfied [with T = char [100], S = char]}}
|
||||
|
||||
template<>
|
||||
void f<int>(int t, char s) { };
|
||||
|
@ -19,4 +19,4 @@ void f<char, short>(char t, short s) { };
|
|||
|
||||
template<>
|
||||
void f<char[100]>(char t[100], char s) { };
|
||||
// expected-error@-1{{no function template matches function template specialization 'f'}}
|
||||
// expected-error@-1{{no function template matches function template specialization 'f'}}
|
|
@ -27,21 +27,21 @@ using b4 = B<short, char>; // expected-error {{constraints not satisfied for ali
|
|||
|
||||
template<typename... T>
|
||||
concept C3 = (sizeof(T) + ...) == 12;
|
||||
// expected-note@-1 {{because 'sizeof(char[11]) == 12' (11 == 12) evaluated to false}}
|
||||
// expected-note@-2 {{because 'sizeof(char[10]) == 12' (10 == 12) evaluated to false}}
|
||||
// expected-note@-1 {{because 'sizeof(char [11]) == 12' (11 == 12) evaluated to false}}
|
||||
// expected-note@-2 {{because 'sizeof(char [10]) == 12' (10 == 12) evaluated to false}}
|
||||
// expected-note@-3 3{{because 'sizeof(int) == 12' (4 == 12) evaluated to false}}
|
||||
// expected-note@-4 6{{because 'sizeof(short) == 12' (2 == 12) evaluated to false}}
|
||||
|
||||
template<C3 T1, C3 T2, C3 T3>
|
||||
// expected-note@-1 {{because 'char[11]' does not satisfy 'C3'}}
|
||||
// expected-note@-2 {{because 'char[10]' does not satisfy 'C3'}}
|
||||
// expected-note@-1 {{because 'char [11]' does not satisfy 'C3'}}
|
||||
// expected-note@-2 {{because 'char [10]' does not satisfy 'C3'}}
|
||||
using C = T2;
|
||||
|
||||
using c1 = C<char[12], int[3], short[6]>;
|
||||
using c2 = C<char[12], char[11], char[10]>;
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[11], T3 = char[10]]}}
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char [12], T2 = char [11], T3 = char [10]]}}
|
||||
using c3 = C<char[12], char[12], char[10]>;
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[12], T3 = char[10]]}}
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char [12], T2 = char [12], T3 = char [10]]}}
|
||||
|
||||
template<C3... Ts>
|
||||
// expected-note@-1 {{because 'int' does not satisfy 'C3'}}
|
||||
|
@ -87,33 +87,33 @@ using f2 = F<long>; // expected-error {{constraints not satisfied for alias temp
|
|||
|
||||
template<typename T, typename... Ts>
|
||||
concept OneOf = (is_same_v<T, Ts> || ...);
|
||||
// expected-note@-1 2{{because 'is_same_v<char, char[1]>' evaluated to false}}
|
||||
// expected-note@-2 2{{and 'is_same_v<char, char[2]>' evaluated to false}}
|
||||
// expected-note@-1 2{{because 'is_same_v<char, char [1]>' evaluated to false}}
|
||||
// expected-note@-2 2{{and 'is_same_v<char, char [2]>' evaluated to false}}
|
||||
// expected-note@-3 {{because 'is_same_v<short, int>' evaluated to false}}
|
||||
// expected-note@-4 {{and 'is_same_v<short, long>' evaluated to false}}
|
||||
// expected-note@-5 {{and 'is_same_v<short, char>' evaluated to false}}
|
||||
// expected-note@-6 3{{because 'is_same_v<int, char[1]>' evaluated to false}}
|
||||
// expected-note@-7 3{{and 'is_same_v<int, char[2]>' evaluated to false}}
|
||||
// expected-note@-6 3{{because 'is_same_v<int, char [1]>' evaluated to false}}
|
||||
// expected-note@-7 3{{and 'is_same_v<int, char [2]>' evaluated to false}}
|
||||
// expected-note@-8 2{{because 'is_same_v<std::nullptr_t, char>' evaluated to false}}
|
||||
// expected-note@-9 2{{and 'is_same_v<std::nullptr_t, int>' evaluated to false}}
|
||||
|
||||
template<OneOf<char[1], char[2]> T, OneOf<int, long, char> U>
|
||||
// expected-note@-1 2{{because 'OneOf<char, char[1], char[2]>' evaluated to false}}
|
||||
// expected-note@-1 2{{because 'OneOf<char, char [1], char [2]>' evaluated to false}}
|
||||
// expected-note@-2 {{because 'OneOf<short, int, long, char>' evaluated to false}}
|
||||
using G = T;
|
||||
|
||||
using g1 = G<char[1], int>;
|
||||
using g2 = G<char, int>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = int]}}
|
||||
using g3 = G<char[1], short>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char[1], U = short]}}
|
||||
using g3 = G<char[1], short>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char [1], U = short]}}
|
||||
using g4 = G<char, short>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = short]}}
|
||||
|
||||
template<OneOf<char[1], char[2]>... Ts>
|
||||
// expected-note@-1 2{{because 'OneOf<int, char[1], char[2]>' evaluated to false}}
|
||||
// expected-note@-2 {{and 'OneOf<int, char[1], char[2]>' evaluated to false}}
|
||||
// expected-note@-1 2{{because 'OneOf<int, char [1], char [2]>' evaluated to false}}
|
||||
// expected-note@-2 {{and 'OneOf<int, char [1], char [2]>' evaluated to false}}
|
||||
using H = int;
|
||||
|
||||
using h1 = H<char[1], int>;
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = <char[1], int>]}}
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = <char [1], int>]}}
|
||||
using h2 = H<int, int>;
|
||||
// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = <int, int>]}}
|
||||
using h3 = H<char[1], char[2]>;
|
||||
|
|
|
@ -156,7 +156,7 @@ void g29() {
|
|||
// CHECK: @g29.b = internal global [1 x i32] [i32 ptrtoint ([5 x i8]* @.str.1 to i32)], align 4
|
||||
// CHECK: @g29.c = internal global [1 x i32] [i32 97], align 4
|
||||
static DCC_SRVR_NM a = { {"@"} };
|
||||
static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[5]'}}
|
||||
static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [5]'}}
|
||||
static int c[1] = { L"a" };
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
|
||||
// CHECK: @__const.unit15.a = private unnamed_addr constant %struct.U15A { [3 x i32] [i32 1, i32 2, i32 3] }, align 4
|
||||
// CHECK-NEXT: [[STRUCT_STR_U15:@[0-9]+]] = private unnamed_addr constant [15 x i8] c"struct U15A {\0A\00"
|
||||
// CHECK-NEXT: [[FIELD_U15:@[0-9]+]] = private unnamed_addr constant [12 x i8] c"int[3] a : \00"
|
||||
// CHECK-NEXT: [[FIELD_U15:@[0-9]+]] = private unnamed_addr constant [13 x i8] c"int [3] a : \00"
|
||||
// CHECK-NEXT: [[FORMAT_U15:@[0-9]+]] = private unnamed_addr constant [4 x i8] c"%p\0A\00"
|
||||
// CHECK-NEXT: [[END_STRUCT_U15:@[0-9]+]] = private unnamed_addr constant [3 x i8] c"}\0A\00"
|
||||
|
||||
|
@ -380,7 +380,7 @@ void unit15() {
|
|||
|
||||
// CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[STRUCT_STR_U15]], i32 0, i32 0))
|
||||
// CHECK: [[RES1:%[0-9]+]] = getelementptr inbounds %struct.U15A, %struct.U15A* %a, i32 0, i32 0
|
||||
// CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* [[FIELD_U15]], i32 0, i32 0))
|
||||
// CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* [[FIELD_U15]], i32 0, i32 0))
|
||||
// CHECK: [[LOAD1:%[0-9]+]] = load [3 x i32], [3 x i32]* [[RES1]],
|
||||
// CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[FORMAT_U15]], i32 0, i32 0), [3 x i32] [[LOAD1]])
|
||||
// CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* [[END_STRUCT_U15]], i32 0, i32 0)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
|
||||
// CHECK: CXXCtorInitializer
|
||||
// CHECK-NEXT: ArrayInitLoopExpr
|
||||
// CHECK-SAME: 'int[10]'
|
||||
// CHECK-SAME: 'int [10]'
|
||||
|
||||
// CHECK: ArrayInitIndexExpr
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ struct BaseStruct
|
|||
namespace NotConstantSize {
|
||||
|
||||
void f(int i) {
|
||||
// CHECK32: VarDecl=v2:[[@LINE+1]]:8 (Definition) [type=int[i]] [typekind=VariableArray] [sizeof=-4] [alignof=4]
|
||||
// CHECK32: VarDecl=v2:[[@LINE+1]]:8 (Definition) [type=int [i]] [typekind=VariableArray] [sizeof=-4] [alignof=4]
|
||||
int v2[i];
|
||||
{
|
||||
struct CS1 {
|
||||
|
|
|
@ -32,12 +32,12 @@ void fun(struct { int x; int y; } *param);
|
|||
_Atomic(unsigned long) aul;
|
||||
|
||||
// RUN: c-index-test -test-print-type %s | FileCheck %s
|
||||
// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int[5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0]
|
||||
// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int [5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0]
|
||||
// CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
|
||||
// CHECK: ParmDecl=x:3:22 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}]
|
||||
// CHECK: ParmDecl=z:3:33 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
|
||||
// CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
|
||||
// CHECK: ParmDecl=arr:3:40 (Definition) [type=int[5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: ParmDecl=arr:3:40 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: ParmDecl=fn:3:55 (Definition) [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=void (int)] [pointeekind=FunctionProto]
|
||||
// CHECK: ParmDecl=:3:62 (Definition) [type=int] [typekind=Int] [isPOD=1]
|
||||
|
@ -56,14 +56,14 @@ _Atomic(unsigned long) aul;
|
|||
// CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
|
||||
// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
|
||||
// CHECK: ArraySubscriptExpr= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: UnexposedExpr=arr:3:40 [type=int[5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: UnexposedExpr=arr:3:40 [type=int [5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: TypedefDecl=OtherType:8:16 (Definition) [type=OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1]
|
||||
// CHECK: TypedefDecl=ArrayType:9:13 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int[5]] [canonicaltypekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: TypedefDecl=ArrayType:9:13 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: VarDecl=x:10:38 [type=__attribute__((__vector_size__(4 * sizeof(int)))) int] [typekind=Vector] [isPOD=1]
|
||||
// CHECK: TypedefDecl=int4_t:11:46 (Definition) [type=int4_t] [typekind=Typedef] [canonicaltype=__attribute__((__vector_size__(4 * sizeof(int)))) int] [canonicaltypekind=Vector] [isPOD=1]
|
||||
// CHECK: ParmDecl=incompletearray:13:12 (Definition) [type=int[]] [typekind=IncompleteArray] [isPOD=1]
|
||||
// CHECK: ParmDecl=incompletearray:13:12 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1]
|
||||
// CHECK: FunctionDecl=elaboratedEnumType:15:25 [type=enum Enum ()] [typekind=FunctionNoProto] [canonicaltype=enum Enum ()] [canonicaltypekind=FunctionNoProto] [resulttype=enum Enum] [resulttypekind=Elaborated] [isPOD=0]
|
||||
// CHECK: TypeRef=enum Enum:15:6 [type=enum Enum] [typekind=Enum] [isPOD=1]
|
||||
// CHECK: StructDecl=Struct:16:8 (Definition) [type=struct Struct] [typekind=Record] [isPOD=1]
|
||||
|
|
|
@ -130,7 +130,7 @@ inline namespace InlineNS {}
|
|||
// CHECK: UnexposedExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
|
||||
// CHECK: DeclRefExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
|
||||
// CHECK: TypedefDecl=OtherType:26:18 (Definition) [type=outer::inner::Bar::OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1]
|
||||
// CHECK: TypedefDecl=ArrayType:27:15 (Definition) [type=outer::inner::Bar::ArrayType] [typekind=Typedef] [canonicaltype=int[5]] [canonicaltypekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: TypedefDecl=ArrayType:27:15 (Definition) [type=outer::inner::Bar::ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: FieldDecl=baz:28:20 (Definition) [type=Baz<int, 1, outer::Foo>] [typekind=Unexposed] [templateargs/3= [type=int] [typekind=Int]] [canonicaltype=outer::Baz<int, 1, outer::Foo>] [canonicaltypekind=Record] [canonicaltemplateargs/3= [type=int] [typekind=Int]] [isPOD=1]
|
||||
// CHECK: TemplateRef=Baz:9:8 [type=] [typekind=Invalid] [isPOD=0]
|
||||
|
@ -146,20 +146,20 @@ inline namespace InlineNS {}
|
|||
// CHECK: FunctionTemplate=tbar:39:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: TemplateTypeParameter=T:38:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: TypeRef=T:38:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: ParmDecl=:39:11 (Definition) [type=int[5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: ParmDecl=:39:11 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
|
||||
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: FunctionTemplate=tbar:42:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: TemplateTypeParameter=T:41:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: NonTypeTemplateParameter=size:41:27 (Definition) [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: TypeRef=T:41:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
|
||||
// CHECK: ParmDecl=:42:11 (Definition) [type=int[size]] [typekind=DependentSizedArray] [isPOD=0]
|
||||
// CHECK: ParmDecl=:42:11 (Definition) [type=int [size]] [typekind=DependentSizedArray] [isPOD=0]
|
||||
// CHECK: DeclRefExpr=size:41:27 [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: FunctionDecl=foo:44:6 (Definition) [type=void (int, int *)] [typekind=FunctionProto] [canonicaltype=void (int, int *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int] [int[]] [IncompleteArray]] [isPOD=0]
|
||||
// CHECK: FunctionDecl=foo:44:6 (Definition) [type=void (int, int *)] [typekind=FunctionProto] [canonicaltype=void (int, int *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int] [int []] [IncompleteArray]] [isPOD=0]
|
||||
// CHECK: ParmDecl=i:44:14 (Definition) [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: ParmDecl=incomplete_array:44:21 (Definition) [type=int[]] [typekind=IncompleteArray] [isPOD=1]
|
||||
// CHECK: ParmDecl=incomplete_array:44:21 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1]
|
||||
// CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0]
|
||||
// CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0]
|
||||
// CHECK: VarDecl=variable_array:44:47 (Definition) [type=int[i]] [typekind=VariableArray] [isPOD=1]
|
||||
// CHECK: VarDecl=variable_array:44:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1]
|
||||
// CHECK: DeclRefExpr=i:44:14 [type=int] [typekind=Int] [isPOD=1]
|
||||
// CHECK: StructDecl=Blob:46:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2]
|
||||
// CHECK: FieldDecl=i:47:7 (Definition) [type=int] [typekind=Int] [isPOD=1]
|
||||
|
|
|
@ -22,9 +22,9 @@ int b = sizeof(C);
|
|||
|
||||
// CHECK: 0 | struct C
|
||||
// CHECK-NEXT: 0 | struct B (base)
|
||||
// CHECK-NEXT: 0 | char[8] x
|
||||
// CHECK-NEXT: 0 | char [8] x
|
||||
// CHECK-NEXT: 8 | struct A (base)
|
||||
// CHECK-NEXT: 8 | double d
|
||||
// CHECK-NEXT: 16 | char[8] x
|
||||
// CHECK-NEXT: 16 | char [8] x
|
||||
// CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=4,
|
||||
// CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=4]
|
||||
|
|
|
@ -196,14 +196,14 @@ int a = sizeof(A);
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct test6::A::B
|
||||
// CHECK-NEXT: 0 | double[3] d
|
||||
// CHECK-NEXT: 0 | double [3] d
|
||||
// CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=8,
|
||||
// CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=8]
|
||||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct test6::A
|
||||
// CHECK-NEXT: 0 | struct test6::A::B b
|
||||
// CHECK-NEXT: 0 | double[3] d
|
||||
// CHECK-NEXT: 0 | double [3] d
|
||||
// CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=8,
|
||||
// CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=8]
|
||||
|
||||
|
@ -220,14 +220,14 @@ int a = sizeof(A);
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct test7::A::B
|
||||
// CHECK-NEXT: 0 | _Complex long double[3] d
|
||||
// CHECK-NEXT: 0 | _Complex long double [3] d
|
||||
// CHECK-NEXT: | [sizeof=48, dsize=48, align=4, preferredalign=8,
|
||||
// CHECK-NEXT: | nvsize=48, nvalign=4, preferrednvalign=8]
|
||||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct test7::A
|
||||
// CHECK-NEXT: 0 | struct test7::A::B b
|
||||
// CHECK-NEXT: 0 | _Complex long double[3] d
|
||||
// CHECK-NEXT: 0 | _Complex long double [3] d
|
||||
// CHECK-NEXT: | [sizeof=48, dsize=48, align=4, preferredalign=8,
|
||||
// CHECK-NEXT: | nvsize=48, nvalign=4, preferrednvalign=8]
|
||||
|
||||
|
@ -284,14 +284,14 @@ int b = sizeof(D);
|
|||
|
||||
// CHECK: 0 | struct test9::B
|
||||
// CHECK-NEXT: 0 | struct test9::A (base)
|
||||
// CHECK-NEXT: 0 | char[0] zea
|
||||
// CHECK-NEXT: 0 | char [0] zea
|
||||
// CHECK-NEXT: 0 | double d
|
||||
// CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=4,
|
||||
// CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=4]
|
||||
|
||||
// CHECK: 0 | struct test9::D
|
||||
// CHECK-NEXT: 0 | struct test9::A (base)
|
||||
// CHECK-NEXT: 0 | char[0] zea
|
||||
// CHECK-NEXT: 0 | char [0] zea
|
||||
// CHECK-NEXT: 0 | struct test9::C (base)
|
||||
// CHECK-NEXT: 0 | double d
|
||||
// CHECK-NEXT: 8 | char x
|
||||
|
|
|
@ -52,7 +52,7 @@ struct B1 {
|
|||
// CHECK-NEXT: 4 | struct A a
|
||||
// CHECK-NEXT: 4 | double d
|
||||
// CHECK-NEXT: 12 | char c
|
||||
// CHECK-NEXT: 13 | char[7] ext
|
||||
// CHECK-NEXT: 13 | char [7] ext
|
||||
// CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4,
|
||||
// CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4]
|
||||
|
||||
|
@ -85,7 +85,7 @@ struct C1 {
|
|||
// CHECK-NEXT: 0 | struct A a
|
||||
// CHECK-NEXT: 0 | double d
|
||||
// CHECK-NEXT: 8 | char c
|
||||
// CHECK-NEXT: 9 | char[7] ext
|
||||
// CHECK-NEXT: 9 | char [7] ext
|
||||
// CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=8,
|
||||
// CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=8]
|
||||
|
||||
|
@ -118,7 +118,7 @@ struct D1 {
|
|||
// CHECK-NEXT: 4 | struct A a
|
||||
// CHECK-NEXT: 4 | double d
|
||||
// CHECK-NEXT: 12 | char c
|
||||
// CHECK-NEXT: 13 | char[7] ext
|
||||
// CHECK-NEXT: 13 | char [7] ext
|
||||
// CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4,
|
||||
// CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4]
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ union U {
|
|||
int x = sizeof(U);
|
||||
|
||||
// CHECK: 0 | union test4::U
|
||||
// CHECK-NEXT: 0 | test4::Dbl[] DblArr
|
||||
// CHECK-NEXT: 0 | test4::Dbl [] DblArr
|
||||
// CHECK-NEXT: 0 | char x
|
||||
// CHECK-NEXT: | [sizeof=2, dsize=2, align=2, preferredalign=2,
|
||||
// CHECK-NEXT: | nvsize=2, nvalign=2, preferrednvalign=2]
|
||||
|
|
|
@ -36,17 +36,17 @@ CHECK_SIZE(C, 16);
|
|||
// CHECK-NEXT: | [sizeof=16, align=16]
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct A
|
||||
// CHECK-NEXT: 0 | struct AlignedStruct[1] a
|
||||
// CHECK-NEXT: 0 | struct AlignedStruct [1] a
|
||||
// CHECK-NEXT: | [sizeof=16, align=16]
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct B
|
||||
// CHECK-NEXT: 0 | char b
|
||||
// CHECK-NEXT: 16 | AlignedInt[1] a
|
||||
// CHECK-NEXT: 16 | AlignedInt [1] a
|
||||
// CHECK-NEXT: | [sizeof=32, align=16]
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct C
|
||||
// CHECK-NEXT: 0 | char b
|
||||
// CHECK-NEXT: 16 | AlignedInt[] a
|
||||
// CHECK-NEXT: 16 | AlignedInt [] a
|
||||
// CHECK-NEXT: | [sizeof=16, align=16]
|
||||
|
||||
#pragma pack(pop)
|
||||
|
|
|
@ -716,11 +716,11 @@ struct ArrayFieldOfRecords {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct ArrayFieldOfRecords{{$}}
|
||||
// CHECK-NEXT: 0 | struct A4[2] InlineElts
|
||||
// CHECK-NEXT: 0 | struct A4 [2] InlineElts
|
||||
// CHECK-NEXT: | [sizeof=8, align=4
|
||||
// CHECK-NEXT: | nvsize=8, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct ArrayFieldOfRecords{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct A4[2] InlineElts
|
||||
// CHECK-X64-NEXT: 0 | struct A4 [2] InlineElts
|
||||
// CHECK-X64-NEXT: | [sizeof=8, align=4
|
||||
// CHECK-X64-NEXT: | nvsize=8, nvalign=4]
|
||||
|
||||
|
@ -729,11 +729,11 @@ struct ArrayOfArrayFieldOfRecords {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}}
|
||||
// CHECK-NEXT: 0 | struct A4[2][2] InlineElts
|
||||
// CHECK-NEXT: 0 | struct A4 [2][2] InlineElts
|
||||
// CHECK-NEXT: | [sizeof=16, align=4
|
||||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct A4[2][2] InlineElts
|
||||
// CHECK-X64-NEXT: 0 | struct A4 [2][2] InlineElts
|
||||
// CHECK-X64-NEXT: | [sizeof=16, align=4
|
||||
// CHECK-X64-NEXT: | nvsize=16, nvalign=4]
|
||||
|
||||
|
@ -743,11 +743,11 @@ struct RecordArrayTypedef {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct RecordArrayTypedef{{$}}
|
||||
// CHECK-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts
|
||||
// CHECK-NEXT: 0 | RecordArrayTypedef::ArrayTy [2] InlineElts
|
||||
// CHECK-NEXT: | [sizeof=16, align=4
|
||||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct RecordArrayTypedef{{$}}
|
||||
// CHECK-X64-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts
|
||||
// CHECK-X64-NEXT: 0 | RecordArrayTypedef::ArrayTy [2] InlineElts
|
||||
// CHECK-X64-NEXT: | [sizeof=16, align=4
|
||||
// CHECK-X64-NEXT: | nvsize=16, nvalign=4]
|
||||
|
||||
|
@ -756,11 +756,11 @@ struct EmptyIntMemb {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct EmptyIntMemb{{$}}
|
||||
// CHECK-NEXT: 0 | int[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | int [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=1, align=4
|
||||
// CHECK-NEXT: | nvsize=0, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct EmptyIntMemb{{$}}
|
||||
// CHECK-X64-NEXT: 0 | int[0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: 0 | int [0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: | [sizeof=4, align=4
|
||||
// CHECK-X64-NEXT: | nvsize=0, nvalign=4]
|
||||
|
||||
|
@ -769,11 +769,11 @@ struct EmptyLongLongMemb {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct EmptyLongLongMemb{{$}}
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=1, align=8
|
||||
// CHECK-NEXT: | nvsize=0, nvalign=8]
|
||||
// CHECK-X64-LABEL: 0 | struct EmptyLongLongMemb{{$}}
|
||||
// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: | [sizeof=8, align=8
|
||||
// CHECK-X64-NEXT: | nvsize=0, nvalign=8]
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ struct EmptyIntMemb {
|
|||
};
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyIntMemb
|
||||
// CHECK-NEXT: 0 | int[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | int [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=4, align=4
|
||||
|
||||
struct EmptyLongLongMemb {
|
||||
|
@ -16,7 +16,7 @@ struct EmptyLongLongMemb {
|
|||
};
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyLongLongMemb
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=4, align=8
|
||||
|
||||
struct EmptyAligned2LongLongMemb {
|
||||
|
@ -25,7 +25,7 @@ struct EmptyAligned2LongLongMemb {
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyAligned2LongLongMemb
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=4, align=8
|
||||
|
||||
struct EmptyAligned8LongLongMemb {
|
||||
|
@ -34,7 +34,7 @@ struct EmptyAligned8LongLongMemb {
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyAligned8LongLongMemb
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=8, align=8
|
||||
|
||||
#pragma pack(1)
|
||||
|
@ -45,7 +45,7 @@ struct __declspec(align(4)) EmptyPackedAligned4LongLongMemb {
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyPackedAligned4LongLongMemb
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=4, align=4
|
||||
|
||||
#pragma pack(1)
|
||||
|
@ -56,7 +56,7 @@ struct EmptyPackedAligned8LongLongMemb {
|
|||
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct EmptyPackedAligned8LongLongMemb
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=8, align=8
|
||||
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ struct I {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct I{{$}}
|
||||
// CHECK-NEXT: 0 | int[0] i0
|
||||
// CHECK-NEXT: 0 | int [0] i0
|
||||
// CHECK-NEXT: | [sizeof={{1|4}}, align=4,
|
||||
// CHECK-NEXT: | nvsize=0, nvalign=4]
|
||||
|
||||
|
@ -158,7 +158,7 @@ struct J : I {
|
|||
|
||||
// CHECK-LABEL: 0 | struct J{{$}}
|
||||
// CHECK-NEXT: 0 | struct I (base)
|
||||
// CHECK-NEXT: 0 | int[0] i0
|
||||
// CHECK-NEXT: 0 | int [0] i0
|
||||
// CHECK-NEXT: 0 | int j
|
||||
// CHECK-NEXT: | [sizeof=4, align=4,
|
||||
// CHECK-NEXT: | nvsize=4, nvalign=4]
|
||||
|
|
|
@ -572,7 +572,7 @@ struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B
|
|||
// CHECK-NEXT: 40 | struct C0 (virtual base)
|
||||
// CHECK-NEXT: 40 | int a
|
||||
// CHECK-NEXT: 44 | struct D2 (virtual base)
|
||||
// CHECK-NEXT: 44 | int[8] a
|
||||
// CHECK-NEXT: 44 | int [8] a
|
||||
// CHECK-NEXT: 80 | struct B2 (virtual base) (empty)
|
||||
// CHECK-NEXT: 88 | struct B3 (virtual base) (empty)
|
||||
// CHECK-NEXT: 104 | struct B4 (virtual base) (empty)
|
||||
|
@ -586,7 +586,7 @@ struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B
|
|||
// CHECK-X64-NEXT: 40 | struct C0 (virtual base)
|
||||
// CHECK-X64-NEXT: 40 | int a
|
||||
// CHECK-X64-NEXT: 44 | struct D2 (virtual base)
|
||||
// CHECK-X64-NEXT: 44 | int[8] a
|
||||
// CHECK-X64-NEXT: 44 | int [8] a
|
||||
// CHECK-X64-NEXT: 80 | struct B2 (virtual base) (empty)
|
||||
// CHECK-X64-NEXT: 88 | struct B3 (virtual base) (empty)
|
||||
// CHECK-X64-NEXT: 104 | struct B4 (virtual base) (empty)
|
||||
|
|
|
@ -33,7 +33,7 @@ struct AA : B8, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AA{{$}}
|
||||
// CHECK-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-NEXT: 0 | char[5] c
|
||||
// CHECK-NEXT: 0 | char [5] c
|
||||
// CHECK-NEXT: 13 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AA vbtable pointer)
|
||||
// CHECK-NEXT: 16 | int a
|
||||
|
@ -42,7 +42,7 @@ struct AA : B8, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=20, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AA{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[5] c
|
||||
// CHECK-X64-NEXT: 0 | char [5] c
|
||||
// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AA vbtable pointer)
|
||||
// CHECK-X64-NEXT: 20 | int a
|
||||
|
@ -57,7 +57,7 @@ struct AB : B8, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AB{{$}}
|
||||
// CHECK-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-NEXT: 0 | char[5] c
|
||||
// CHECK-NEXT: 0 | char [5] c
|
||||
// CHECK-NEXT: 13 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AB vbtable pointer)
|
||||
// CHECK-NEXT: 14 | short a
|
||||
|
@ -66,7 +66,7 @@ struct AB : B8, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AB{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[5] c
|
||||
// CHECK-X64-NEXT: 0 | char [5] c
|
||||
// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AB vbtable pointer)
|
||||
// CHECK-X64-NEXT: 18 | short a
|
||||
|
@ -81,7 +81,7 @@ struct AC : B8, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AC{{$}}
|
||||
// CHECK-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-NEXT: 0 | char[5] c
|
||||
// CHECK-NEXT: 0 | char [5] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AC vbtable pointer)
|
||||
// CHECK-NEXT: 12 | char a
|
||||
|
@ -90,7 +90,7 @@ struct AC : B8, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AC{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[5] c
|
||||
// CHECK-X64-NEXT: 0 | char [5] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AC vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | char a
|
||||
|
@ -104,7 +104,7 @@ struct AD : B8, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AD{{$}}
|
||||
// CHECK-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-NEXT: 0 | char[5] c
|
||||
// CHECK-NEXT: 0 | char [5] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AD vbtable pointer)
|
||||
// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
|
||||
|
@ -112,7 +112,7 @@ struct AD : B8, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=12, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AD{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[5] c
|
||||
// CHECK-X64-NEXT: 0 | char [5] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AD vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
|
||||
|
@ -126,7 +126,7 @@ struct AA1 : B9, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AA1{{$}}
|
||||
// CHECK-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-NEXT: 0 | char[6] c
|
||||
// CHECK-NEXT: 0 | char [6] c
|
||||
// CHECK-NEXT: 14 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AA1 vbtable pointer)
|
||||
// CHECK-NEXT: 16 | int a
|
||||
|
@ -135,7 +135,7 @@ struct AA1 : B9, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=20, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AA1{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[6] c
|
||||
// CHECK-X64-NEXT: 0 | char [6] c
|
||||
// CHECK-X64-NEXT: 18 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AA1 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 20 | int a
|
||||
|
@ -150,7 +150,7 @@ struct AB1 : B9, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AB1{{$}}
|
||||
// CHECK-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-NEXT: 0 | char[6] c
|
||||
// CHECK-NEXT: 0 | char [6] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AB1 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | short a
|
||||
|
@ -159,7 +159,7 @@ struct AB1 : B9, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AB1{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[6] c
|
||||
// CHECK-X64-NEXT: 0 | char [6] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AB1 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | short a
|
||||
|
@ -174,7 +174,7 @@ struct AC1 : B9, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AC1{{$}}
|
||||
// CHECK-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-NEXT: 0 | char[6] c
|
||||
// CHECK-NEXT: 0 | char [6] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AC1 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | char a
|
||||
|
@ -183,7 +183,7 @@ struct AC1 : B9, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AC1{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[6] c
|
||||
// CHECK-X64-NEXT: 0 | char [6] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AC1 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | char a
|
||||
|
@ -197,7 +197,7 @@ struct AD1 : B9, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AD1{{$}}
|
||||
// CHECK-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-NEXT: 0 | char[6] c
|
||||
// CHECK-NEXT: 0 | char [6] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AD1 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
|
||||
|
@ -205,7 +205,7 @@ struct AD1 : B9, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=12, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AD1{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B9 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[6] c
|
||||
// CHECK-X64-NEXT: 0 | char [6] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AD1 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
|
||||
|
@ -219,7 +219,7 @@ struct AA2 : B10, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AA2{{$}}
|
||||
// CHECK-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-NEXT: 0 | char[7] c
|
||||
// CHECK-NEXT: 0 | char [7] c
|
||||
// CHECK-NEXT: 15 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AA2 vbtable pointer)
|
||||
// CHECK-NEXT: 16 | int a
|
||||
|
@ -228,7 +228,7 @@ struct AA2 : B10, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=20, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AA2{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[7] c
|
||||
// CHECK-X64-NEXT: 0 | char [7] c
|
||||
// CHECK-X64-NEXT: 19 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AA2 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 20 | int a
|
||||
|
@ -243,7 +243,7 @@ struct AB2 : B10, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AB2{{$}}
|
||||
// CHECK-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-NEXT: 0 | char[7] c
|
||||
// CHECK-NEXT: 0 | char [7] c
|
||||
// CHECK-NEXT: 13 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AB2 vbtable pointer)
|
||||
// CHECK-NEXT: 14 | short a
|
||||
|
@ -252,7 +252,7 @@ struct AB2 : B10, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AB2{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[7] c
|
||||
// CHECK-X64-NEXT: 0 | char [7] c
|
||||
// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AB2 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 18 | short a
|
||||
|
@ -267,7 +267,7 @@ struct AC2 : B10, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AC2{{$}}
|
||||
// CHECK-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-NEXT: 0 | char[7] c
|
||||
// CHECK-NEXT: 0 | char [7] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AC2 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | char a
|
||||
|
@ -276,7 +276,7 @@ struct AC2 : B10, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AC2{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[7] c
|
||||
// CHECK-X64-NEXT: 0 | char [7] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AC2 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | char a
|
||||
|
@ -290,7 +290,7 @@ struct AD2 : B10, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AD2{{$}}
|
||||
// CHECK-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-NEXT: 0 | char[7] c
|
||||
// CHECK-NEXT: 0 | char [7] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AD2 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
|
||||
|
@ -298,7 +298,7 @@ struct AD2 : B10, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=12, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AD2{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B10 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[7] c
|
||||
// CHECK-X64-NEXT: 0 | char [7] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AD2 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
|
||||
|
@ -312,7 +312,7 @@ struct AA3 : B11, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AA3{{$}}
|
||||
// CHECK-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-NEXT: 0 | char[8] c
|
||||
// CHECK-NEXT: 0 | char [8] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AA3 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | int a
|
||||
|
@ -321,7 +321,7 @@ struct AA3 : B11, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AA3{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[8] c
|
||||
// CHECK-X64-NEXT: 0 | char [8] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AA3 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | int a
|
||||
|
@ -336,7 +336,7 @@ struct AB3 : B11, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AB3{{$}}
|
||||
// CHECK-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-NEXT: 0 | char[8] c
|
||||
// CHECK-NEXT: 0 | char [8] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AB3 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | short a
|
||||
|
@ -345,7 +345,7 @@ struct AB3 : B11, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AB3{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[8] c
|
||||
// CHECK-X64-NEXT: 0 | char [8] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AB3 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | short a
|
||||
|
@ -360,7 +360,7 @@ struct AC3 : B11, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AC3{{$}}
|
||||
// CHECK-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-NEXT: 0 | char[8] c
|
||||
// CHECK-NEXT: 0 | char [8] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AC3 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | char a
|
||||
|
@ -369,7 +369,7 @@ struct AC3 : B11, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=16, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AC3{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[8] c
|
||||
// CHECK-X64-NEXT: 0 | char [8] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AC3 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | char a
|
||||
|
@ -383,7 +383,7 @@ struct AD3 : B11, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct AD3{{$}}
|
||||
// CHECK-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-NEXT: 0 | char[8] c
|
||||
// CHECK-NEXT: 0 | char [8] c
|
||||
// CHECK-NEXT: 12 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (AD3 vbtable pointer)
|
||||
// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
|
||||
|
@ -391,7 +391,7 @@ struct AD3 : B11, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=12, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct AD3{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B11 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[8] c
|
||||
// CHECK-X64-NEXT: 0 | char [8] c
|
||||
// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (AD3 vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
|
||||
|
@ -507,7 +507,7 @@ struct F : B1, B6, B4, B8, B5, virtual B0 {
|
|||
// CHECK-NEXT: 2 | struct B6 (base) (empty)
|
||||
// CHECK-NEXT: 3 | struct B4 (base) (empty)
|
||||
// CHECK-NEXT: 3 | struct B8 (base)
|
||||
// CHECK-NEXT: 3 | char[5] c
|
||||
// CHECK-NEXT: 3 | char [5] c
|
||||
// CHECK-NEXT: 12 | struct B5 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (F vbtable pointer)
|
||||
// CHECK-NEXT: 12 | int a
|
||||
|
@ -519,7 +519,7 @@ struct F : B1, B6, B4, B8, B5, virtual B0 {
|
|||
// CHECK-X64-NEXT: 2 | struct B6 (base) (empty)
|
||||
// CHECK-X64-NEXT: 3 | struct B4 (base) (empty)
|
||||
// CHECK-X64-NEXT: 3 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 3 | char[5] c
|
||||
// CHECK-X64-NEXT: 3 | char [5] c
|
||||
// CHECK-X64-NEXT: 16 | struct B5 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (F vbtable pointer)
|
||||
// CHECK-X64-NEXT: 16 | int a
|
||||
|
@ -535,7 +535,7 @@ struct G : B8, B1, virtual B0 {
|
|||
|
||||
// CHECK-LABEL: 0 | struct G{{$}}
|
||||
// CHECK-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-NEXT: 0 | char[5] c
|
||||
// CHECK-NEXT: 0 | char [5] c
|
||||
// CHECK-NEXT: 21 | struct B1 (base) (empty)
|
||||
// CHECK-NEXT: 8 | (G vbtable pointer)
|
||||
// CHECK-NEXT: 24 | int a
|
||||
|
@ -545,7 +545,7 @@ struct G : B8, B1, virtual B0 {
|
|||
// CHECK-NEXT: | nvsize=48, nvalign=16]
|
||||
// CHECK-X64-LABEL: 0 | struct G{{$}}
|
||||
// CHECK-X64-NEXT: 0 | struct B8 (base)
|
||||
// CHECK-X64-NEXT: 0 | char[5] c
|
||||
// CHECK-X64-NEXT: 0 | char [5] c
|
||||
// CHECK-X64-NEXT: 21 | struct B1 (base) (empty)
|
||||
// CHECK-X64-NEXT: 8 | (G vbtable pointer)
|
||||
// CHECK-X64-NEXT: 24 | int a
|
||||
|
|
|
@ -11,7 +11,7 @@ struct T3 { T2 a[1]; char c; };
|
|||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK: *** Dumping AST Record Layout
|
||||
// CHECK-NEXT: 0 | struct T3
|
||||
// CHECK-NEXT: 0 | struct T2[1] a
|
||||
// CHECK-NEXT: 0 | struct T2 [1] a
|
||||
// CHECK-NEXT: 5 | char c
|
||||
// CHECK-NEXT: | [sizeof=8, align=4
|
||||
// CHECK-NEXT: | nvsize=8, nvalign=4]
|
||||
|
@ -19,7 +19,7 @@ struct T3 { T2 a[1]; char c; };
|
|||
// CHECK-X64: *** Dumping AST Record Layout
|
||||
// CHECK-X64: *** Dumping AST Record Layout
|
||||
// CHECK-X64-NEXT: 0 | struct T3
|
||||
// CHECK-X64-NEXT: 0 | struct T2[1] a
|
||||
// CHECK-X64-NEXT: 0 | struct T2 [1] a
|
||||
// CHECK-X64-NEXT: 16 | char c
|
||||
// CHECK-X64-NEXT: | [sizeof=24, align=8
|
||||
// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
|
||||
|
|
|
@ -650,11 +650,11 @@ struct __declspec(align(4)) EmptyAlignedLongLongMemb {
|
|||
};
|
||||
|
||||
// CHECK-LABEL: 0 | struct EmptyAlignedLongLongMemb{{$}}
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=8, align=8
|
||||
// CHECK-NEXT: | nvsize=0, nvalign=8]
|
||||
// CHECK-X64-LABEL: 0 | struct EmptyAlignedLongLongMemb{{$}}
|
||||
// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: | [sizeof=8, align=8
|
||||
// CHECK-X64-NEXT: | nvsize=0, nvalign=8]
|
||||
|
||||
|
@ -665,11 +665,11 @@ struct __declspec(align(4)) EmptyPackedAlignedLongLongMemb {
|
|||
#pragma pack()
|
||||
|
||||
// CHECK-LABEL: 0 | struct EmptyPackedAlignedLongLongMemb{{$}}
|
||||
// CHECK-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-NEXT: | [sizeof=4, align=4
|
||||
// CHECK-NEXT: | nvsize=0, nvalign=4]
|
||||
// CHECK-X64-LABEL: 0 | struct EmptyPackedAlignedLongLongMemb{{$}}
|
||||
// CHECK-X64-NEXT: 0 | long long[0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: 0 | long long [0] FlexArrayMemb
|
||||
// CHECK-X64-NEXT: | [sizeof=4, align=4
|
||||
// CHECK-X64-NEXT: | nvsize=0, nvalign=4]
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace POD {
|
|||
// CHECK: 0 | struct POD::B
|
||||
// CHECK-NEXT: 0 | struct POD::A a
|
||||
// CHECK-NEXT: 0 | int n
|
||||
// CHECK-NEXT: 4 | char[3] c
|
||||
// CHECK-NEXT: 4 | char [3] c
|
||||
// CHECK-NEXT: 8 | char d
|
||||
// CHECK-NEXT: | [sizeof=12, dsize=12, align=4,
|
||||
// CHECK-NEXT: | nvsize=12, nvalign=4]
|
||||
|
@ -169,7 +169,7 @@ namespace NonPOD {
|
|||
// CHECK: 0 | struct NonPOD::B
|
||||
// CHECK-NEXT: 0 | struct NonPOD::A a
|
||||
// CHECK-NEXT: 0 | int n
|
||||
// CHECK-NEXT: 4 | char[3] c
|
||||
// CHECK-NEXT: 4 | char [3] c
|
||||
// CHECK-NEXT: 7 | char d
|
||||
// CHECK-NEXT: | [sizeof=8, dsize=8, align=4,
|
||||
// CHECK-NEXT: | nvsize=8, nvalign=4]
|
||||
|
|
|
@ -20,7 +20,7 @@ static_assert(!__is_standard_layout(B));
|
|||
// CHECK-NEXT: 0 | struct A (base) (empty)
|
||||
// CHECK-NEXT: 0:- | int
|
||||
// CHECK-NEXT: 0 | int n
|
||||
// CHECK-NEXT: 4 | char[3] c
|
||||
// CHECK-NEXT: 4 | char [3] c
|
||||
// CHECK-NEXT: 8 | char d
|
||||
// CHECK-NEXT: | [sizeof=12, dsize=9, align=4,
|
||||
// CHECK-NEXT: | nvsize=9, nvalign=4]
|
||||
|
@ -41,7 +41,7 @@ static_assert(!__is_standard_layout(F));
|
|||
// CHECK-NEXT: 1 | struct E (base) (empty)
|
||||
// CHECK-NEXT: 1 | struct D (base) (empty)
|
||||
// CHECK-NEXT: 0 | int n
|
||||
// CHECK-NEXT: 4 | char[3] c
|
||||
// CHECK-NEXT: 4 | char [3] c
|
||||
// CHECK-NEXT: 8 | char d
|
||||
// CHECK-NEXT: | [sizeof=12, dsize=9, align=4,
|
||||
// CHECK-NEXT: | nvsize=9, nvalign=4]
|
||||
|
|
|
@ -14,7 +14,7 @@ void PR16799() {
|
|||
const char str[] = "string";
|
||||
a(str);
|
||||
// CHECK: :15:3: error: invalid operands to binary expression
|
||||
// CHECK: ('const char[7]' and 'int')
|
||||
// CHECK: ('const char [7]' and 'int')
|
||||
// CHECK: a(str);
|
||||
// CHECK: ^~~~~~
|
||||
// CHECK: :3:11: note: expanded from macro 'a'
|
||||
|
|
|
@ -68,12 +68,12 @@ void Function() {
|
|||
Function1(Type1<-42>()); // expected-error{{no matching function for call to 'Function1'}}
|
||||
Function2(Type2<42>()); // expected-error{{no matching function for call to 'Function2'}}
|
||||
|
||||
struct Type3<boolTy::b, "3"> t3; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type3Helper<(boolTy)false>::Ty' (aka 'boolTy')}}
|
||||
struct Type3<boolTy::b, "3"> t3; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type3Helper<(boolTy)false>::Ty' (aka 'boolTy')}}
|
||||
|
||||
struct Type4<charTy::c, "4"> t4; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type4Helper<(charTy)'\x00'>::Ty' (aka 'charTy')}}
|
||||
struct Type5<scharTy::c, "5"> t5; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type5Helper<(scharTy)'\x00'>::Ty' (aka 'scharTy')}}
|
||||
struct Type6<ucharTy::c, "6"> t6; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type6Helper<(ucharTy)'\x00'>::Ty' (aka 'ucharTy')}}
|
||||
struct Type7<wcharTy::c, "7"> t7; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type7Helper<(wcharTy)L'\x00'>::Ty' (aka 'wcharTy')}}
|
||||
struct Type8<char16Ty::c, "8"> t8; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type8Helper<(char16Ty)u'\x00'>::Ty' (aka 'char16Ty')}}
|
||||
struct Type9<char32Ty::c, "9"> t9; // expected-error{{value of type 'const char[2]' is not implicitly convertible to 'typename Type9Helper<(char32Ty)u'\x00'>::Ty' (aka 'char32Ty')}}
|
||||
struct Type4<charTy::c, "4"> t4; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type4Helper<(charTy)'\x00'>::Ty' (aka 'charTy')}}
|
||||
struct Type5<scharTy::c, "5"> t5; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type5Helper<(scharTy)'\x00'>::Ty' (aka 'scharTy')}}
|
||||
struct Type6<ucharTy::c, "6"> t6; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type6Helper<(ucharTy)'\x00'>::Ty' (aka 'ucharTy')}}
|
||||
struct Type7<wcharTy::c, "7"> t7; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type7Helper<(wcharTy)L'\x00'>::Ty' (aka 'wcharTy')}}
|
||||
struct Type8<char16Ty::c, "8"> t8; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type8Helper<(char16Ty)u'\x00'>::Ty' (aka 'char16Ty')}}
|
||||
struct Type9<char32Ty::c, "9"> t9; // expected-error{{value of type 'const char [2]' is not implicitly convertible to 'typename Type9Helper<(char32Ty)u'\x00'>::Ty' (aka 'char32Ty')}}
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ namespace Std {
|
|||
|
||||
// CHECK-DUMP: ClassTemplateDecl {{.*}} <{{.*[/\\]}}cxx-templates-common.h:1:1, {{.*}}> col:{{.*}} in cxx_templates_common SomeTemplate
|
||||
// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev {{.*}} SomeTemplate
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char[2]'
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]'
|
||||
// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} SomeTemplate definition
|
||||
// CHECK-DUMP-NEXT: DefinitionData
|
||||
// CHECK-DUMP-NEXT: DefaultConstructor
|
||||
|
@ -260,9 +260,9 @@ namespace Std {
|
|||
// CHECK-DUMP-NEXT: CopyAssignment
|
||||
// CHECK-DUMP-NEXT: MoveAssignment
|
||||
// CHECK-DUMP-NEXT: Destructor
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char[2]'
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]'
|
||||
// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev {{.*}} SomeTemplate
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char[1]'
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]'
|
||||
// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} SomeTemplate definition
|
||||
// CHECK-DUMP-NEXT: DefinitionData
|
||||
// CHECK-DUMP-NEXT: DefaultConstructor
|
||||
|
@ -271,4 +271,4 @@ namespace Std {
|
|||
// CHECK-DUMP-NEXT: CopyAssignment
|
||||
// CHECK-DUMP-NEXT: MoveAssignment
|
||||
// CHECK-DUMP-NEXT: Destructor
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char[1]'
|
||||
// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]'
|
||||
|
|
|
@ -625,8 +625,8 @@ struct S14 {
|
|||
};
|
||||
#else
|
||||
S14 s14;
|
||||
// expected-error@second.h:* {{'Method::S14' has different definitions in different modules; first difference is definition in module 'SecondModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int[3]'}}
|
||||
// expected-note@first.h:* {{but in 'FirstModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int[2]'}}
|
||||
// expected-error@second.h:* {{'Method::S14' has different definitions in different modules; first difference is definition in module 'SecondModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int [3]'}}
|
||||
// expected-note@first.h:* {{but in 'FirstModule' found method 'A' with 1st parameter of type 'int *' decayed from 'int [2]'}}
|
||||
#endif
|
||||
|
||||
#if defined(FIRST)
|
||||
|
@ -4533,8 +4533,8 @@ int F9(int[1]) { return 0; }
|
|||
int F9(int[2]) { return 0; }
|
||||
#else
|
||||
int I9 = F9(nullptr);
|
||||
// expected-error@second.h:* {{'FunctionDecl::F9' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'int *' decayed from 'int[2]'}}
|
||||
// expected-note@first.h:* {{but in 'FirstModule' found 1st parameter with type 'int *' decayed from 'int[1]'}}
|
||||
// expected-error@second.h:* {{'FunctionDecl::F9' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'int *' decayed from 'int [2]'}}
|
||||
// expected-note@first.h:* {{but in 'FirstModule' found 1st parameter with type 'int *' decayed from 'int [1]'}}
|
||||
#endif
|
||||
|
||||
#if defined(FIRST)
|
||||
|
|
|
@ -103,11 +103,11 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -256,12 +256,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -243,12 +243,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -374,12 +374,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -131,14 +131,14 @@ T tmain(T argc, S **argv) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
@ -305,14 +305,14 @@ int main(int argc, char **argv) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for simd shared(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute parallel for simd shared(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
|
|
@ -248,12 +248,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd firstprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd firstprivate(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd firstprivate(ca) // expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -244,12 +244,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd lastprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd lastprivate(ba) // expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -379,12 +379,12 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -16,7 +16,7 @@ void test(int *p) {
|
|||
;
|
||||
#pragma omp parallel reduction(inscan, + : a) // expected-error {{'inscan' modifier can be used only in 'omp for', 'omp simd', 'omp for simd', 'omp parallel for', or 'omp parallel for simd' directive}}
|
||||
;
|
||||
#pragma omp parallel reduction(+ : incomplete, ([10])p) // expected-error {{a reduction list item with incomplete type 'int[]'}} expected-error {{expected variable name, array element or array section}}
|
||||
#pragma omp parallel reduction(+ : incomplete, ([10])p) // expected-error {{a reduction list item with incomplete type 'int []'}} expected-error {{expected variable name, array element or array section}}
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
#pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
||||
#pragma omp target teams distribute firstprivate(da, z)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
int *A1 = (objc_string)0; // expected-warning {{aka 'NSString *'}}
|
||||
|
||||
char A2 = (objc_encode){}; // expected-error {{not a compile-time constant}} \
|
||||
expected-warning {{char[2]}}
|
||||
expected-warning {{char [2]}}
|
||||
|
||||
int *A3 = (objc_protocol)0; // expected-warning {{aka 'Protocol *'}}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef int int_fn();
|
|||
typedef _Atomic int_fn atomic_int_fn; // expected-error {{_Atomic cannot be applied to function type 'int_fn' (aka 'int ()')}} \
|
||||
// ext-warning {{'_Atomic' is a C11 extension}}
|
||||
typedef _Atomic int atomic_int_array[3]; // ext-warning {{'_Atomic' is a C11 extension}}
|
||||
typedef _Atomic atomic_int_array atomic_int_atomic_array; // expected-error {{_Atomic cannot be applied to array type 'atomic_int_array' (aka '_Atomic(int)[3]')}} \
|
||||
typedef _Atomic atomic_int_array atomic_int_atomic_array; // expected-error {{_Atomic cannot be applied to array type 'atomic_int_array' (aka '_Atomic(int) [3]')}} \
|
||||
// ext-warning {{'_Atomic' is a C11 extension}}
|
||||
|
||||
_Atomic struct S { int n; }; // expected-warning {{'_Atomic' ignored on this declaration}} \
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef int TA[I]; // expected-error {{variable length array declaration not all
|
|||
void strFunc(char *); // expected-note{{passing argument to parameter here}}
|
||||
const char staticAry[] = "test";
|
||||
void checkStaticAry() {
|
||||
strFunc(staticAry); // expected-warning{{passing 'const char[5]' to parameter of type 'char *' discards qualifiers}}
|
||||
strFunc(staticAry); // expected-warning{{passing 'const char [5]' to parameter of type 'char *' discards qualifiers}}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ int ary2[] = { x, y, z }; // expected-error{{initializer element is not a compil
|
|||
|
||||
extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}}
|
||||
|
||||
static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[4]'}}
|
||||
static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}}
|
||||
|
||||
void func() {
|
||||
int x = 1;
|
||||
|
@ -51,7 +51,7 @@ void func() {
|
|||
extern int blockScopeExtern[3] = { 1, 3, 5 }; // expected-error{{'extern' variable cannot have an initializer}}
|
||||
|
||||
static long x2[3] = { 1.0,
|
||||
"abc", // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[4]'}}
|
||||
"abc", // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}}
|
||||
5.8 }; // expected-warning {{implicit conversion from 'double' to 'long' changes value from 5.8 to 5}}
|
||||
}
|
||||
|
||||
|
@ -114,12 +114,12 @@ int legal2() {
|
|||
}
|
||||
|
||||
void illegal() {
|
||||
short q2[4][][2] = { // expected-error{{array has incomplete element type 'short[][2]'}}
|
||||
short q2[4][][2] = { // expected-error{{array has incomplete element type 'short [][2]'}}
|
||||
{ 1, 0, 0, 0, 0, 0 },
|
||||
{ 2, 3, 0, 0, 0, 0 },
|
||||
{ 4, 5, 6 }
|
||||
};
|
||||
short q3[4][3][] = { // expected-error{{array has incomplete element type 'short[]'}}
|
||||
short q3[4][3][] = { // expected-error{{array has incomplete element type 'short []'}}
|
||||
{
|
||||
{ 1 },
|
||||
},
|
||||
|
@ -131,7 +131,7 @@ void illegal() {
|
|||
{ 6 },
|
||||
},
|
||||
};
|
||||
int a[][] = { 1, 2 }; // expected-error{{array has incomplete element type 'int[]'}}
|
||||
int a[][] = { 1, 2 }; // expected-error{{array has incomplete element type 'int []'}}
|
||||
}
|
||||
|
||||
typedef int AryT[];
|
||||
|
@ -168,10 +168,10 @@ void charArrays() {
|
|||
char c[] = { "Hello" };
|
||||
int l[sizeof(c) == 6 ? 1 : -1];
|
||||
|
||||
int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[7]'}}
|
||||
int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [7]'}}
|
||||
char c2[] = { "Hello", "Good bye" }; //expected-warning{{excess elements in char array initializer}}
|
||||
|
||||
int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[6]'}}
|
||||
int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [6]'}}
|
||||
char c3[5] = { "Hello" };
|
||||
char c4[4] = { "Hello" }; //expected-warning{{initializer-string for char array is too long}}
|
||||
|
||||
|
@ -204,7 +204,7 @@ void autoStructTest() {
|
|||
struct s1 {char a; char b;} t1;
|
||||
struct s2 {struct s1 c;} t2 = { t1 };
|
||||
// The following is a less than great diagnostic (though it's on par with EDG).
|
||||
struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' with an expression of type 'char[4]'}}
|
||||
struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' with an expression of type 'char [4]'}}
|
||||
int t4[sizeof t3 == 6 ? 1 : -1];
|
||||
}
|
||||
struct foo { int z; } w;
|
||||
|
@ -282,13 +282,13 @@ char badchararray[1] = { badchararray[0], "asdf" }; // expected-warning {{excess
|
|||
// Test the GNU extension for initializing an array from an array
|
||||
// compound literal. PR9261.
|
||||
typedef int int5[5];
|
||||
int a1[5] = (int[]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}}
|
||||
int a2[5] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}}
|
||||
int a3[] = ((int[]){1, 2, 3, 4, 5}); // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int[5]' is a GNU extension}}
|
||||
int a4[] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int[5]' is a GNU extension}}
|
||||
int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int[]' from a compound literal of type 'int5' (aka 'int[5]') is a GNU extension}}
|
||||
int a1[5] = (int[]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}}
|
||||
int a2[5] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}}
|
||||
int a3[] = ((int[]){1, 2, 3, 4, 5}); // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int [5]' is a GNU extension}}
|
||||
int a4[] = (int[5]){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int [5]' is a GNU extension}}
|
||||
int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an array of type 'int []' from a compound literal of type 'int5' (aka 'int [5]') is a GNU extension}}
|
||||
|
||||
int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int[5]' with array of type 'int[3]'}}
|
||||
int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int [5]' with array of type 'int [3]'}}
|
||||
|
||||
int nonconst_value();
|
||||
int a7[5] = (int[5]){ 1,
|
||||
|
|
|
@ -13,8 +13,8 @@ typedef int arr[10];
|
|||
void test3() {
|
||||
const arr b; // expected-note {{variable 'b' declared const here}}
|
||||
const int b2[10]; // expected-note {{variable 'b2' declared const here}}
|
||||
b[4] = 1; // expected-error {{cannot assign to variable 'b' with const-qualified type 'const arr' (aka 'const int[10]')}}
|
||||
b2[4] = 1; // expected-error {{cannot assign to variable 'b2' with const-qualified type 'const int[10]'}}
|
||||
b[4] = 1; // expected-error {{cannot assign to variable 'b' with const-qualified type 'const arr' (aka 'const int [10]')}}
|
||||
b2[4] = 1; // expected-error {{cannot assign to variable 'b2' with const-qualified type 'const int [10]'}}
|
||||
}
|
||||
|
||||
typedef struct I {
|
||||
|
|
|
@ -6,7 +6,7 @@ void test(int x, double p) { // expected-note {{declared here}}
|
|||
dummy = __builtin_expect_with_probability(x > 0, 1, 1.1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, -1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, p); // expected-error {{probability argument to __builtin_expect_with_probability must be constant floating-point expression}} expected-note {{function parameter 'p' with unknown value}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char[3]'}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char [3]'}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_nan("")); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_inf()); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, -0.0);
|
||||
|
|
|
@ -44,7 +44,7 @@ void test(int x, double p) { // expected-note {{declared here}}
|
|||
dummy = __builtin_expect_with_probability(x > 0, 1, 1.1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, -1); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, p); // expected-error {{probability argument to __builtin_expect_with_probability must be constant floating-point expression}} expected-note {{function parameter 'p'}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char[3]'}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, "aa"); // expected-error {{cannot initialize a parameter of type 'double' with an lvalue of type 'const char [3]'}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_nan("")); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, __builtin_inf()); // expected-error {{probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]}}
|
||||
dummy = __builtin_expect_with_probability(x > 0, 1, -0.0);
|
||||
|
|
|
@ -10,9 +10,9 @@ void f(int N) {
|
|||
typedef int type2;
|
||||
|
||||
typedef int vla[N]; // expected-note{{previous definition is here}}
|
||||
typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int[N]'}}
|
||||
typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int [N]'}}
|
||||
|
||||
typedef int vla2[N];
|
||||
typedef vla2 vla3; // expected-note{{previous definition is here}}
|
||||
typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int[N]')}}
|
||||
typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int [N]')}}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ static int *p = (int []){2,4};
|
|||
static int x = (int){1};
|
||||
|
||||
static int *p2 = (int []){2,x}; // expected-error {{initializer element is not a compile-time constant}}
|
||||
static long *p3 = (long []){2,"x"}; // expected-warning {{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char[2]'}}
|
||||
static long *p3 = (long []){2,"x"}; // expected-warning {{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [2]'}}
|
||||
|
||||
typedef struct { } cache_t; // expected-warning{{empty struct is a GNU extension}}
|
||||
static cache_t clo_I1_cache = ((cache_t) { } ); // expected-warning{{use of GNU empty initializer extension}}
|
||||
|
|
|
@ -10,7 +10,7 @@ int main()
|
|||
|
||||
for(i = 0; i < 10; ++i)
|
||||
{
|
||||
p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int[]'}}
|
||||
p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,13 +75,13 @@ int func_7(struct A *x, struct A *y) {
|
|||
}
|
||||
|
||||
int func_8(struct emp_1 (*x)[10], struct emp_1 (*y)[10]) {
|
||||
return x - y; // expected-warning {{subtraction of pointers to type 'struct emp_1[10]' of zero size has undefined behavior}}
|
||||
return x - y; // expected-warning {{subtraction of pointers to type 'struct emp_1 [10]' of zero size has undefined behavior}}
|
||||
}
|
||||
|
||||
int func_9(struct emp_1 (*x)[], struct emp_1 (*y)[]) {
|
||||
return x - y; // expected-error {{arithmetic on a pointer to an incomplete type 'struct emp_1[]'}}
|
||||
return x - y; // expected-error {{arithmetic on a pointer to an incomplete type 'struct emp_1 []'}}
|
||||
}
|
||||
|
||||
int func_10(int (*x)[0], int (*y)[0]) {
|
||||
return x - y; // expected-warning {{subtraction of pointers to type 'int[0]' of zero size has undefined behavior}}
|
||||
return x - y; // expected-warning {{subtraction of pointers to type 'int [0]' of zero size has undefined behavior}}
|
||||
}
|
||||
|
|
|
@ -26,12 +26,12 @@ extern int test1_a[];
|
|||
// rdar://13535367
|
||||
void test2declarer() { extern int test2_array[100]; }
|
||||
extern int test2_array[];
|
||||
int test2v = sizeof(test2_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int test2v = sizeof(test2_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
|
||||
void test3declarer() {
|
||||
{ extern int test3_array[100]; }
|
||||
extern int test3_array[];
|
||||
int x = sizeof(test3_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(test3_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
void test4() {
|
||||
|
@ -40,7 +40,7 @@ void test4() {
|
|||
extern int test4_array[100];
|
||||
int x = sizeof(test4_array); // fine
|
||||
}
|
||||
int x = sizeof(test4_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
||||
int x = sizeof(test4_array); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int []'}}
|
||||
}
|
||||
|
||||
// Test that invalid local extern declarations of library
|
||||
|
|
|
@ -7,7 +7,7 @@ void foo(int n) {
|
|||
(void) _Generic(0, // ext-warning {{'_Generic' is a C11 extension}}
|
||||
struct A: 0, // expected-error {{type 'struct A' in generic association incomplete}}
|
||||
void(): 0, // expected-error {{type 'void ()' in generic association not an object type}}
|
||||
int[n]: 0); // expected-error {{type 'int[n]' in generic association is a variably modified type}}
|
||||
int[n]: 0); // expected-error {{type 'int [n]' in generic association is a variably modified type}}
|
||||
|
||||
(void) _Generic(0, // ext-warning {{'_Generic' is a C11 extension}}
|
||||
void (*)(): 0, // expected-note {{compatible type 'void (*)()' specified here}}
|
||||
|
|
|
@ -97,7 +97,7 @@ void statementexp()
|
|||
|
||||
|
||||
#if ALL || COMPOUNDLITERALINITIALIZER
|
||||
// expected-warning@+4 {{initialization of an array of type 'int[5]' from a compound literal of type 'int[5]' is a GNU extension}}
|
||||
// expected-warning@+4 {{initialization of an array of type 'int [5]' from a compound literal of type 'int [5]' is a GNU extension}}
|
||||
#endif
|
||||
|
||||
typedef int int5[5];
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue