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:
146dc25
)
[IR] PatternMatch.h - m_SplatOrUndefMask::match - specialise auto to const auto*
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sun, 29 Jan 2023 18:02:54 +0000
(18:02 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sun, 29 Jan 2023 18:03:53 +0000
(18:03 +0000)
Fixes clang-tidy warning
llvm/include/llvm/IR/PatternMatch.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/IR/PatternMatch.h
b/llvm/include/llvm/IR/PatternMatch.h
index
38a916c
..
8b542b7
100644
(file)
--- a/
llvm/include/llvm/IR/PatternMatch.h
+++ b/
llvm/include/llvm/IR/PatternMatch.h
@@
-1536,7
+1536,7
@@
struct m_SplatOrUndefMask {
int &SplatIndex;
m_SplatOrUndefMask(int &SplatIndex) : SplatIndex(SplatIndex) {}
bool match(ArrayRef<int> Mask) {
-
auto
First = find_if(Mask, [](int Elem) { return Elem != -1; });
+
const auto *
First = find_if(Mask, [](int Elem) { return Elem != -1; });
if (First == Mask.end())
return false;
SplatIndex = *First;