[PATCH] D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang
Gui Andrade via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 16:09:00 PST 2020
guiand added a comment.
This whole thing is a little unfortunate, but maybe a better substitution would be leaving `%clang` as referring to the pure clang binary, with default arguments. Then we can have a `%clang_cc` which may only be used for a standard C compiler invocation.
Returning to the main issue, adding a default argument to `%clang` breaks a number of tests. Generally these tests change the compiler mode such that a C compiler argument makes no sense. Consider `%clang -cc1`: this gets expanded to `clang -Xclang -disable-noundef-analysis -cc1`, which IIRC causes an error.
This isn't a problem with something like `%clang_cc`, because a C compiler flag would always be valid for that expansion.
IMO it's better to just one-and-done programatically add `-Xclang -disable-noundef-analysis` to all the tests' RUN lines. That way there are no hidden flags.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85788/new/
https://reviews.llvm.org/D85788
More information about the llvm-commits
mailing list