Skip to content

Ignore clang warnings for deprecated enum+enum operations in mat.inl.hpp - #16684

Merged
alalek merged 2 commits into
opencv:3.4from
pwuertz:ignore_clang_mat_inl
Feb 28, 2020
Merged

alalek merged 2 commits into
opencv:3.4from
pwuertz:ignore_clang_mat_inl

Conversation

@pwuertz

@pwuertz pwuertz commented Feb 27, 2020 •

Copy link
Copy Markdown
Contributor

Recent versions of clang emit warnings for deprecated enum + other_enum expressions (Compiler Explorer Example).

mat.inl.hpp relies quite extensively on those expressions for joining flags, which shows when using OpenCV with the latest Emscripten release for example.

As a least-intrusive option, I added a local clang diagnostic ignored pragma for this warning type.

buildworker:Custom=linux-1
build_image:Custom=ubuntu-clang:18.04

@pwuertz

pwuertz commented Feb 28, 2020

Copy link
Copy Markdown
Contributor Author

Shall I squash your changes into one commit?

@alalek

alalek commented Feb 28, 2020

Copy link
Copy Markdown
Member

Not necessary, I can squash them during merge.

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for contribution 👍

@alalek
alalek merged commit 5012fc5 into opencv:3.4 Feb 28, 2020
@alalek alalek mentioned this pull request Feb 28, 2020
@kelteseth

Copy link
Copy Markdown

These are now hard errors with clang 18 :(

@lainwir3d

Copy link
Copy Markdown

Yup, it's hard errors now

SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* Ignore clang warnings for deprecated enum+enum operations in mat.inl.hpp

* build: added customization macros, cmake flags for OpenCV build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants