================
@@ -326,24 +326,26 @@ std::vector<const char *>
LanguageFeatureControl::GetNames(
}
void LanguageFeatureControl::WarnOnAllNonstandard(bool yes) {
- warnAllLanguage_ = yes;
+ // This feature is set independently and is on by default:
+ bool clockStrict = warnUsage_.test(UsageWarning::SystemClockStrict);
+
warnLanguage_.reset();
if (yes) {
- disableAllWarnings_ = false;
warnLanguage_.flip();
// These three features do not need to be warned about,
// but we do want their feature flags.
warnLanguage_.set(LanguageFeature::OpenMP, false);
warnLanguage_.set(LanguageFeature::OpenACC, false);
warnLanguage_.set(LanguageFeature::CUDA, false);
}
+
+ // This feature is set independently and is on by default:
+ warnUsage_.set(UsageWarning::SystemClockStrict, clockStrict);
----------------
cenewcombe wrote:
Thanks, Chris. See my additional comment on CompilerInvocation.cpp — I
suggested adding a test for `-std=f2018 -pedantic` to pin down whether
`-pedantic` overrides the `-std=f2018` SYSTEM_CLOCK behavior. I don't feel
strongly either way, but I think it has switched from what you had earlier, so
the comment describing which flags override the warning may no longer be
accurate. Let me know if I'm wrong here though!
https://github.com/llvm/llvm-project/pull/205938
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits