[libcxx-commits] [PATCH] D94530: [libc++] improve feature test macro script
Wim Leflere via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 12 12:15:34 PST 2021
WimLeflere added inline comments.
================
Comment at: libcxx/utils/generate_feature_test_macro_components.py:903
+ std_tests.append(f'#if TEST_STD_VER < {get_std_nr(std_dialects[1])}\n\n' +
+ generate_std_test(test_list, std_dialects[0]))
+
----------------
Quuxplusone wrote:
> I see no obvious reason for the special case here. Sure we //currently// do it as `#if TEST_STD_VER < 14`, but would anything really break if we did it as `#if TEST_STD_VER == 11` instead? It'd be worth trying to find out.
a special case is also needed for `#if` vs `#elif`, so I would keep it
================
Comment at: libcxx/utils/generate_feature_test_macro_components.py:1027
table = [["Macro Name", "Value"]]
- for std in get_std_dialects():
+ for std in get_std_dialects()[1:]:
table += [["**" + std.replace("c++", "C++ ") + "**", ""]]
----------------
Quuxplusone wrote:
> This `[1:]` smells questionable.
If `c++11` is not skipped an empty table section will be generated for `c++11` as it has not macros
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94530/new/
https://reviews.llvm.org/D94530
More information about the libcxx-commits
mailing list