MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / precedes

Function precedes

lib/astutils.cpp:1030–1039  ·  view source on GitHub ↗

If tok2 comes after tok1

Source from the content-addressed store, hash-verified

1028
1029/// If tok2 comes after tok1
1030bool precedes(const Token * tok1, const Token * tok2)
1031{
1032 if (tok1 == tok2)
1033 return false;
1034 if (!tok1)
1035 return false;
1036 if (!tok2)
1037 return true;
1038 return tok1->index() < tok2->index();
1039}
1040
1041/// If tok1 comes after tok2
1042bool succeeds(const Token* tok1, const Token* tok2)

Callers 15

checkRecursiveMethod · 0.85
forwardRangeMethod · 0.85
checkStructVariableMethod · 0.85
iscpp11init_implFunction · 0.85
compileUnaryOpFunction · 0.85
compileTermFunction · 0.85
createAstAtTokenInnerFunction · 0.85
createAstAtTokenFunction · 0.85
createAstMethod · 0.85
validateAstMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected