@@ -2626,7 +2626,7 @@ static std::string dirPath(const std::string& path, bool withTrailingSlash=true)
26262626
26272627static std::string openHeader (std::ifstream &f, const simplecpp::DUI &dui, const std::string &sourcefile, const std::string &header, bool systemheader);
26282628
2629- /* * Evaluate sizeof(type )
2629+ /* * Evaluate __has_include(include )
26302630 * @throws std::runtime_error thrown on missing arguments or invalid expression
26312631 */
26322632static void simplifyHasInclude (simplecpp::TokenList &expr, const simplecpp::DUI &dui)
@@ -2685,7 +2685,7 @@ static void simplifyHasInclude(simplecpp::TokenList &expr, const simplecpp::DUI
26852685 }
26862686}
26872687
2688- /* * Evaluate sizeof(type)
2688+ /* * Evaluate name
26892689 * @throws std::runtime_error thrown on undefined function-like macro
26902690 */
26912691static void simplifyName (simplecpp::TokenList &expr)
@@ -2929,6 +2929,9 @@ long long simplecpp::characterLiteralToLL(const std::string& str)
29292929 return multivalue;
29302930}
29312931
2932+ /* *
2933+ * @throws std::runtime_error thrown on invalid literal
2934+ */
29322935static void simplifyNumbers (simplecpp::TokenList &expr)
29332936{
29342937 for (simplecpp::Token *tok = expr.front (); tok; tok = tok->next ) {
@@ -2951,6 +2954,10 @@ static void simplifyComments(simplecpp::TokenList &expr)
29512954 }
29522955}
29532956
2957+ /* *
2958+ * @throws std::runtime_error thrown on invalid literals, missing sizeof arguments or invalid expressions,
2959+ * missing __has_include() arguments or expressions, undefined function-like macros, invalid number literals
2960+ */
29542961static long long evaluate (simplecpp::TokenList &expr, const simplecpp::DUI &dui, const std::map<std::string, std::size_t > &sizeOfType)
29552962{
29562963 simplifyComments (expr);
0 commit comments