[PATCH] D124434: [Clang][Test] Run tests in C++14 mode explicitly.
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 12:54:17 PDT 2022
dblaikie added a comment.
In D124434#3480519 <https://reviews.llvm.org/D124434#3480519>, @aaron.ballman wrote:
> 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.
Sure enough, yeah.
I guess coming back to your other point about restructing the way all this testing works (be a pity to gate the default change on this work as it sounds like a big project) - yeah, it'd be nice to be able to declare a test as "language version neutral" or "in this version and above" (or, I guess "only in these versions and no others") - and have some mode in the lit build that can then handle running it in all known versions - and maybe the developer default could be "run in the most recent shipped version only" for speed (if the speed is noticable) and leave it to buildbots to run in all the language versions.
>> 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.
Hmm, fair enough - not a lot to generalize from, then. (gees, I'm surprised that was only 5 years ago that we switched from the `98 default... )
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits