diff options
author | NagyDonat <donat.nagy@ericsson.com> | 2024-03-26 10:33:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 10:33:12 +0100 |
commit | 4fa736ba41fce885047bd5a242230b216ea85c70 (patch) | |
tree | 7ff7c1d1eac306fc8736f1b430384f8291ed0c27 | |
parent | 3f8431ec66ffcfaf1bd864261f425b12ab1b59b8 (diff) | |
download | llvm-4fa736ba41fce885047bd5a242230b216ea85c70.zip llvm-4fa736ba41fce885047bd5a242230b216ea85c70.tar.gz llvm-4fa736ba41fce885047bd5a242230b216ea85c70.tar.bz2 |
[Clang] NFC Silence compiler warning spam (#86532)
This non-functional change eliminates the compiler warning
```
/repo/llvm-project/clang/include/clang/Basic/SyncScope.h: In member function ‘virtual bool clang::AtomicScopeGenericModel::isValid(unsigned int) const’:
/repo/llvm-project/clang/include/clang/Basic/SyncScope.h:255:14: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
return S >= static_cast<unsigned>(System) &&
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
which was appearing repeatedly, as this header is included into very
many source files (through various chains of 6-7 header files).
-rw-r--r-- | clang/include/clang/Basic/SyncScope.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/include/clang/Basic/SyncScope.h b/clang/include/clang/Basic/SyncScope.h index bc7ec7b..45beff4 100644 --- a/clang/include/clang/Basic/SyncScope.h +++ b/clang/include/clang/Basic/SyncScope.h @@ -252,8 +252,7 @@ public: } bool isValid(unsigned S) const override { - return S >= static_cast<unsigned>(System) && - S <= static_cast<unsigned>(Last); + return S <= static_cast<unsigned>(Last); } ArrayRef<unsigned> getRuntimeValues() const override { |