terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.82k stars 248 forks source link

Still fail to recognize the function in .mm file #305

Open yql70 opened 3 years ago

yql70 commented 3 years ago

Version:Lizard 1.17.7 I see an update in version 1.17.6 : Bug fixing. .mm file was not recognized as object-c(++) file. image Code:

#import "OCCFile.h"
#include "CppFile.h"

#include "OCInterfaceC.h"
#include "InterfaceCC.h"

#include "CppOCFile.h"

@interface OCCFile ()
{
    CppFile* mCppFile;//换成void*方式
}

@end

@implementation OCCFile

- (id)init
{
    if (self == [super init])
    {
        printf("=======My name is OCCFile.\n ");
    }
    return self;
}

- (void)doSomethingWithCPPobj:(id)cppobj
{
    CppOCFile* cppOb = (__bridge CppOCFile*)cppobj;
    cppOb->DoSomething1();
}

-(void)dealloc
{
    delete mCppFile;

    [super dealloc];
}

@end

Output:

=================================== NLOC CCN token PARAM length location

4 1 9 0 4 OCCFile@9-12@/xxx/OCCFile.mm 4 1 16 1 4 if@20-23@/xxx/OCCFile.mm It is still wrong to recognize the function in .mm file.