[toto@bd4bda4cbef8 CMakeBuild]$ make -j 2
Consolidate compiler generated dependencies of target avcleaner.bin
[ 16%] Building CXX object CMakeFiles/avcleaner.bin.dir/main.cpp.o
[ 33%] Building CXX object CMakeFiles/avcleaner.bin.dir/MatchHandler.cpp.o
In file included from /home/toto/Consumer.h:10,
from /home/toto/main.cpp:17:
/home/toto/MatchHandler.h:52:80: error: ‘clang::ast_type_traits’ has not been declared
52 | bool climbParentsIgnoreCast(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:52:110: error: expected ‘,’ or ‘...’ before ‘node’
52 | bool climbParentsIgnoreCast(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~
/home/toto/MatchHandler.h:64:67: error: ‘clang::ast_type_traits’ has not been declared
64 | getNodeParents(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:64:97: error: expected ‘,’ or ‘...’ before ‘Node’
64 | getNodeParents(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~
/home/toto/MatchHandler.h:74:39: error: ‘clang::ast_type_traits’ has not been declared
74 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:74:69: error: expected ‘,’ or ‘...’ before ‘node’
74 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:83:32: error: ‘clang::ast_type_traits’ has not been declared
83 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:83:62: error: expected ‘,’ or ‘...’ before ‘node’
83 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:95:58: error: ‘clang::ast_type_traits’ has not been declared
95 | findInjectionSpot(clang::ASTContext *Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:95:88: error: expected ‘,’ or ‘...’ before ‘Parent’
95 | findInjectionSpot(clang::ASTContext *Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~
/home/toto/MatchHandler.h:106:36: error: ‘clang::ast_type_traits’ has not been declared
106 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:106:66: error: expected ‘,’ or ‘...’ before ‘node’
106 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:122:28: error: ‘clang::ast_type_traits’ has not been declared
122 | clang::ast_type_traits::DynTypedNode node, std::string StringType="", std::string NewType="");
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:122:58: error: expected ‘,’ or ‘...’ before ‘node’
122 | clang::ast_type_traits::DynTypedNode node, std::string StringType="", std::string NewType="");
| ^~~~
/home/toto/MatchHandler.h:125:35: error: ‘clang::ast_type_traits’ has not been declared
125 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:125:65: error: expected ‘,’ or ‘...’ before ‘node’
125 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
In file included from /home/toto/main.cpp:19:
/home/toto/ApiMatchHandler.h:57:90: error: ‘clang::ast_type_traits’ has not been declared
57 | static clang::SourceRange findInjectionSpot(clang::ASTContext *const Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~~~~~~~~~~
/home/toto/ApiMatchHandler.h:57:120: error: expected ‘,’ or ‘...’ before ‘Parent’
57 | ang::SourceRange findInjectionSpot(clang::ASTContext *const Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~
In file included from /home/toto/MatchHandler.cpp:5:
/home/toto/MatchHandler.h:52:80: error: ‘clang::ast_type_traits’ has not been declared
52 | bool climbParentsIgnoreCast(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:52:110: error: expected ‘,’ or ‘...’ before ‘node’
52 | bool climbParentsIgnoreCast(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~
/home/toto/MatchHandler.h:64:67: error: ‘clang::ast_type_traits’ has not been declared
64 | getNodeParents(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:64:97: error: expected ‘,’ or ‘...’ before ‘Node’
64 | getNodeParents(const clang::StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~
/home/toto/MatchHandler.h:74:39: error: ‘clang::ast_type_traits’ has not been declared
74 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:74:69: error: expected ‘,’ or ‘...’ before ‘node’
74 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:83:32: error: ‘clang::ast_type_traits’ has not been declared
83 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:83:62: error: expected ‘,’ or ‘...’ before ‘node’
83 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:95:58: error: ‘clang::ast_type_traits’ has not been declared
95 | findInjectionSpot(clang::ASTContext *Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:95:88: error: expected ‘,’ or ‘...’ before ‘Parent’
95 | findInjectionSpot(clang::ASTContext *Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~
/home/toto/MatchHandler.h:106:36: error: ‘clang::ast_type_traits’ has not been declared
106 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:106:66: error: expected ‘,’ or ‘...’ before ‘node’
106 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/MatchHandler.h:122:28: error: ‘clang::ast_type_traits’ has not been declared
122 | clang::ast_type_traits::DynTypedNode node, std::string StringType="", std::string NewType="");
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:122:58: error: expected ‘,’ or ‘...’ before ‘node’
122 | clang::ast_type_traits::DynTypedNode node, std::string StringType="", std::string NewType="");
| ^~~~
/home/toto/MatchHandler.h:125:35: error: ‘clang::ast_type_traits’ has not been declared
125 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.h:125:65: error: expected ‘,’ or ‘...’ before ‘node’
125 | clang::ast_type_traits::DynTypedNode node, std::string StringType);
| ^~~~
/home/toto/main.cpp: In member function ‘virtual void AVObfuscator::Action::EndSourceFileAction()’:
/home/toto/main.cpp:136:85: error: conversion from ‘llvm::StringRef’ to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
136 | std::string FileName = SM.getFileEntryForID(SM.getMainFileID())->getName();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/toto/MatchHandler.cpp:25:70: error: ‘clang::ast_type_traits’ has not been declared
25 | MatchHandler::getNodeParents(const StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:25:100: error: expected ‘,’ or ‘...’ before ‘Node’
25 | MatchHandler::getNodeParents(const StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode Node,
| ^~~~
/home/toto/MatchHandler.cpp: In static member function ‘static std::vector<std::__cxx11::basic_string<char> > MatchHandler::getNodeParents(const clang::StringLiteral&, int)’:
/home/toto/MatchHandler.cpp:29:9: error: ‘Iterations’ was not declared in this scope
29 | if (Iterations > Globs::CLIMB_PARENTS_MAX_ITER) {
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:30:16: error: ‘CurrentParents’ was not declared in this scope
30 | return CurrentParents;
| ^~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:33:17: error: ‘DynTypedNodeList’ is not a member of ‘clang::ASTContext’
33 | ASTContext::DynTypedNodeList parents = Context->getParents(NodeString);
| ^~~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:35:9: error: ‘Iterations’ was not declared in this scope
35 | if (Iterations > 0) {
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:36:9: error: ‘parents’ was not declared in this scope
36 | parents = Context->getParents(Node);
| ^~~~~~~
/home/toto/MatchHandler.cpp:36:19: error: ‘Context’ was not declared in this scope
36 | parents = Context->getParents(Node);
| ^~~~~~~
/home/toto/MatchHandler.cpp:36:19: note: suggested alternatives:
In file included from /usr/include/clang/Frontend/ASTUnit.h:17,
from /usr/include/clang/Frontend/FrontendAction.h:23,
from /usr/include/clang/Tooling/Tooling.h:35,
from /home/toto/MatchHandler.h:16,
from /home/toto/MatchHandler.cpp:5:
/usr/include/clang/AST/ASTContext.h:142:7: note: ‘clang::Builtin::Context’
142 | class Context;
| ^~~~~~~
/usr/include/clang/AST/ASTContext.h:157:7: note: ‘clang::interp::Context’
157 | class Context;
| ^~~~~~~
/home/toto/MatchHandler.cpp:36:39: error: ‘Node’ was not declared in this scope; did you mean ‘llvm::yaml::Node’?
36 | parents = Context->getParents(Node);
| ^~~~
| llvm::yaml::Node
In file included from /usr/include/llvm/Support/YAMLTraits.h:25,
from /usr/include/clang/Tooling/Inclusions/IncludeStyle.h:12,
from /usr/include/clang/Tooling/Inclusions/HeaderIncludes.h:14,
from /home/toto/MatchHandler.cpp:13:
/usr/include/llvm/Support/YAMLParser.h:119:7: note: ‘llvm::yaml::Node’ declared here
119 | class Node {
| ^~~~
/home/toto/MatchHandler.cpp:39:31: error: ‘parents’ was not declared in this scope; did you mean ‘parent’?
39 | for (const auto &parent : parents) {
| ^~~~~~~
| parent
/home/toto/MatchHandler.cpp:45:55: error: ‘Context’ was not declared in this scope
45 | return getNodeParents(NodeString, parent, Context, CurrentParents, ++Iterations);
| ^~~~~~~
/home/toto/MatchHandler.cpp:45:55: note: suggested alternatives:
In file included from /usr/include/clang/Frontend/ASTUnit.h:17,
from /usr/include/clang/Frontend/FrontendAction.h:23,
from /usr/include/clang/Tooling/Tooling.h:35,
from /home/toto/MatchHandler.h:16,
from /home/toto/MatchHandler.cpp:5:
/usr/include/clang/AST/ASTContext.h:142:7: note: ‘clang::Builtin::Context’
142 | class Context;
| ^~~~~~~
/usr/include/clang/AST/ASTContext.h:157:7: note: ‘clang::interp::Context’
157 | class Context;
| ^~~~~~~
/home/toto/MatchHandler.cpp:45:64: error: ‘CurrentParents’ was not declared in this scope
45 | return getNodeParents(NodeString, parent, Context, CurrentParents, ++Iterations);
| ^~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:45:82: error: ‘Iterations’ was not declared in this scope
45 | return getNodeParents(NodeString, parent, Context, CurrentParents, ++Iterations);
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:48:9: error: ‘CurrentParents’ was not declared in this scope
48 | CurrentParents.push_back(ParentNodeKind);
| ^~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:49:51: error: ‘Context’ was not declared in this scope
49 | return getNodeParents(NodeString, parent, Context, CurrentParents, ++Iterations);
| ^~~~~~~
/home/toto/MatchHandler.cpp:49:51: note: suggested alternatives:
In file included from /usr/include/clang/Frontend/ASTUnit.h:17,
from /usr/include/clang/Frontend/FrontendAction.h:23,
from /usr/include/clang/Tooling/Tooling.h:35,
from /home/toto/MatchHandler.h:16,
from /home/toto/MatchHandler.cpp:5:
/usr/include/clang/AST/ASTContext.h:142:7: note: ‘clang::Builtin::Context’
142 | class Context;
| ^~~~~~~
/usr/include/clang/AST/ASTContext.h:157:7: note: ‘clang::interp::Context’
157 | class Context;
| ^~~~~~~
/home/toto/MatchHandler.cpp:49:78: error: ‘Iterations’ was not declared in this scope
49 | return getNodeParents(NodeString, parent, Context, CurrentParents, ++Iterations);
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:52:12: error: ‘CurrentParents’ was not declared in this scope
52 | return CurrentParents;
| ^~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp: In member function ‘std::string MatchHandler::findStringType(const clang::StringLiteral&, clang::ASTContext*)’:
/home/toto/MatchHandler.cpp:58:17: error: ‘DynTypedNodeList’ is not a member of ‘clang::ASTContext’
58 | ASTContext::DynTypedNodeList parents = pContext->getParents(NodeString);;
| ^~~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:60:31: error: ‘parents’ was not declared in this scope; did you mean ‘parent’?
60 | for (const auto &parent : parents) {
| ^~~~~~~
| parent
/home/toto/MatchHandler.cpp:66:60: error: expected primary-expression before ‘>’ token
66 | StringType = parent.get<clang::ImplicitCastExpr>()->getType().getAsString();
| ^
/home/toto/MatchHandler.cpp:66:62: error: expected primary-expression before ‘)’ token
66 | StringType = parent.get<clang::ImplicitCastExpr>()->getType().getAsString();
| ^
/home/toto/MatchHandler.cpp: At global scope:
/home/toto/MatchHandler.cpp:77:78: error: ‘clang::ast_type_traits’ has not been declared
77 | MatchHandler::climbParentsIgnoreCast(const StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:77:108: error: expected ‘,’ or ‘...’ before ‘node’
77 | MatchHandler::climbParentsIgnoreCast(const StringLiteral &NodeString, clang::ast_type_traits::DynTypedNode node,
| ^~~~
/home/toto/MatchHandler.cpp: In member function ‘bool MatchHandler::climbParentsIgnoreCast(const clang::StringLiteral&, int)’:
/home/toto/MatchHandler.cpp:80:17: error: ‘DynTypedNodeList’ is not a member of ‘clang::ASTContext’
80 | ASTContext::DynTypedNodeList parents = pContext->getParents(NodeString);;
| ^~~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:82:9: error: ‘iterations’ was not declared in this scope
82 | if (iterations > 0) {
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:83:9: error: ‘parents’ was not declared in this scope
83 | parents = pContext->getParents(node);
| ^~~~~~~
/home/toto/MatchHandler.cpp:83:19: error: ‘pContext’ was not declared in this scope
83 | parents = pContext->getParents(node);
| ^~~~~~~~
/home/toto/MatchHandler.cpp:83:40: error: ‘node’ was not declared in this scope
83 | parents = pContext->getParents(node);
| ^~~~
/home/toto/MatchHandler.cpp:86:31: error: ‘parents’ was not declared in this scope; did you mean ‘parent’?
86 | for (const auto &parent : parents) {
| ^~~~~~~
| parent
/home/toto/MatchHandler.cpp:92:63: error: ‘pContext’ was not declared in this scope
92 | return climbParentsIgnoreCast(NodeString, parent, pContext, ++iterations, StringType);
| ^~~~~~~~
/home/toto/MatchHandler.cpp:92:75: error: ‘iterations’ was not declared in this scope
92 | return climbParentsIgnoreCast(NodeString, parent, pContext, ++iterations, StringType);
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:92:87: error: ‘StringType’ was not declared in this scope; did you mean ‘findStringType’?
92 | return climbParentsIgnoreCast(NodeString, parent, pContext, ++iterations, StringType);
| ^~~~~~~~~~
| findStringType
/home/toto/MatchHandler.cpp:95:44: error: ‘pContext’ was not declared in this scope
95 | handleStringInContext(&NodeString, pContext, parent, StringType);
| ^~~~~~~~
/home/toto/MatchHandler.cpp:95:62: error: ‘StringType’ was not declared in this scope; did you mean ‘findStringType’?
95 | handleStringInContext(&NodeString, pContext, parent, StringType);
| ^~~~~~~~~~
| findStringType
/home/toto/MatchHandler.cpp: In member function ‘virtual void MatchHandler::run(const MatchResult&)’:
/home/toto/MatchHandler.cpp:109:40: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
109 | if (!Decl->getBytes().str().size() > 4) {
| ^
/home/toto/MatchHandler.cpp:109:9: note: add parentheses around left hand side expression to silence this warning
109 | if (!Decl->getBytes().str().size() > 4) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ( )
/home/toto/MatchHandler.cpp:109:40: warning: comparison of constant ‘4’ with boolean expression is always false [-Wbool-compare]
109 | if (!Decl->getBytes().str().size() > 4) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/toto/MatchHandler.cpp:115:42: error: ‘clang::ast_type_traits’ has not been declared
115 | climbParentsIgnoreCast(*Decl, clang::ast_type_traits::DynTypedNode(), Result.Context, 0, StringType);
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp: At global scope:
/home/toto/MatchHandler.cpp:120:55: error: ‘ast_type_traits’ in namespace ‘clang’ does not name a type
120 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:120:85: error: expected unqualified-id before ‘node’
120 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:120:84: error: expected ‘)’ before ‘node’
120 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~
| )
/home/toto/MatchHandler.cpp:119:41: note: to match this ‘(’
119 | void MatchHandler::handleStringInContext(const clang::StringLiteral *pLiteral, clang::ASTContext *const pContext,
| ^
/home/toto/MatchHandler.cpp:120:85: error: expected initializer before ‘node’
120 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:137:48: error: ‘ast_type_traits’ in namespace ‘clang’ does not name a type
137 | const clang::ast_type_traits::DynTypedNode node, std::string StringType, std::string NewType) {
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:137:78: error: expected unqualified-id before ‘node’
137 | const clang::ast_type_traits::DynTypedNode node, std::string StringType, std::string NewType) {
| ^~~~
/home/toto/MatchHandler.cpp:137:77: error: expected ‘)’ before ‘node’
137 | const clang::ast_type_traits::DynTypedNode node, std::string StringType, std::string NewType) {
| ^~~~~
| )
/home/toto/MatchHandler.cpp:136:30: note: to match this ‘(’
136 | bool MatchHandler::handleExpr(const clang::StringLiteral *pLiteral, clang::ASTContext *const pContext,
| ^
/home/toto/MatchHandler.cpp:137:78: error: expected initializer before ‘node’
137 | const clang::ast_type_traits::DynTypedNode node, std::string StringType, std::string NewType) {
| ^~~~
/home/toto/MatchHandler.cpp:161:48: error: ‘ast_type_traits’ in namespace ‘clang’ does not name a type
161 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:161:78: error: expected unqualified-id before ‘node’
161 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:161:77: error: expected ‘)’ before ‘node’
161 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~
| )
/home/toto/MatchHandler.cpp:160:34: note: to match this ‘(’
160 | void MatchHandler::handleCallExpr(const clang::StringLiteral *pLiteral, clang::ASTContext *const pContext,
| ^
/home/toto/MatchHandler.cpp:161:78: error: expected initializer before ‘node’
161 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:219:52: error: ‘ast_type_traits’ in namespace ‘clang’ does not name a type
219 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:219:82: error: expected unqualified-id before ‘node’
219 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:219:81: error: expected ‘)’ before ‘node’
219 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~
| )
/home/toto/MatchHandler.cpp:218:38: note: to match this ‘(’
218 | void MatchHandler::handleInitListExpr(const clang::StringLiteral *pLiteral, clang::ASTContext *const pContext,
| ^
/home/toto/MatchHandler.cpp:219:82: error: expected initializer before ‘node’
219 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:226:52: error: ‘ast_type_traits’ in namespace ‘clang’ does not name a type
226 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:226:82: error: expected unqualified-id before ‘node’
226 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp:226:81: error: expected ‘)’ before ‘node’
226 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~~
| )
/home/toto/MatchHandler.cpp:225:37: note: to match this ‘(’
225 | void MatchHandler::handleVarDeclExpr(const clang::StringLiteral *pLiteral, clang::ASTContext *const pContext,
| ^
/home/toto/MatchHandler.cpp:226:82: error: expected initializer before ‘node’
226 | const clang::ast_type_traits::DynTypedNode node, std::string StringType) {
| ^~~~
/home/toto/MatchHandler.cpp: In member function ‘bool MatchHandler::insertVariableDeclaration(const clang::StringLiteral*, clang::ASTContext*, clang::SourceRange, const string&, std::string)’:
/home/toto/MatchHandler.cpp:265:64: error: ‘clang::ast_type_traits’ has not been declared
265 | SourceRange FreeSpace = findInjectionSpot(pContext, clang::ast_type_traits::DynTypedNode(), *pLiteral,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp: At global scope:
/home/toto/MatchHandler.cpp:311:74: error: ‘clang::ast_type_traits’ has not been declared
311 | MatchHandler::findInjectionSpot(clang::ASTContext *const Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:311:104: error: expected ‘,’ or ‘...’ before ‘Parent’
311 | MatchHandler::findInjectionSpot(clang::ASTContext *const Context, clang::ast_type_traits::DynTypedNode Parent,
| ^~~~~~
/home/toto/MatchHandler.cpp: In static member function ‘static clang::SourceRange MatchHandler::findInjectionSpot(clang::ASTContext*, int)’:
/home/toto/MatchHandler.cpp:314:9: error: ‘Iterations’ was not declared in this scope
314 | if (Iterations > Globs::CLIMB_PARENTS_MAX_ITER)
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:317:17: error: ‘DynTypedNodeList’ is not a member of ‘clang::ASTContext’
317 | ASTContext::DynTypedNodeList parents = Context->getParents(Literal);;
| ^~~~~~~~~~~~~~~~
/home/toto/MatchHandler.cpp:319:9: error: ‘Iterations’ was not declared in this scope
319 | if (Iterations > 0) {
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp:320:9: error: ‘parents’ was not declared in this scope
320 | parents = Context->getParents(Parent);
| ^~~~~~~
/home/toto/MatchHandler.cpp:320:39: error: ‘Parent’ was not declared in this scope
320 | parents = Context->getParents(Parent);
| ^~~~~~
/home/toto/MatchHandler.cpp:323:31: error: ‘parents’ was not declared in this scope; did you mean ‘parent’?
323 | for (const auto &parent : parents) {
| ^~~~~~~
| parent
/home/toto/MatchHandler.cpp:328:58: error: expected primary-expression before ‘>’ token
328 | auto FunDecl = parent.get<clang::FunctionDecl>();
| ^
/home/toto/MatchHandler.cpp:328:60: error: expected primary-expression before ‘)’ token
328 | auto FunDecl = parent.get<clang::FunctionDecl>();
| ^
/home/toto/MatchHandler.cpp:331:68: error: could not convert ‘{<expression error>, <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘clang::SourceRange’
331 | return {FirstChild->getBeginLoc(), FunDecl->getEndLoc()};
| ^
| |
| <brace-enclosed initializer list>
/home/toto/MatchHandler.cpp:335:17: error: ‘IsGlobal’ was not declared in this scope
335 | if (IsGlobal) {
| ^~~~~~~~
/home/toto/MatchHandler.cpp:336:49: error: expected primary-expression before ‘>’ token
336 | return parent.get<clang::VarDecl>()->getSourceRange();
| ^
/home/toto/MatchHandler.cpp:336:51: error: expected primary-expression before ‘)’ token
336 | return parent.get<clang::VarDecl>()->getSourceRange();
| ^
/home/toto/MatchHandler.cpp:340:51: error: ‘Literal’ was not declared in this scope
340 | return findInjectionSpot(Context, parent, Literal, IsGlobal, ++Iterations);
| ^~~~~~~
/home/toto/MatchHandler.cpp:340:60: error: ‘IsGlobal’ was not declared in this scope
340 | return findInjectionSpot(Context, parent, Literal, IsGlobal, ++Iterations);
| ^~~~~~~~
/home/toto/MatchHandler.cpp:340:72: error: ‘Iterations’ was not declared in this scope
340 | return findInjectionSpot(Context, parent, Literal, IsGlobal, ++Iterations);
| ^~~~~~~~~~
/home/toto/MatchHandler.cpp: In static member function ‘static bool MatchHandler::isBlacklistedFunction(const clang::CallExpr*)’:
/home/toto/MatchHandler.cpp:358:38: error: conversion from ‘llvm::StringRef’ to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
358 | std::string ApiName = II->getName();
| ~~~~~~~~~~~^~
/home/toto/MatchHandler.cpp: In static member function ‘static bool MatchHandler::isStringLiteralInGlobal(clang::ASTContext*, const clang::StringLiteral&)’:
/home/toto/MatchHandler.cpp:366:36: error: ‘clang::ast_type_traits’ has not been declared
366 | getNodeParents(Literal, clang::ast_type_traits::DynTypedNode(), Context, Parents, 0);
| ^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/avcleaner.bin.dir/build.make:76: CMakeFiles/avcleaner.bin.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/avcleaner.bin.dir/build.make:90: CMakeFiles/avcleaner.bin.dir/MatchHandler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/avcleaner.bin.dir/all] Error 2
make: *** [Makefile:91: all] Error 2