Issue |
144291
|
Summary |
Unable to switch off diagnostics for "Invalid bitwise operation between different enumeration types"
|
Labels |
new issue
|
Assignees |
|
Reporter |
DominikDeak
|
I have come across an issue where certain third party header files generates the following error, when included in C++26 projects:
>/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h:96:18 Invalid bitwise operation between different enumeration types ('CGImageAlphaInfo' and 'CGImageComponentInfo')
Trying to disable diagnostics using the following pragmas does not work:
```
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wenum-conversion"
#include <Cocoa/Cocoa.h>
#pragma clang diagnostic pop
```
Sample test project for Xcode 26: [Test.zip](https://github.com/user-attachments/files/20749306/Test.zip)
I realise Apple uses their own custmised clang, but i'm speculating they pull most of core features/bugfixes from upstream `llvm-project`. I've also raised an issue with Apple, but I have not gotten a response. There is also a related issue https://github.com/llvm/llvm-project/issues/92340, but not sure what the outcome was for this.
If there is a work-around to disable specific diagnostics for third-party or system headers included in C++26 projects, that would be appreciated.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs