This is an archive of the discontinued LLVM Phabricator instance.

[clang] Don't generate warn-stack-size when the warning is ignored
ClosedPublic

Authored by kongyi on Aug 24 2021, 11:01 PM.

Details

Summary

8ace12130526 introduced a regression for code that explicitly ignores the -Wframe-larger-than= warning. Make sure we don't generate the warn-stack-size attribute for that case.

Diff Detail

Event Timeline

kongyi created this revision.Aug 24 2021, 11:01 PM
kongyi requested review of this revision.Aug 24 2021, 11:01 PM
MaskRay added inline comments.Aug 24 2021, 11:10 PM
clang/test/Misc/backend-stack-frame-diagnostics-attributes.cpp
5

-c -S = -S

5

Prefer %clang_cc1 for codegen tests.

I know the main test doesn't conform. Just ignore that divergence.

8

-c -S = -S

kongyi updated this revision to Diff 368560.Aug 24 2021, 11:20 PM
kongyi marked 3 inline comments as done.
MaskRay added inline comments.Aug 24 2021, 11:56 PM
clang/test/Misc/backend-stack-frame-diagnostics-attributes.cpp
5

In cc1, the last of -S and -emit-llvm wins. Drop -S. The output is already textual IR.

MaskRay accepted this revision.Aug 24 2021, 11:56 PM
This revision is now accepted and ready to land.Aug 24 2021, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2021, 12:01 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript