Repository navigation
verify: Stop a file whose command line has an error, and verify a .h input as C++ - #19
Merged
Merged
Conversation
SwayamInSync
force-pushed
the
fix/input-errors
branch
from
October 14, 2026 08:03
f1ceca7 to
4094d03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A compiler error in a command line was printed and then ignored: the file was verified anyway, under different options than the ones given, and
cpp-verifyexited 0.header.herror: invalid argument '-std=c++17' not allowed with 'C', thenVerified, exit 0Verified, exit 0file.cVerified, exit 0file.cpp -- -fbogus-flagerror: unknown argument, thenVerified, exit 0file.cpp -- -std=c++99error: invalid value 'c++99', thenVerified, exit 0Clang's tooling reports driver and argument errors and goes on (
ToolInvocation::runnever checks them), whereclangstops.cpp-verifynow gives the tool a diagnostics consumer for those errors, and its action factory stops a file whose command line produced one; the frontend still reports with the file's own diagnostic options. A.hfile is compiled as a C++ header, since clang takes it for C.Testing:
suite/input_errors.cppfails on main; removing the header adjustment fails its header case, and letting a file with an argument error run fails the flag case. Verify suite: 398 passed, 1 unsupported.