MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / make_default_obj

Class make_default_obj

test/helpers.h:198–205  ·  view source on GitHub ↗

Default construct object to avoid bug in clang error: default member initializer for 'y' needed within definition of enclosing class 'X' outside of member functions see https://stackoverflow.com/questions/53408962

Source from the content-addressed store, hash-verified

196// error: default member initializer for 'y' needed within definition of enclosing class 'X' outside of member functions
197// see https://stackoverflow.com/questions/53408962
198struct make_default_obj
199{
200 template<class T>
201 operator T() const // NOLINT
202 {
203 return T{};
204 }
205};
206
207inline std::string filter_valueflow(const std::string& s) {
208 bool filtered = false;

Callers 15

tok_Method · 0.85
check_Method · 0.85
tokenize_Method · 0.85
check_Method · 0.85
check_Method · 0.85
tok_Method · 0.85
dump_Method · 0.85
check_Method · 0.85
checkP_Method · 0.85
check_Method · 0.85

Calls

no outgoing calls

Tested by 15

tok_Method · 0.68
check_Method · 0.68
tokenize_Method · 0.68
check_Method · 0.68
check_Method · 0.68
tok_Method · 0.68
dump_Method · 0.68
check_Method · 0.68
checkP_Method · 0.68
check_Method · 0.68