[libcxx-commits] [PATCH] D99789: [libc++] Add fallback standard flags and normalize corresponding feature.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 6 12:15:02 PDT 2021
ldionne added inline comments.
================
Comment at: libcxx/utils/libcxx/test/params.py:57
help="The version of the standard to compile the test suite with.",
- default=lambda cfg: next(s for s in reversed(_allStandards) if hasCompileFlag(cfg, '-std='+s)),
+ default=lambda cfg: getLatestStdFlag(cfg)[1],
actions=lambda std: [
----------------
curdeius wrote:
> The default needs to be `[1]` because we don't want to use `-std=c++20` on the compiler that supports only `-std=c++2a`.
It seems that we don't ever use `getLatestStdFlag(cfg)[0]` anymore, do we?
================
Comment at: libcxx/utils/libcxx/test/params.py:59
actions=lambda std: [
- AddFeature(std),
+ AddFeature(next((s for s, f in reversed(_allStandards.items()) if f == std), std)),
AddCompileFlag('-std={}'.format(std)),
----------------
I don't understand the `if f == std` part -- isn't that always `False`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99789/new/
https://reviews.llvm.org/D99789
More information about the libcxx-commits
mailing list