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
1=== modified file 'include/server/mir/compositor/display_listener.h'
2--- include/server/mir/compositor/display_listener.h 2015-02-27 14:29:18 +0000
3+++ include/server/mir/compositor/display_listener.h 2015-09-29 13:35:37 +0000
4@@ -21,7 +21,7 @@
5
6 namespace mir
7 {
8-namespace geometry { class Rectangle; }
9+namespace geometry { struct Rectangle; }
10 namespace compositor
11 {
12 class DisplayListener
13
14=== modified file 'include/server/mir/frontend/buffer_stream.h'
15--- include/server/mir/frontend/buffer_stream.h 2015-09-15 18:25:38 +0000
16+++ include/server/mir/frontend/buffer_stream.h 2015-09-29 13:35:37 +0000
17@@ -29,7 +29,7 @@
18 namespace graphics
19 {
20 class Buffer;
21-class BufferProperties;
22+struct BufferProperties;
23 }
24 namespace scene
25 {
26
27=== modified file 'include/server/mir/frontend/session.h'
28--- include/server/mir/frontend/session.h 2015-04-28 07:54:10 +0000
29+++ include/server/mir/frontend/session.h 2015-09-29 13:35:37 +0000
30@@ -31,7 +31,7 @@
31 namespace graphics
32 {
33 class DisplayConfiguration;
34-class BufferProperties;
35+struct BufferProperties;
36 }
37
38 namespace frontend
39
40=== modified file 'include/server/mir/shell/focus_controller.h'
41--- include/server/mir/shell/focus_controller.h 2015-06-17 05:20:42 +0000
42+++ include/server/mir/shell/focus_controller.h 2015-09-29 13:35:37 +0000
43@@ -24,7 +24,7 @@
44
45 namespace mir
46 {
47-namespace geometry { class Point; }
48+namespace geometry { struct Point; }
49 namespace scene { class Session; class Surface; }
50
51 namespace shell
52
53=== modified file 'include/server/mir/shell/shell.h'
54--- include/server/mir/shell/shell.h 2015-06-17 05:20:42 +0000
55+++ include/server/mir/shell/shell.h 2015-09-29 13:35:37 +0000
56@@ -31,7 +31,7 @@
57 namespace mir
58 {
59 namespace frontend { class EventSink; }
60-namespace geometry { class Rectangle; }
61+namespace geometry { struct Rectangle; }
62 namespace scene
63 {
64 class PromptSession;
65
66=== modified file 'include/server/mir/shell/window_manager.h'
67--- include/server/mir/shell/window_manager.h 2015-06-17 05:20:42 +0000
68+++ include/server/mir/shell/window_manager.h 2015-09-29 13:35:37 +0000
69@@ -27,11 +27,11 @@
70
71 namespace mir
72 {
73-namespace geometry { class Rectangle; }
74-namespace scene { class Session; class Surface; class SurfaceCreationParameters; }
75+namespace geometry { struct Rectangle; }
76+namespace scene { class Session; class Surface; struct SurfaceCreationParameters; }
77 namespace shell
78 {
79-class SurfaceSpecification;
80+struct SurfaceSpecification;
81
82 /// interface to provide window management logic
83 class WindowManager

Subscribers

People subscribed via source and target branches