Skip to content

Commit 2801245

Browse files
committed
Disable clang-analyzer-optin.core.EnumCastOutOfRange check
in some places, because we use enums as bitfield flags.
1 parent 6437343 commit 2801245

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/osmium/osm/entity_bits.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ namespace osmium {
4545
*/
4646
namespace osm_entity_bits {
4747

48+
// NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange)
49+
4850
/**
4951
* Describes zero or more OSM entities.
5052
*
@@ -123,6 +125,8 @@ namespace osmium {
123125
return static_cast<osmium::osm_entity_bits::type>(1U << (ut - 1U));
124126
}
125127

128+
// NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange)
129+
126130
} // namespace osm_entity_bits
127131

128132
} // namespace osmium

include/osmium/osm/metadata_options.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ DEALINGS IN THE SOFTWARE.
4242

4343
namespace osmium {
4444

45+
// NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange)
46+
4547
/**
4648
* Describes which metadata fields are available in an OSMObject. This is
4749
* most often used to describe which metadata fields are available in the
@@ -219,6 +221,8 @@ namespace osmium {
219221

220222
}; // class metadata_options
221223

224+
// NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange)
225+
222226
template <typename TChar, typename TTraits>
223227
inline std::basic_ostream<TChar, TTraits>& operator<<(std::basic_ostream<TChar, TTraits>& out, const metadata_options& options) {
224228
return out << options.to_string();

0 commit comments

Comments
 (0)