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

Method removePragma

lib/tokenize.cpp:6752–6764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6750//---------------------------------------------------------------------------
6751
6752void Tokenizer::removePragma()
6753{
6754 if (isC() && mSettings.standards.c == Standards::C89)
6755 return;
6756 if (isCPP() && mSettings.standards.cpp == Standards::CPP03)
6757 return;
6758 for (Token *tok = list.front(); tok; tok = tok->next()) {
6759 while (Token::simpleMatch(tok, "_Pragma (")) {
6760 Token::eraseTokens(tok, tok->linkAt(1)->next());
6761 tok->deleteThis();
6762 }
6763 }
6764}
6765
6766//---------------------------------------------------------------------------
6767

Callers

nothing calls this directly

Calls 7

isCPPFunction · 0.85
frontMethod · 0.80
nextMethod · 0.80
linkAtMethod · 0.80
deleteThisMethod · 0.80
isCFunction · 0.70
simpleMatchFunction · 0.70

Tested by

no test coverage detected