Aaron modified cert-err58-cpp to include all exceptions thrown before main()
Update the check to match.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 806 Build 806: arc lint + arc unit
Event Timeline
Comment Actions
Thank you for working on this! I have a few more test cases to try, but I think you're already handling them properly.
test/clang-tidy/cert-static-object-exception.cpp | ||
---|---|---|
29 | We should also have a test for implicitly-provided constructors, since those are noexcept if the data members all have noexcept constructors. Something like: struct Y { S s; }; Y y; // Diagnose struct Z { T t; }; Z z; // Do not diagnose | |
78 | Let's also make sure that we're properly catching conversion operators with a test like: struct UserConv_Bad { operator int() noexcept(false); }; struct UserConv_Good { operator int() noexcept; }; UserConv_Bad some_bad_func(); UserConv_Good some_good_func(); int l = some_bad_func(); // Diagnose int m = some_good_func(); // Do not diagnose |
We should also have a test for implicitly-provided constructors, since those are noexcept if the data members all have noexcept constructors. Something like: