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

Method lineDirective

externals/simplecpp/simplecpp.cpp:640–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void simplecpp::TokenList::lineDirective(unsigned int fileIndex_, unsigned int line, Location &location)
641{
642 if (fileIndex_ != location.fileIndex || line >= location.line) {
643 location.fileIndex = fileIndex_;
644 location.line = line;
645 return;
646 }
647
648 if (line + 2 >= location.line) {
649 location.line = line;
650 while (cback()->op != '#')
651 deleteToken(back());
652 deleteToken(back());
653 return;
654 }
655}
656
657static const std::string COMMENT_END("*/");
658

Callers

nothing calls this directly

Calls 3

cbackFunction · 0.85
deleteTokenFunction · 0.85
backFunction · 0.70

Tested by

no test coverage detected