(vl-description-add-warning x warning) → new-x
Function:
(defun vl-description-add-warning (x warning) (declare (xargs :guard (and (vl-description-p x) (vl-warning-p warning)))) (declare (xargs :guard (vl-description-has-comments-p x))) (let ((__function__ 'vl-description-add-warning)) (declare (ignorable __function__)) (b* ((x (vl-description-fix x))) (case (tag x) (:vl-module (change-vl-module x :warnings (cons warning (vl-module->warnings x)))) (:vl-udp (change-vl-udp x :warnings (cons warning (vl-udp->warnings x)))) (:vl-interface (change-vl-interface x :warnings (cons warning (vl-interface->warnings x)))) (:vl-package (change-vl-package x :warnings (cons warning (vl-package->warnings x)))) (:vl-program (change-vl-program x :warnings (cons warning (vl-program->warnings x)))) (:vl-class (change-vl-class x :warnings (cons warning (vl-class->warnings x)))) (:vl-config (change-vl-config x :warnings (cons warning (vl-config->warnings x)))) (:vl-typedef (change-vl-typedef x :warnings (cons warning (vl-typedef->warnings x)))) (otherwise (progn$ (impossible) x))))))
Theorem:
(defthm vl-description-p-of-vl-description-add-warning (b* ((new-x (vl-description-add-warning x warning))) (vl-description-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-description->name-of-vl-description-add-warning (equal (vl-description->name (vl-description-add-warning x warning)) (vl-description->name x)))