added (partial) support for specifying C++23 and support more "-std" options#3212
added (partial) support for specifying C++23 and support more "-std" options#3212danmar merged 9 commits intocppcheck-opensource:mainfrom
Conversation
| } else if (std == "c++20") { | ||
| return Standards::CPP20; | ||
| } else if (std == "c++23") { | ||
| return Standards::CPP20; |
| static cstd_t getC(const std::string &std) { | ||
| if (std == "c89") { | ||
| return Standards::C89; | ||
| } else if (std == "c99") { |
There was a problem hiding this comment.
Nit; I'd rather not write these redundant else.
| cpp = CPP20; | ||
| return true; | ||
| } | ||
| if (str == "c++23" || str == "C++23") { |
There was a problem hiding this comment.
could we lowercase str and reuse getCpp somehow? something like:
stdValue = str;
cpp = getCpp(lower(str));
return cpp != CPPLatest || lower(str) == getCPP();
There was a problem hiding this comment.
Done - but with some slightly different logic
| static cppstd_t getCPP(const std::string &std) { | ||
| if (std == "c++03") { | ||
| return Standards::CPP03; | ||
| } else if (std == "c++11") { |
There was a problem hiding this comment.
Nit; I don't have a strong opinion but would not write these redundant else.
There was a problem hiding this comment.
So does clang-tidy...too hasty copy and paste.
|
The second time the build broke for me since the GUI tests are not being built by CMake - working on a branch where I added at least the building for now. |
|
I would prefer to delay this change: Offering this option might be misleading due to a lack of support of almost feature. |
|
If (hopefully it's "when" at some point) I will return to action I will exclude/disable the UI changes and just keep the internal |
|
I backed out the GUI support. |
|
This also requires changes to simplecpp to work properly. |
|
Will update this after cppcheck-opensource/simplecpp#242 was merged and bumped to this repo which makes things a bit cleaner. |
|
This is again ready for review. To actually use |
|
Demoted to draft again since there's some issues in the preprocessor - pre-existing and introduced by my changes. |
|
This is finally ready for review again. |
No description provided.