This is an archive of the discontinued LLVM Phabricator instance.

[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2)
ClosedPublic

Authored by hyeongyukim on Aug 20 2021, 2:50 AM.

Details

Summary

This patch updates test files after D105169.
Autogenerated test codes are changed by utils/update_cc_test_checks.py, and non-autogenerated test codes are changed as follows:

(1) I wrote a python script that (partially) updates the tests using regex:

The script is not perfect, but I believe it gives hints about which patterns are updated to have noundef attached.

(2) The remaining tests are updated manually.

Diff Detail

Event Timeline

hyeongyukim created this revision.Aug 20 2021, 2:50 AM
hyeongyukim requested review of this revision.Aug 20 2021, 2:50 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
hyeongyukim edited the summary of this revision. (Show Details)Aug 20 2021, 2:58 AM

This and D105169 are renewed version of the old patch (D82317).
When pushing to the main branch, I'll commit this and D105169 as a single commit to avoid CI failure.

aqjune updated this revision to Diff 368034.Aug 22 2021, 10:41 PM

Rebase, rename disable-noundef-args to disable-noundef-analysis, remove redundant diffs

aqjune retitled this revision from [Clang/Test]: Enable enable_noundef_analysis as default(2) to [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2).Aug 22 2021, 11:23 PM

Hello all, I'm a messenger of @hyeongyukim's two patches that allow clang to turn on noundef analysis by default.
The motivation and background of these patches are described at https://reviews.llvm.org/D105169#2959464.

Here is a list of tests that has RUN: %clang_cc1 replaced with RUN: %clang_cc1 -disable-noundef-analysis:

They are updated to simply have the -disable-noundef-analysis because of the complicatedness of fixing them.

As described in https://reviews.llvm.org/D105169#2959464, a major concern with turning on this flag is that it requires a lot of tests to be updated, possibly raising conflicts with downstreams.
To avoid this, I'd like to receive requests for tests that need -disable-noundef-analysis. If the directories or tests are specified, I'll simply add the flag to the RUN: command.
This will reduce the opportunity of raising conflicts with downstreams.

kda added a subscriber: kda.Sep 1 2021, 3:14 PM
eugenis accepted this revision.Oct 15 2021, 9:55 AM

LGTM

This revision is now accepted and ready to land.Oct 15 2021, 9:55 AM