Skip to content

Commit 1f6f5bf

Browse files
committed
Fix warning from c4a9a37
I wasn't able to reproduce the test crash, but I believe this might be a different definition of 'assert' on some platforms, so I believe this patch should fix it (and fixes the suggested warning).
1 parent 257013e commit 1f6f5bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/include/clang/AST/OpenACCClause.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ class OpenACCDeviceTypeClause final
101101
return Arg.second.isInvalid();
102102
}) && "Invalid SourceLocation for an argument");
103103

104-
assert(Archs.size() == 1 ||
105-
!llvm::any_of(Archs,
106-
[](const DeviceTypeArgument &Arg) {
107-
return Arg.first == nullptr;
108-
}) &&
109-
"Only a single asterisk version is permitted, and must be the "
110-
"only one");
104+
assert(
105+
(Archs.size() == 1 || !llvm::any_of(Archs,
106+
[](const DeviceTypeArgument &Arg) {
107+
return Arg.first == nullptr;
108+
})) &&
109+
"Only a single asterisk version is permitted, and must be the "
110+
"only one");
111111

112112
std::uninitialized_copy(Archs.begin(), Archs.end(),
113113
getTrailingObjects<DeviceTypeArgument>());

0 commit comments

Comments
 (0)