-
Notifications
You must be signed in to change notification settings - Fork 487
Suppress -Wdirect-ivar-access in generated objcpp files #255
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,10 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) { | |
val objcSelf = if (i.ext.objc && i.ext.cpp) self + "CppProxy" else self | ||
|
||
if (i.ext.cpp) { | ||
// Disable warnings in Clang about directly accessing the ivars of an object | ||
w.wl("#if __clang__") | ||
w.wl("#pragma clang diagnostic ignored \"-Wdirect-ivar-access\"") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would remove the |
||
w.wl("#endif") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The generated code doesn't include the #if/#endif here, so I presume it wasn't regenerated after the most recent change? Please re-generate to reflect the latest state of the generator. After seeing the commentary I'm fine with merging this either with or without the #if. |
||
w.wl | ||
if (i.ext.objc) | ||
w.wl(s"@interface $objcSelf : NSObject<$self>") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the indentation of the new code here is mixing tabs and spaces. Can you standardize on spaces to match the existing code, please?