diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 4678f769baed18f6b730fa55c40d9a84c656da86..ca1a4f776fbfb04f6ff14862521c0428e429afc1 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -3556,9 +3556,6 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, } SimpleDeclarationAST *ast = new (_pool) SimpleDeclarationAST; ast->qt_invokable_token = qt_invokable_token; -#ifdef ICHECK_BUILD - ast->invoke_token = invoke_token; -#endif ast->decl_specifier_list = decl_specifier_seq; ast->declarator_list = declarator_list; match(T_SEMICOLON, &ast->semicolon_token); @@ -3588,9 +3585,6 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, if (LA() == T_LBRACE || hasCtorInitializer) { FunctionDefinitionAST *ast = new (_pool) FunctionDefinitionAST; ast->qt_invokable_token = qt_invokable_token; -#ifdef ICHECK_BUILD - ast->invoke_token = invoke_token; -#endif ast->decl_specifier_list = decl_specifier_seq; ast->declarator = firstDeclarator; ast->ctor_initializer = ctor_initializer; @@ -3600,9 +3594,6 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, } else if (LA() == T_TRY) { FunctionDefinitionAST *ast = new (_pool) FunctionDefinitionAST; ast->qt_invokable_token = qt_invokable_token; -#ifdef ICHECK_BUILD - ast->invoke_token = invoke_token; -#endif ast->decl_specifier_list = decl_specifier_seq; ast->declarator = firstDeclarator; ast->ctor_initializer = ctor_initializer; diff --git a/src/shared/cplusplus/Symbols.cpp b/src/shared/cplusplus/Symbols.cpp index e97f13d36333deedcd3d6f7788cf10de880d1e27..c7226bd7153052b2a054bc1c0d49835adb5e1916 100644 --- a/src/shared/cplusplus/Symbols.cpp +++ b/src/shared/cplusplus/Symbols.cpp @@ -189,6 +189,9 @@ bool Function::isSignal() const bool Function::isSlot() const { return f._methodKey == SlotMethod; } +bool Function::isInvokable() const +{ return f._methodKey == InvokableMethod; } + int Function::methodKey() const { return f._methodKey; } diff --git a/src/shared/cplusplus/Symbols.h b/src/shared/cplusplus/Symbols.h index 2ea24c539a8906ca9386bedf4450e2d2c634a78a..48356b2a3a32e97d0cd8cd0994fbeaa568734e4e 100644 --- a/src/shared/cplusplus/Symbols.h +++ b/src/shared/cplusplus/Symbols.h @@ -313,6 +313,7 @@ public: bool isNormal() const; bool isSignal() const; bool isSlot() const; + bool isInvokable() const; int methodKey() const; void setMethodKey(int key); diff --git a/tests/auto/icheckbuild/ichecklib.pri b/tests/auto/icheckbuild/ichecklib.pri index 35c15d891f6b7c4cfa240e87a5c28a045fb06d3e..93111dc8e1a35b419f08285d46abc164de9b75c3 100644 --- a/tests/auto/icheckbuild/ichecklib.pri +++ b/tests/auto/icheckbuild/ichecklib.pri @@ -1,7 +1,7 @@ # ---------------------------------------------------- # This file is generated by the Qt Visual Studio Add-in. # ------------------------------------------------------ -HEADERS += $$REL_PATH_TO_SRC/shared/cplusplus/Array.h \ +HEADERS += \ $$REL_PATH_TO_SRC/shared/cplusplus/AST.h \ $$REL_PATH_TO_SRC/shared/cplusplus/ASTMatcher.h \ $$REL_PATH_TO_SRC/shared/cplusplus/ASTVisitor.h \ @@ -58,7 +58,7 @@ HEADERS += $$REL_PATH_TO_SRC/shared/cplusplus/Array.h \ $$REL_PATH_TO_SRC/libs/cplusplus/TypePrettyPrinter.h \ $$REL_PATH_TO_SRC/shared/cplusplus/TypeVisitor.h \ $$REL_PATH_TO_SRC/plugins/cpptools/cpptools_global.h -SOURCES += $$REL_PATH_TO_SRC/shared/cplusplus/Array.cpp \ +SOURCES += \ $$REL_PATH_TO_SRC/shared/cplusplus/AST.cpp \ $$REL_PATH_TO_SRC/shared/cplusplus/ASTMatch0.cpp \ $$REL_PATH_TO_SRC/shared/cplusplus/ASTMatcher.cpp \