Skip to content

Commit 6a6470e

Browse files
committed
address review comments
Signed-off-by: Soumi Manna <[email protected]>
1 parent 80d2f75 commit 6a6470e

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

clang/test/SemaSYCL/intel-fpga-local.cpp

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void check_ast()
146146
[[intel::force_pow2_depth(1)]] int var_force_p2d;
147147
[[intel::force_pow2_depth(1)]] const int const_force_p2d[64] = {0, 1};
148148

149-
//Checking of duplicate argument values
149+
// Checking of duplicate argument values.
150150
//CHECK: VarDecl{{.*}}var_max_replicates
151151
//CHECK: IntelFPGAMaxReplicatesAttr
152152
//CHECK-NEXT: ConstantExpr
@@ -159,7 +159,7 @@ void check_ast()
159159
[[intel::max_replicates(12)]]
160160
[[intel::max_replicates(12)]] int var_max_replicates; // OK
161161

162-
//Checking of duplicate argument values
162+
// Checking of duplicate argument values.
163163
//CHECK: VarDecl{{.*}}var_private_copies
164164
//CHECK: IntelFPGAMemoryAttr{{.*}}Implicit
165165
//CHECK: IntelFPGAPrivateCopiesAttr
@@ -345,12 +345,7 @@ void diagnostics()
345345
//expected-note@+1 {{did you mean to use 'intel::max_replicates' instead?}}
346346
[[intelfpga::max_replicates(2)]] unsigned int max_replicates[64];
347347

348-
//Checking of different argument values
349-
//CHECK: VarDecl{{.*}}max_repl
350-
//CHECK: IntelFPGAMaxReplicatesAttr
351-
//CHECK-NEXT: ConstantExpr
352-
//CHECK-NEXT: value:{{.*}}8
353-
//CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
348+
// Checking of different argument values.
354349
//expected-warning@+2{{attribute 'max_replicates' is already applied with different arguments}}
355350
[[intel::max_replicates(8)]] //expected-note{{previous attribute is here}}
356351
[[intel::max_replicates(16)]] unsigned int max_repl[64];
@@ -360,7 +355,7 @@ void diagnostics()
360355
//expected-error@+1{{'max_replicates' attribute requires a positive integral compile time constant expression}}
361356
[[intel::max_replicates(-1)]] unsigned int maxrepl_negative[64];
362357

363-
//Chcking of incompatible attributes
358+
// Checking of incompatible attributes.
364359
//expected-error@+3{{'max_replicates' and 'fpga_register' attributes are not compatible}}
365360
[[intel::fpga_register]]
366361
//expected-note@-1 {{conflicting attribute is here}}
@@ -424,19 +419,14 @@ void diagnostics()
424419
//expected-note@+1 {{did you mean to use 'intel::private_copies' instead?}}
425420
[[intelfpga::private_copies(8)]] unsigned int private_copies[64];
426421

427-
//Checking of incompatible attributes
422+
// Checking of incompatible attributes.
428423
//expected-error@+2{{attributes are not compatible}}
429424
[[intel::private_copies(16)]]
430425
[[intel::fpga_register]]
431426
//expected-note@-2 {{conflicting attribute is here}}
432427
unsigned int pc_reg[64];
433428

434-
//Checking of different argument values
435-
//CHECK: VarDecl{{.*}}pc_pc
436-
//CHECK: IntelFPGAPrivateCopiesAttr
437-
//CHECK-NEXT: ConstantExpr
438-
//CHECK-NEXT: value:{{.*}}8
439-
//CHECK-NEXT: IntegerLiteral{{.*}}8{{$}}
429+
// Checking of different argument values.
440430
//expected-warning@+2{{attribute 'private_copies' is already applied with different arguments}}
441431
[[intel::private_copies(8)]] //expected-note{{previous attribute is here}}
442432
[[intel::private_copies(16)]] unsigned int pc_pc[64];
@@ -841,12 +831,12 @@ void check_template_parameters() {
841831
[[intel::max_replicates(C)]]
842832
unsigned int max_replicates_duplicate;
843833

844-
// Test that checks template instantiations for different arg values
834+
// Test that checks template instantiations for different arg values.
845835
[[intel::max_replicates(4)]] // expected-note {{previous attribute is here}}
846836
// expected-warning@+1 {{attribute 'max_replicates' is already applied with different arguments}}
847837
[[intel::max_replicates(C)]] unsigned int max_repl_duplicate[64];
848838

849-
// Test that checks template instantiations for different arg values
839+
// Test that checks template instantiations for different arg values.
850840
[[intel::private_copies(4)]] // expected-note {{previous attribute is here}}
851841
// expected-warning@+1 {{attribute 'private_copies' is already applied with different arguments}}
852842
[[intel::private_copies(C)]] unsigned int var_private_copies;

clang/test/SemaSYCL/sycl-device-intel-fpga-local.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Test that checks global constant variable (which allows the redeclaration) since
44
// IntelFPGAConstVar is one of the subjects listed for [[intel::max_replicates()]] attribute.
55

6-
// Merging of different arg values
6+
// Merging of different arg values.
77
//CHECK: VarDecl{{.*}}var_max_replicates
88
//CHECK: IntelFPGAMaxReplicatesAttr
99
//CHECK-NEXT: ConstantExpr
@@ -14,7 +14,7 @@
1414
[[intel::max_replicates(14)]] const int var_max_replicates = 0;
1515
//expected-note@-2{{previous attribute is here}}
1616

17-
// Merging of incompatible attributes
17+
// Merging of incompatible attributes.
1818
// FIXME: Diagnostic order isn't correct, this isn't what we'd want here but
1919
// this is an upstream issue. Merge function is calling checkAttrMutualExclusion()
2020
// function that has backwards diagnostic behavior. This should be fixed into upstream.

0 commit comments

Comments
 (0)