• Stephan Bergmann's avatar
    Fixed/improved loplugin:cppunitassertequals · a528392e
    Stephan Bergmann yazdı
    * 994e38e3 "loplugin: use TypeCheck instead of
      getQualifiedNameAsString" had effectively disabled this plugin (Asserter is a
      struct, not a namespace).  Fixed that.
    
    * Also improved the checks, for one removing the---expensive---use of
      Plugin::parentStmt, for another making the plugin look into (...), !..., and
      ...&&... expressions.
    
    * However, as the plugin had effectively already been disabled (see above) when
      it was switched on generally with 839e53b9
      "compilerplugins: enable loplugin:cppunitassertequals by default", it now hit
      way more places than I had initially anticipated.  To keep the amount of work
      manageable, midway-through I disabled looking into ...&&... expressions for
      now.  That will be enabled (and resulting warnings fixed) in follow-up
      commits.
    
    * Checks like
    
        CPPUNIT_ASSERT(a == b)
    
      that actually want to check a specific overloaded operator == implementation,
      rather than using such an operator == to actually check that a and b are
      equal, can be rewritten as
    
        CPPUNIT_ASSERT(operator ==(a, b))
    
      to avoid false warnings from this plugin.
    
    Change-Id: If3501020e2d150ad0f2454a65a39081e31470c0f
    a528392e
Adı
Son kayıt (commit)
Son güncelleme
..
cppunitassertequals.cxx Loading commit data...
cppunitassertequals.hxx Loading commit data...
datamembershadow.cxx Loading commit data...
externvar.cxx Loading commit data...
externvar.hxx Loading commit data...
finalprotected.cxx Loading commit data...
loopvartoosmall.cxx Loading commit data...
oslendian-1.cxx Loading commit data...
oslendian-2.cxx Loading commit data...
oslendian-3.cxx Loading commit data...
passstuffbyref.cxx Loading commit data...
redundantcast.cxx Loading commit data...
redundantinline.cxx Loading commit data...
redundantinline.hxx Loading commit data...
salbool.cxx Loading commit data...
stringconstant.cxx Loading commit data...
unnecessaryoverride-dtor.cxx Loading commit data...
unnecessaryoverride-dtor.hxx Loading commit data...
unoany.cxx Loading commit data...
vclwidgets.cxx Loading commit data...