Add static assertions for unnecessary VN_IS/VN_AS/VN_CAST

Fail at compile time if the result of these macros can be statically
determined (i.e.: they aways succeed or always fail). Remove unnecessary
casts discovered. No functional change.
This commit is contained in:
Geza Lore
2021-10-22 19:39:24 +01:00
parent 7cb6dc664e
commit 70603bb752
18 changed files with 83 additions and 59 deletions
+1 -1
View File
@@ -359,7 +359,7 @@ private:
// Each inlined cell that contain an interface variable need to
// copy the IfaceRefDType and point it to the newly cloned
// interface cell.
AstIfaceRefDType* newdp = VN_AS(ifacerefp->cloneTree(false), IfaceRefDType);
AstIfaceRefDType* newdp = ifacerefp->cloneTree(false);
nodep->dtypep(newdp);
ifacerefp->addNextHere(newdp);
// Relink to point to newly cloned cell