This is an archive of the discontinued LLVM Phabricator instance.

[clang, test] Fix use of undef FileCheck var
ClosedPublic

Authored by thopre on Apr 5 2021, 1:42 PM.

Details

Summary

Clang test CodeGen/libcalls.c contains CHECK-NOT directives using a
variable defined in a CHECK directive with a different prefix never
enabled together, therefore causing the variable to be undefined in that
CHECK-NOT.

The intent of the test is to check that some declaration do not have the
same attribute as when compiling the test without -fmath-errno. This
commits instead changes all CHECK-NOT to CHECK directive, checking that
they all use the same attribute. It also adds an extra CHECK for that
prefix to check the expected attributes these functions should have when
compiling with -fmath-errno.

Diff Detail

Event Timeline

thopre requested review of this revision.Apr 5 2021, 1:42 PM
thopre created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2021, 1:42 PM
Herald added a subscriber: wdng. · View Herald Transcript
spatel added inline comments.Apr 6 2021, 5:37 AM
clang/test/CodeGen/libcalls.c
128

Can we use a positive CHECK for the expected attributes instead?

thopre updated this revision to Diff 335618.Apr 6 2021, 12:03 PM

Change attribute check to a positive match

thopre edited the summary of this revision. (Show Details)Apr 6 2021, 12:04 PM
thopre marked an inline comment as done.

NUW_RN isn't a good name for the variable in this alternative since it's not readnone anymore. With an appropriate rename, LGTM.

thopre updated this revision to Diff 335640.Apr 6 2021, 1:12 PM

Rename NUW_RN for CHECK-YES to NUW

rjmccall accepted this revision.Apr 6 2021, 2:16 PM

Thanks!

This revision is now accepted and ready to land.Apr 6 2021, 2:16 PM
This revision was automatically updated to reflect the committed changes.