Should I standardize the use of %clang_analyze_cc1 instead of %clang_cc1 -analyze?
Yes. Thanks.
I dug into the Python scripts that manage the execution of these lit tests, and I realized that %clang_cc1 -analyze
is not completely equivalent to %clang_analyze_cc1
because %clang_analyze_cc1
expands to %clang_cc1 -analyze %analyze
and then later the logic in clang/test/Analysis/analyzer_test.py
will replace %analyze
with either “-analyzer-constraints=range
” or “-analyzer-constraints=z3 -DANALYZER_CM_Z3
”. (So if the test uses %clang_cc1 -analyze
, this range-or-z3 logic wouldn’t work.)