You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OpenACC] Fix uses of getBaseOriginalType when we really want elt type. (llvm#162880)
Lately, I've been using 'getBaseOriginalType' in ArraySectionExpr
incorrectly: it gets the base-ist of element type, when in reality, I
want a single type of indirection. This patch corrects the handful of
uses that I had for it.
Copy file name to clipboardExpand all lines: clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -166,19 +166,17 @@ void uses(unsigned Parm) {
166
166
167
167
CompositeHasComposite CoCArr[5];
168
168
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
169
-
// expected-note@+3{{used as element type of array type 'CompositeHasComposite'}}
169
+
// expected-note@+3{{used as element type of array type 'CompositeHasComposite[5]'}}
170
170
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
171
171
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
172
172
#pragma acc parallel loop reduction(+:CoCArr)
173
173
for(int i = 0; i < 5; ++i);
174
-
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
175
-
// expected-note@+3{{used as element type of array type 'CompositeHasComposite[5]'}}
174
+
// expected-error@+3{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
176
175
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
177
176
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
178
177
#pragma acc parallel loop reduction(+:CoCArr[3])
179
178
for(int i = 0; i < 5; ++i);
180
-
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
181
-
// expected-note@+3{{used as element type of sub-array type 'CompositeHasComposite'}}
179
+
// expected-error@+3{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
182
180
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
183
181
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
Copy file name to clipboardExpand all lines: clang/test/SemaOpenACC/compute-construct-reduction-clause.c
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,7 @@ void uses(unsigned Parm) {
72
72
while (1);
73
73
74
74
structCompositeHasCompositeChCArray[5];
75
-
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
76
-
// expected-note@+3{{used as element type of sub-array type 'struct CompositeHasComposite'}}
75
+
// expected-error@+3{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
77
76
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
78
77
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
0 commit comments