Author: erichkeane Date: 2024-05-13T08:25:24-07:00 New Revision: 1f6f5bf9307033980121fc534815a7b59453e122
URL: https://github.com/llvm/llvm-project/commit/1f6f5bf9307033980121fc534815a7b59453e122 DIFF: https://github.com/llvm/llvm-project/commit/1f6f5bf9307033980121fc534815a7b59453e122.diff LOG: Fix warning from c4a9a374 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). Added: Modified: clang/include/clang/AST/OpenACCClause.h Removed: ################################################################################ diff --git a/clang/include/clang/AST/OpenACCClause.h b/clang/include/clang/AST/OpenACCClause.h index 3998a3430ff95..607a2b9d65367 100644 --- a/clang/include/clang/AST/OpenACCClause.h +++ b/clang/include/clang/AST/OpenACCClause.h @@ -101,13 +101,13 @@ class OpenACCDeviceTypeClause final return Arg.second.isInvalid(); }) && "Invalid SourceLocation for an argument"); - assert(Archs.size() == 1 || - !llvm::any_of(Archs, - [](const DeviceTypeArgument &Arg) { - return Arg.first == nullptr; - }) && - "Only a single asterisk version is permitted, and must be the " - "only one"); + assert( + (Archs.size() == 1 || !llvm::any_of(Archs, + [](const DeviceTypeArgument &Arg) { + return Arg.first == nullptr; + })) && + "Only a single asterisk version is permitted, and must be the " + "only one"); std::uninitialized_copy(Archs.begin(), Archs.end(), getTrailingObjects<DeviceTypeArgument>()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits