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

Function isCharLiteral

externals/simplecpp/simplecpp.cpp:75–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static bool isCharLiteral(const std::string &s)
76{
77 // char literal patterns can include 'a', '\t', '\000', '\xff', 'abcd', and maybe ''
78 // This only checks for the surrounding '' but doesn't parse the content.
79 return s.size() > 1 && (s[0]=='\'') && (*s.rbegin()=='\'');
80}
81
82static const simplecpp::TokenString DEFINE("define");
83static const simplecpp::TokenString UNDEF("undef");

Callers 1

expandHashHashMethod · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected