[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 06:51:24 PST 2024


Fznamznon wrote:

> Because we [have](https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aclosed+reason%3Acompleted+label%3Acrash%2Ccrash-on-valid%2Ccrash-on-invalid+label%3Aclang%3Afrontend%2Cclang%3Acodegen%2Cclang%3Adiagnostics%2Cclang%3APCH%2Cclang%3Aheaders+-label%3Aduplicate%2Cinvalid%2Cincomplete%2Cwontfix%2Cworksforme) more than a couple of tests that should ensure we don't crash.

Now imagine all these come in without tests because there is no good way to add a test.

Again, not having a good way to make a test shouldn't free people from adding tests.

> It also makes contributors to have more "fun" like @AaronBallman [had](https://github.com/llvm/llvm-project/commit/84a3aadf0f2483dde0acfc4e79f2a075a5f35bd1) no so long ago, updating tons of tests because of his VLA-related change.

I would rather say it is a specific example. VLAs are an extension in C++ for which we choose how to deal with it. Most of the incoming changes are supported by the standards, so we shouldn't ideally expect many drastic changes in diagnostics like this one.

https://github.com/llvm/llvm-project/pull/78898


More information about the cfe-commits mailing list