[PATCH] D124974: [clang] Include clang config.h in LangStandards.cpp
Cassie Jones via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 17:03:58 PDT 2022
porglezomp added a comment.
Ah, so it'd be a test that passes pretty trivially on any bot that doesn't have a custom version of `CLANG_DEFAULT_STD_C` and `CLANG_DEFAULT_STD_CXX` like the default config, but could get caught by any other bots that do set it?
What's the best way to get the compiler to report the standard it's using for this test?
For C++ I can do:
clang++ -xc++ -dM -E - < /dev/null | grep cplusplus
And it will print e.g.
#define __cplusplus 199711L
But that requires quite some decoding to compare against `CLANG_DEFAULT_STD_CXX` which would look like `LangStandard::lang_gnucxx98`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124974/new/
https://reviews.llvm.org/D124974
More information about the cfe-commits
mailing list