path: root/src/lib/eolian_cxx/grammar/type_impl.hpp
diff options
authorVitor Sousa <>2019-07-12 09:07:27 -0400
committerMike Blumenkrantz <>2019-07-12 09:07:27 -0400
commitb1e44484a5702c840d8ab8db1b09121c1d43b126 (patch)
treeb96209f4af51649953b2b1eb3824af0dba0e136a /src/lib/eolian_cxx/grammar/type_impl.hpp
parentc001a8146bcc366780cd50fa51e8f91cfd2b1d5c (diff)
cxx: remove compilation warnings in C++ code, from both gcc and clang
Summary: Remove almost all the compilation warnings from C++ code. Only explicit warnings using the `#warning` preprocessor directive remain. Some warnings had to be suppressed with `#pragma` directives because the behavior they were warning about is intended in some specific places. Code comments were added in such situations. Added a generator that creates `#pragma` directives in order to suppress warnings in all generated C++ headers. Currently `-Wignored-qualifiers` is the only warning category being suppressed. The innocuous const qualifiers that it points are inoffensive and have no effect in compilation at all. They are also hard to track in generation since they can emerge from different types in many places. To ease the generation of the warning suppressors an utility constructor was added to `efl::eolian::grammar::attributes::unused_type`. Add constructors to `eolian_mono::class_context` to default initialize its internal string and avoid field initialization warnings. Test Plan: `meson test` Reviewers: lauromoura, felipealmeida, zmike, segfaultxavi Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl_language_bindings Differential Revision:
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp b/src/lib/eolian_cxx/grammar/type_impl.hpp
index ca73a14bd0..c5bd4d8363 100644
--- a/src/lib/eolian_cxx/grammar/type_impl.hpp
+++ b/src/lib/eolian_cxx/grammar/type_impl.hpp
@@ -348,7 +348,7 @@ struct visitor_generate
348 // pointers.swap(no_pointer_regular.pointers); 348 // pointers.swap(no_pointer_regular.pointers);
349 // if(is_out) 349 // if(is_out)
350 // pointers.push_back({{attributes::qualifier_info::is_none, {}}, true}); 350 // pointers.push_back({{attributes::qualifier_info::is_none, {}}, true});
351 return visitor_type{sink, context, c_type, false}(no_pointer_regular) 351 return visitor_type{sink, context, c_type, false, false}(no_pointer_regular)
352 && as_generator("<" << (type % ", ") << ">").generate(sink, complex.subtypes, *context) 352 && as_generator("<" << (type % ", ") << ">").generate(sink, complex.subtypes, *context)
353 ; 353 ;
354 // && detail::generate_pointers(sink, pointers, *context, false); 354 // && detail::generate_pointers(sink, pointers, *context, false);