Skip to content

Commit 34585b6

Browse files
committed
Update comments as suggested by andy and morris
1 parent 554256a commit 34585b6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,12 @@ class OpenACCClauseCIREmitter final
9898
// Handle a clause affected by the 'device-type' to the point that they need
9999
// to have the attributes added in the correct/corresponding order, such as
100100
// 'num_workers' or 'vector_length' on a compute construct. For cases where we
101-
// don't have an argument that needs to be added to an additional one (such as
102-
// asyncOnly) we can use this with 'argument' as std::nullopt.
101+
// don't have an expression 'argument' that needs to be added to an operand
102+
// and only care about the 'device-type' list, we can use this with 'argument'
103+
// as 'std::nullopt'. If 'argument' is NOT 'std::nullopt' (that is, has a
104+
// value), argCollection must also be non-null. For cases where we don't have
105+
// an argument that needs to be added to an additional one (such as asyncOnly)
106+
// we can use this with 'argument' as std::nullopt.
103107
mlir::ArrayAttr handleDeviceTypeAffectedClause(
104108
mlir::ArrayAttr existingDeviceTypes,
105109
std::optional<mlir::Value> argument = std::nullopt,

clang/lib/Sema/SemaOpenACCClause.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class SemaOpenACCClauseVisitor {
334334
}
335335

336336
// For 'tile' and 'collapse', only allow 1 per 'device_type'.
337-
// Also applies to num_worker, num_gangs, and vector_length.
337+
// Also applies to num_worker, num_gangs, vector_length, and async.
338338
template <typename TheClauseTy>
339339
bool DisallowSinceLastDeviceType(SemaOpenACC::OpenACCParsedClause &Clause) {
340340
auto LastDeviceTypeItr =

0 commit comments

Comments
 (0)