Skip to content

Commit

Permalink
Merge branch 'main' into chr_Fix12453
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Feb 24, 2024
2 parents 9d680cb + 9780847 commit cc5f3e1
Show file tree
Hide file tree
Showing 46 changed files with 478 additions and 265 deletions.
44 changes: 41 additions & 3 deletions cfg/std.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6498,11 +6498,49 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-uninit/>
</arg>
</function>
<!-- (1) (since C++17) bool std::filesystem::exists( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::exists( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::exists( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_block_file( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_block_file( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_block_file( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_character_file( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_character_file( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_character_file( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_directory( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_directory( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_directory( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_empty const std::filesystem::path& p ); -->
<!-- (2) (since C++17) bool std::filesystem::is_empty( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_fifo( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_fifo const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_fifo( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_other( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_other const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_other( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_regular_file( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_regular_file( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_regular_file( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_socket( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_socket( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_socket( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<!-- (1) (since C++17) bool std::filesystem::is_symlink( std::filesystem::file_status s ) noexcept; -->
<!-- (2) (since C++17) bool std::filesystem::is_symlink( const std::filesystem::path& p ); -->
<!-- (3) (since C++17) bool std::filesystem::is_symlink( const std::filesystem::path& p, std::error_code& ec ) noexcept; -->
<function name="std::filesystem::exists,std::filesystem::is_block_file,std::filesystem::is_character_file,std::filesystem::is_directory,std::filesystem::is_empty,std::filesystem::is_fifo,std::filesystem::is_other,std::filesystem::is_regular_file,std::filesystem::is_socket,std::filesystem::is_symlink">
<returnValue type="bool"/>
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1" direction="in"/>
<arg nr="2" direction="out" default=""/>
</function>
<!-- std::string std::ostringstream::str() const; -->
<!-- std::string std::stringstream::str() const; -->
<!-- std::string std::basic_stringstream::str() const; -->
<!-- @todo Implement the second version when function overloading is possible: -->
<!-- void std::ostringstream::str(const string & s); -->
<function name="std::ostringstream::str,std::stringstream::str">
<function name="std::ostringstream::str,std::stringstream::str,std::basic_stringstream::str">
<use-retval/>
<const/>
<returnValue type="std::string"/>
Expand Down Expand Up @@ -6814,7 +6852,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<function name="std::exchange">
<leak-ignore/>
<noreturn>false</noreturn>
<use-retval/>
<use-retval/>
<returnValue>arg1</returnValue>
<arg nr="1">
<not-uninit/>
Expand Down Expand Up @@ -8998,7 +9036,7 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
<podtype name="std::atomic_intmax_t"/>
<podtype name="std::atomic_uintmax_t"/>
<!-- https://en.cppreference.com/w/c/program/SIG_types
Values are in alignment with posix.cfg -->
Values are in alignment with posix.cfg -->
<define name="SIGTERM" value="15"/>
<define name="SIGSEGV" value="11"/>
<define name="SIGINT" value="2"/>
Expand Down
167 changes: 156 additions & 11 deletions cfg/wxwidgets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9973,14 +9973,6 @@
<not-bool/>
</arg>
</function>
<!-- wxPoint wxRect::GetPosition() const -->
<function name="wxStaticText::GetPosition">
<noreturn>false</noreturn>
<returnValue type="wxPoint"/>
<leak-ignore/>
<const/>
<use-retval/>
</function>
<!-- bool wxVariant::IsNull() const -->
<function name="wxVariant::IsNull">
<noreturn>false</noreturn>
Expand Down Expand Up @@ -10127,6 +10119,17 @@
<not-bool/>
</arg>
</function>
<!-- int wxSize::GetHeight( void ) const -->
<!-- int wxSize::GetWidth( void ) const -->
<!-- int wxSize::GetX( void ) const -->
<!-- int wxSize::GetY( void ) const -->
<function name="wxSize::GetHeight,wxSize::GetWidth,wxSize::GetX,wxSize::GetY">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- virtual void wxBrush::SetColour(const wxColour & colour)-->
<function name="wxBrush::SetColour">
<noreturn>false</noreturn>
Expand Down Expand Up @@ -11451,6 +11454,93 @@
<not-null/>
</arg>
</function>
<!-- wxGridCellEditorPtr wxGridCellAttr::GetEditorPtr( const wxGrid * grid, int row, int col ) const -->
<function name="wxGridCellAttr::GetEditorPtr">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxGridCellEditorPtr"/>
<const/>
<arg nr="1" direction="inout">
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
</arg>
</function>
<!-- wxGridFitMode wxGridCellAttr::GetFitMode( void ) const -->
<function name="wxGridCellAttr::GetFitMode">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxGridFitMode"/>
<use-retval/>
<const/>
</function>
<!-- const wxFont & wxGridCellAttr::GetFont( void ) const -->
<function name="wxGridCellAttr::GetFont">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxFont &amp;"/>
<use-retval/>
<const/>
</function>
<!-- wxAttrKind wxGridCellAttr::GetKind( void ) -->
<function name="wxGridCellAttr::GetKind">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxAttrKind"/>
<use-retval/>
</function>
<!-- void wxGridCellAttr::GetNonDefaultAlignment( int * hAlign, int * vAlign ) const -->
<function name="wxGridCellAttr::GetNonDefaultAlignment">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="void"/>
<const/>
<arg nr="1" direction="inout">
</arg>
<arg nr="2" direction="inout">
</arg>
</function>
<!-- bool wxGridCellAttr::GetOverflow( void ) const -->
<function name="wxGridCellAttr::GetOverflow">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<use-retval/>
<const/>
</function>
<!-- wxGridCellRenderer * wxGridCellAttr::GetRenderer( const wxGrid * grid, int row, int col ) const -->
<function name="wxGridCellAttr::GetRenderer">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxGridCellRenderer *"/>
<const/>
<arg nr="1" direction="inout">
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
</arg>
</function>
<!-- wxGridCellRendererPtr wxGridCellAttr::GetRendererPtr( const wxGrid * grid, int row, int col ) const -->
<function name="wxGridCellAttr::GetRendererPtr">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxGridCellRendererPtr"/>
<const/>
<arg nr="1" direction="inout">
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
</arg>
</function>
<!-- virtual wxStatusBar* wxFrameBase::CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, const wxString & name = wxStatusBarNameStr)-->
<!-- virtual wxStatusBar* wxFrame::CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, const wxString & name = wxStatusBarNameStr)-->
<function name="wxFrameBase::CreateStatusBar,wxFrame::CreateStatusBar">
Expand Down Expand Up @@ -11601,6 +11691,14 @@
<not-uninit/>
</arg>
</function>
<!-- const wxColour & wxGridCellAttr::GetBackgroundColour( void ) const -->
<function name="wxGridCellAttr::GetBackgroundColour">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxColour &amp;"/>
<use-retval/>
<const/>
</function>
<!-- wxColour wxGrid::GetCellBackgroundColour (int row, int col) const -->
<!-- wxColour wxGrid::GetCellFont (int row, int col) const -->
<function name="wxGrid::GetCellBackgroundColour,wxGrid::GetCellFont">
Expand Down Expand Up @@ -16031,7 +16129,8 @@ wxItemKind kind = wxITEM_NORMAL) -->
<!-- virtual wxString wxTextEntry::GetValue ( ) const -->
<!-- virtual wxString wxTextCtrl::GetStringSelection ( ) const -->
<!-- virtual wxString wxTextCtrl::GetValue ( ) const -->
<function name="wxTextEntry::GetStringSelection,wxTextEntry::GetValue,wxTextCtrl::GetStringSelection,wxTextCtrl::GetValue">
<!-- virtual wxString wxComboBox::GetStringSelection ( ) const -->
<function name="wxTextEntry::GetStringSelection,wxTextEntry::GetValue,wxTextCtrl::GetStringSelection,wxTextCtrl::GetValue,wxComboBox::GetStringSelection">
<noreturn>false</noreturn>
<returnValue type="wxString"/>
<use-retval/>
Expand Down Expand Up @@ -16333,7 +16432,13 @@ wxItemKind kind = wxITEM_NORMAL) -->
</function>
<!-- int wxRect::GetWidth( void ) const -->
<!-- int wxRect::GetHeight( void ) const -->
<function name="wxRect::GetWidth,wxRect::GetHeight">
<!-- int wxRect::GetX( void ) const -->
<!-- int wxRect::GetY( void ) const -->
<!-- int wxRect::GetLeft(void ) const -->
<!-- int wxRect::GetRight( void ) const -->
<!-- int wxRect::GetTop( void ) const -->
<!-- int wxRect::GetBottom( void ) const -->
<function name="wxRect::GetWidth,wxRect::GetHeight,wxRect::GetX,wxRect::GetY,wxRect::GetLeft,wxRect::GetRight,wxRect::GetTop,wxRect::GetBottom">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
Expand All @@ -16349,8 +16454,9 @@ wxItemKind kind = wxITEM_NORMAL) -->
<use-retval/>
<const/>
</function>
<!-- bool wxFrame::Layout( void ) -->
<!-- bool wxWindowBase::Layout( void ) -->
<function name="wxWindowBase::Layout">
<function name="wxWindowBase::Layout,wxFrame::Layout">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
Expand Down Expand Up @@ -16388,4 +16494,43 @@ wxItemKind kind = wxITEM_NORMAL) -->
<use-retval/>
<pure/>
</function>
<!-- wxSize wxRect::GetSize( void ) const -->
<function name="wxRect::GetSize">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxSize"/>
<use-retval/>
<const/>
</function>
<!-- wxPoint wxRect::GetTopLeft( void ) const -->
<!-- wxPoint wxRect::GetTopRight( void ) const -->
<!-- wxPoint wxRect::GetBottomLeft( void ) const -->
<!-- wxPoint wxRect::GetBottomRight( void ) const -->
<!-- wxPoint wxRect::GetRightTop( void ) const -->
<!-- wxPoint wxRect::GetLeftTop( void ) const -->
<!-- wxPoint wxRect::GetPosition( void ) const -->
<!-- wxPoint wxStaticText::GetPosition( void ) const -->
<function name="wxRect::GetTopRight,wxRect::GetBottomLeft,wxRect::GetBottomRight,wxRect::GetTopLeft,wxRect::GetRightTop,wxRect::GetLeftTop,wxStaticText::GetPosition,wxRect::GetPosition">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxPoint"/>
<use-retval/>
<const/>
</function>
<!-- wxTextProofOptions wxTextProofOptions::Default( void ) -->
<function name="wxTextProofOptions::Default">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxTextProofOptions"/>
<use-retval/>
<pure/>
</function>
<!-- wxTextProofOptions wxTextProofOptions::Disable( void ) -->
<function name="wxTextProofOptions::Disable">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxTextProofOptions"/>
<use-retval/>
<pure/>
</function>
</def>
11 changes: 5 additions & 6 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,10 @@ namespace {
};
}

CmdLineParser::CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions, Suppressions &suppressionsNoFail)
CmdLineParser::CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions)
: mLogger(logger)
, mSettings(settings)
, mSuppressions(suppressions)
, mSuppressionsNoFail(suppressionsNoFail)
{}

bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
Expand Down Expand Up @@ -625,7 +624,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
mLogger.printError("couldn't open the file: \"" + filename + "\".");
return Result::Fail;
}
const std::string errmsg(mSuppressionsNoFail.parseFile(f));
const std::string errmsg(mSuppressions.nofail.parseFile(f));
if (!errmsg.empty()) {
mLogger.printError(errmsg);
return Result::Fail;
Expand Down Expand Up @@ -1139,7 +1138,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a

else if (std::strncmp(argv[i], "--suppress=", 11) == 0) {
const std::string suppression = argv[i]+11;
const std::string errmsg(mSuppressions.addSuppressionLine(suppression));
const std::string errmsg(mSuppressions.nomsg.addSuppressionLine(suppression));
if (!errmsg.empty()) {
mLogger.printError(errmsg);
return Result::Fail;
Expand All @@ -1166,7 +1165,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
mLogger.printError(message);
return Result::Fail;
}
const std::string errmsg(mSuppressions.parseFile(f));
const std::string errmsg(mSuppressions.nomsg.parseFile(f));
if (!errmsg.empty()) {
mLogger.printError(errmsg);
return Result::Fail;
Expand All @@ -1175,7 +1174,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a

else if (std::strncmp(argv[i], "--suppress-xml=", 15) == 0) {
const char * filename = argv[i] + 15;
const std::string errmsg(mSuppressions.parseXmlFile(filename));
const std::string errmsg(mSuppressions.nomsg.parseXmlFile(filename));
if (!errmsg.empty()) {
mLogger.printError(errmsg);
return Result::Fail;
Expand Down
6 changes: 2 additions & 4 deletions cli/cmdlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "utils.h"

class Settings;
class Suppressions;
struct Suppressions;
class Library;

/// @addtogroup CLI
Expand All @@ -53,9 +53,8 @@ class CmdLineParser {
* @param settings Settings instance that will be modified according to
* options user has given.
* @param suppressions Suppressions instance that keeps the suppressions
* @param suppressionsNoFail Suppressions instance that keeps the "do not fail" suppressions
*/
CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions, Suppressions &suppressionsNoFail);
CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions);

enum class Result { Success, Exit, Fail };

Expand Down Expand Up @@ -160,7 +159,6 @@ class CmdLineParser {
std::vector<std::string> mIgnoredPaths;
Settings &mSettings;
Suppressions &mSuppressions;
Suppressions &mSuppressionsNoFail;
std::string mVSConfig;
};

Expand Down
Loading

0 comments on commit cc5f3e1

Please sign in to comment.