Skip to content

Commit 65a8978

Browse files
dyungyuxuanchen1997
authored andcommitted
Revert "[Clang][Driver] Warn about -c/-S with -fsyntax-only" (#100052)
Reverts #98607 The test added was failing on some build bots: - https://lab.llvm.org/buildbot/#/builders/144/builds/2918 - https://lab.llvm.org/buildbot/#/builders/46/builds/2069
1 parent 594df9d commit 65a8978

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,10 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
794794
Args.hasArg(options::OPT_coverage))
795795
FProfileDir = Args.getLastArg(options::OPT_fprofile_dir);
796796

797+
// TODO: Don't claim -c/-S to warn about -fsyntax-only -c/-S, -E -c/-S,
798+
// like we warn about -fsyntax-only -E.
799+
(void)(Args.hasArg(options::OPT_c) || Args.hasArg(options::OPT_S));
800+
797801
// Put the .gcno and .gcda files (if needed) next to the primary output file,
798802
// or fall back to a file in the current directory for `clang -c --coverage
799803
// d/a.c` in the absence of -o.

clang/test/Driver/warn-fsyntax-only.c

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)