Mir

Merge lp:~aacid/mir/fix_forward_declarations into lp:mir

Proposed by Albert Astals Cid
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 2981
Proposed branch: lp:~aacid/mir/fix_forward_declarations
Merge into: lp:mir
Diff against target: 83 lines (+8/-8)
6 files modified
include/server/mir/compositor/display_listener.h (+1/-1)
include/server/mir/frontend/buffer_stream.h (+1/-1)
include/server/mir/frontend/session.h (+1/-1)
include/server/mir/shell/focus_controller.h (+1/-1)
include/server/mir/shell/shell.h (+1/-1)
include/server/mir/shell/window_manager.h (+3/-3)
To merge this branch: bzr merge lp:~aacid/mir/fix_forward_declarations
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel van Vugt Approve
Alan Griffiths Approve
Review via email: mp+272751@code.launchpad.net

Commit message

Fix forward declarations so that qtmir can be built with clang

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I think this attempt is misguided and that you should use -Wno-mismatched-tags in qtmir.

/1/ According to the language standard there are no differences between "struct" and "class" in this (declaration) context. The only differences are in the context of definitions (of which there will only be one. So the warning is pointless.

/2/ We did try to keep clang happy for a while on Mir, but eventually ran into some standard library types that were declared "struct" in some headers and "class" in others. So problems existed outside code that we control.

So there's no advantage to using this warning, and a definite cost.

review: Abstain
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> So problems existed outside code that we control.

So using the warning introduces problems existed outside code that we control.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Huh. I remember a couple of years back we fixed these because clang complained about them. No idea why clang had't complained again till now.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Huh. I remember a couple of years back we fixed these because clang complained
> about them. No idea why clang had't complained again till now.

We added "-Wno-mismatched-tags" because of 3rd party code that (correctly, according to the language) doesn't care about this distinction.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

AFAICS landing problem was fixed by lp:~mir-team/mir/workaround-for-valgrind-opcode

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/server/mir/compositor/display_listener.h'
--- include/server/mir/compositor/display_listener.h 2015-02-27 14:29:18 +0000
+++ include/server/mir/compositor/display_listener.h 2015-09-29 13:35:37 +0000
@@ -21,7 +21,7 @@
2121
22namespace mir22namespace mir
23{23{
24namespace geometry { class Rectangle; }24namespace geometry { struct Rectangle; }
25namespace compositor25namespace compositor
26{26{
27class DisplayListener27class DisplayListener
2828
=== modified file 'include/server/mir/frontend/buffer_stream.h'
--- include/server/mir/frontend/buffer_stream.h 2015-09-15 18:25:38 +0000
+++ include/server/mir/frontend/buffer_stream.h 2015-09-29 13:35:37 +0000
@@ -29,7 +29,7 @@
29namespace graphics29namespace graphics
30{30{
31class Buffer;31class Buffer;
32class BufferProperties;32struct BufferProperties;
33}33}
34namespace scene34namespace scene
35{35{
3636
=== modified file 'include/server/mir/frontend/session.h'
--- include/server/mir/frontend/session.h 2015-04-28 07:54:10 +0000
+++ include/server/mir/frontend/session.h 2015-09-29 13:35:37 +0000
@@ -31,7 +31,7 @@
31namespace graphics31namespace graphics
32{32{
33class DisplayConfiguration;33class DisplayConfiguration;
34class BufferProperties;34struct BufferProperties;
35}35}
3636
37namespace frontend37namespace frontend
3838
=== modified file 'include/server/mir/shell/focus_controller.h'
--- include/server/mir/shell/focus_controller.h 2015-06-17 05:20:42 +0000
+++ include/server/mir/shell/focus_controller.h 2015-09-29 13:35:37 +0000
@@ -24,7 +24,7 @@
2424
25namespace mir25namespace mir
26{26{
27namespace geometry { class Point; }27namespace geometry { struct Point; }
28namespace scene { class Session; class Surface; }28namespace scene { class Session; class Surface; }
2929
30namespace shell30namespace shell
3131
=== modified file 'include/server/mir/shell/shell.h'
--- include/server/mir/shell/shell.h 2015-06-17 05:20:42 +0000
+++ include/server/mir/shell/shell.h 2015-09-29 13:35:37 +0000
@@ -31,7 +31,7 @@
31namespace mir31namespace mir
32{32{
33namespace frontend { class EventSink; }33namespace frontend { class EventSink; }
34namespace geometry { class Rectangle; }34namespace geometry { struct Rectangle; }
35namespace scene35namespace scene
36{36{
37class PromptSession;37class PromptSession;
3838
=== modified file 'include/server/mir/shell/window_manager.h'
--- include/server/mir/shell/window_manager.h 2015-06-17 05:20:42 +0000
+++ include/server/mir/shell/window_manager.h 2015-09-29 13:35:37 +0000
@@ -27,11 +27,11 @@
2727
28namespace mir28namespace mir
29{29{
30namespace geometry { class Rectangle; }30namespace geometry { struct Rectangle; }
31namespace scene { class Session; class Surface; class SurfaceCreationParameters; }31namespace scene { class Session; class Surface; struct SurfaceCreationParameters; }
32namespace shell32namespace shell
33{33{
34class SurfaceSpecification;34struct SurfaceSpecification;
3535
36/// interface to provide window management logic36/// interface to provide window management logic
37class WindowManager37class WindowManager

Subscribers

People subscribed via source and target branches