projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb45f3c
)
[RISCV] Use llvm::none_of to replace a loop. NFC
author
Craig Topper
<craig.topper@sifive.com>
Tue, 6 Sep 2022 23:03:45 +0000
(16:03 -0700)
committer
Craig Topper
<craig.topper@sifive.com>
Tue, 6 Sep 2022 23:24:23 +0000
(16:24 -0700)
clang/lib/Sema/SemaChecking.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Sema/SemaChecking.cpp
b/clang/lib/Sema/SemaChecking.cpp
index
5b2d28c
..
fcdc866
100644
(file)
--- a/
clang/lib/Sema/SemaChecking.cpp
+++ b/
clang/lib/Sema/SemaChecking.cpp
@@
-4338,15
+4338,9
@@
bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI,
for (StringRef F : ReqFeatures) {
SmallVector<StringRef> ReqOpFeatures;
F.split(ReqOpFeatures, '|');
- bool HasFeature = false;
- for (StringRef OF : ReqOpFeatures) {
- if (TI.hasFeature(OF)) {
- HasFeature = true;
- continue;
- }
- }
- if (!HasFeature) {
+ if (llvm::none_of(ReqOpFeatures,
+ [&TI](StringRef OF) { return TI.hasFeature(OF); })) {
std::string FeatureStrs;
for (StringRef OF : ReqOpFeatures) {
// If the feature is 64bit, alter the string so it will print better in