[PATCH] D98657: [flang][driver] Add options for -Werror
Andrzej Warzynski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 24 08:51:24 PDT 2021
awarzynski added a comment.
I see that `-Werror` changes the behavior of the driver in 5 different places. I would hope to see 5 new tests to verify each case.
================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:353-354
+/// Parses all semantic related arguments and populates the variables
+/// options accordingly.
+static void parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args) {
----------------
Please update
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:67-69
+ if (!ci.parsing().messages().empty() &&
+ (ci.invocation().warnAsErr() ||
+ ci.parsing().messages().AnyFatalError())) {
----------------
Please add a test for this change.
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:102-104
+ if (!ci.parsing().messages().empty() &&
+ (ci.invocation().warnAsErr() ||
+ ci.parsing().messages().AnyFatalError())) {
----------------
Please add a test for this change.
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:116-118
+ if (!ci.parsing().messages().empty() &&
+ (ci.invocation().warnAsErr() ||
+ ci.parsing().messages().AnyFatalError())) {
----------------
Please add a test for this change.
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:273-275
+ if (!ci.parsing().messages().empty() &&
+ (ci.invocation().warnAsErr() ||
+ ci.parsing().messages().AnyFatalError())) {
----------------
Please add a test for this change.
================
Comment at: flang/test/Driver/werror.f90:11-12
+!-----------------------------------------
+! RUN: not %flang_fc1 -Werror %s 2>&1 | FileCheck %s --check-prefix=WITH
+! RUN: %flang_fc1 %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT
+
----------------
Does this work for `f18`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98657/new/
https://reviews.llvm.org/D98657
More information about the cfe-commits
mailing list