================ @@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder } void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) { - Visit(OVE->getSourceExpr()); + if (const Expr *SE = OVE->getSourceExpr()) ---------------- bolshakov-a wrote:
Not all `OpaqueValueExpr`s having a source expression are marked as "unique". Checking `isUnique()` instead of `getSourceExpr()` breaks at least handling of the GNU extension of the `?:` operator: ``` 1| 1|int main() { 2| 1| int i = 1; 3| 1| return (i ? 1 : 0) ^0 <-- disappears if isUnique() is used ------------------ | Branch (3:12): [True: 1, False: 0] | Branch (3:13): [True: 1, False: 0] <-- disappears if isUnique() is used ------------------ 4| 1| ?: 10; ^0 5| 1|} ``` https://github.com/llvm/llvm-project/pull/85837 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits