Page MenuHomePhabricator

[Attributor] Fix qualifier warning of the unittest
ClosedPublic

Authored by bbn on Jul 24 2020, 7:15 AM.

Details

Summary

This patch fixes the warning of casting away qualifiers.

Diff Detail

Event Timeline

bbn created this revision.Jul 24 2020, 7:15 AM
Herald added a reviewer: uenoku. · View Herald Transcript
Herald added a reviewer: homerdin. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
kuter added inline comments.Jul 24 2020, 8:25 PM
llvm/unittests/Transforms/IPO/AttributorTest.cpp
46–47

I think this should be a C++ cast.

bbn updated this revision to Diff 280655.Jul 24 2020, 8:41 PM

use C++ cast

bbn marked an inline comment as done.Jul 24 2020, 8:41 PM

Why do you need the cast anyway:

const AbstractAttribute *AA = &A.getOrCreateAAFor<AAIsDead>(IRPosition::function(*F))

should do fine, does it not?

bbn updated this revision to Diff 280767.Jul 26 2020, 6:57 PM

remove the cast.

This revision is now accepted and ready to land.Jul 27 2020, 5:47 AM
This revision was automatically updated to reflect the committed changes.