@@ -572,40 +572,51 @@ def _get_partial_name_impl(self):
572572
573573 def find_noncopyable_vars (self ):
574574 """returns list of all `noncopyable` variables"""
575+
575576 from . import type_traits as tt # prevent cyclic dependencies
577+
576578 logger = utils .loggers .cxx_parser
577579 mvars = self .vars (
578580 lambda v : not v .type_qualifiers .has_static ,
579581 recursive = False ,
580582 allow_empty = True )
581583 noncopyable_vars = []
584+
585+ message = (
586+ "__contains_noncopyable_mem_var - %s - TRUE - " +
587+ "containes const member variable" )
588+
582589 for mvar in mvars :
590+
583591 type_ = tt .remove_reference (mvar .type )
592+
584593 if tt .is_const (type_ ):
585594 no_const = tt .remove_const (type_ )
586- message = (
587- "__contains_noncopyable_mem_var - %s - TRUE - " +
588- "containes const member variable" )
589595 if tt .is_fundamental (no_const ) or tt .is_enum (no_const ):
590- logger .debug (
591- message + "- fundamental or enum" % self .decl_string )
596+ logger .debug ((
597+ message + "- fundamental or enum" )
598+ % self .decl_string )
592599 noncopyable_vars .append (mvar )
593600 if tt .is_class (no_const ):
594- logger .debug (message + " - class" % self .decl_string )
601+ logger .debug (( message + " - class" ) % self .decl_string )
595602 noncopyable_vars .append (mvar )
596603 if tt .is_array (no_const ):
597- logger .debug (message + " - array" % self .decl_string )
604+ logger .debug (( message + " - array" ) % self .decl_string )
598605 noncopyable_vars .append (mvar )
606+
599607 if tt .class_traits .is_my_case (type_ ):
608+
600609 cls = tt .class_traits .get_declaration (type_ )
601610 if tt .is_noncopyable (cls ):
602- logger .debug (
603- message +
604- " - class that is not copyable" % self .decl_string )
611+ logger .debug ((
612+ message + " - class that is not copyable" )
613+ % self .decl_string )
605614 noncopyable_vars .append (mvar )
615+
606616 logger .debug ((
607- "__contains_noncopyable_mem_var - %s - false - doesn't " +
608- "contains noncopyable members" ) % self .decl_string )
617+ "__contains_noncopyable_mem_var - %s - FALSE - doesn't " +
618+ "contain noncopyable members" ) % self .decl_string )
619+
609620 return noncopyable_vars
610621
611622 @property
0 commit comments