• Stephan Bergmann's avatar
    Adapt loplugins to clang-cl's (implicit) -fdelayed-template-parsing · 419d664f
    Stephan Bergmann yazdı
    ...which is there for MSVC compatibility, but can cause getBody() to return null
    even when doesThisDeclarationHaveABody() is true.
    
    And in staticmethods.cxx we need to check doesThisDeclarationHaveABody() instead
    of hasBody():  For some class template member functions that are only defined
    outside their class definition, as is the case for
    OSequenceIterator::hasMoreElements in include/comphelper/sequence.hxx, hasBody()
    may be true for the original member function declaration inside the class (as
    there is some later definition that does have a body), but
    isLateTemplateParsed() is not (it is only true for the later definition).  So
    just skip any such declarations that are not definitions (which is sane anyway,
    as otherwise such functions could pointlessly be inspected multiple times).
    
    Change-Id: I724f652a8f060a931f8b5fc3e4feb5f307a922bf
    Reviewed-on: https://gerrit.libreoffice.org/42914Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    419d664f
plugin.cxx 17.2 KB