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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to