[PATCH] D124434: [Clang][Test] Run tests in C++14 mode explicitly.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 10:15:10 PDT 2022

aaron.ballman added a comment.

In D124434#3480481 <https://reviews.llvm.org/D124434#3480481>, @dblaikie wrote:

> Yeah, I have mixed feelings - I think at least in theory, C++ tries to be mostly backwards compatible and so old tests should run successfully in new language modes - and I guess for the most part they do (even though there's a lot of failures, they're few relative to the total number of language-version-unspecified tests we have, no doubt).

The trouble is, C++ assumes its changes will be backwards compatible, but many proposals are adopted with zero implementation experience, so the difference between theory and practice is getting wider rather than narrower over time. But even setting that aside, Clang adds quite a few things as extensions in older language modes as well, which can sometimes have surprising impacts too when you peg a test to only one standards mode.

> Anyone have a rough sense of what we did the last couple of language default changes? (not necessarily generalizable, as you say, @aaron.ballman - as the release pace has picked up, trying to figure out what's a suitable/sustainable approach now)

The last time we changed was Clang 6.0 and it looks like we did not change tests to add an explicit -std very often (we didn't have to touch many files at all): https://github.com/llvm/llvm-project/commit/36bb6d5d467350fa8056237cde4c5147a82f5938 I think that was the first time we changed the C++ language default.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list