[PATCH] D121683: Emit a warning if -xc/-xc++ is after the last input file
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 15 10:35:15 PDT 2022
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:2316
+ if (LastInputArg->getIndex() < LastXArg->getIndex()) {
+ Diag(clang::diag::warn_drv_unused_x) << LastXArg->getValue();
+ }
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
Don’t Use Braces on Simple Single-Statement Bodies of if/else/loop Statements
Is it guaranteed that both LastXArg and LastInputArg will be non-null?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121683/new/
https://reviews.llvm.org/D121683
More information about the cfe-commits
mailing list