From e560ad16167bf7e5655cfa2327b92afef690c549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 5 Mar 2017 18:19:49 +0100 Subject: [PATCH] update std::string config --- cfg/std.cfg | 28 ++++++++++++++++++++++++++++ lib/symboldatabase.cpp | 12 ++++++++++++ 2 files changed, 40 insertions(+) diff --git a/cfg/std.cfg b/cfg/std.cfg index c93859efb..4545c5429 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -4023,9 +4023,27 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + false + + + + + 0: + + + + false + + + + + false + false + @@ -4047,6 +4065,16 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun 0: + + false + + + + + false + + + diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 672dccd04..ef76f6ae8 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5001,6 +5001,18 @@ bool ValueType::fromLibraryType(const std::string &typestr, const Settings *sett if (platformType->_const_ptr) constness = 1; return true; + } else if (!podtype && (typestr == "size_t" || typestr == "std::size_t")) { + originalTypeName = "size_t"; + sign = ValueType::UNSIGNED; + if (settings->sizeof_size_t == settings->sizeof_long) + type = ValueType::Type::LONG; + else if (settings->sizeof_size_t == settings->sizeof_long_long) + type = ValueType::Type::LONGLONG; + else if (settings->sizeof_size_t == settings->sizeof_int) + type = ValueType::Type::INT; + else + type = ValueType::Type::UNKNOWN_INT; + return true; } return false;