================
@@ -15840,6 +15859,11 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation 
OpLoc,
       InputExpr->getType()->isSpecificBuiltinType(BuiltinType::Dependent)) {
     resultType = Context.DependentTy;
   } else {
+    if (Opc == UO_Deref || Opc == UO_Plus) {
----------------
Sirraide wrote:

It feels a bit weird to use an `if` statement here when there’s a `switch` 
statement on the same variable right after. I’d probably make this a lambda and 
then call it in the cases for `*` and `+` below (the `+` case would then also 
need a `[[fallthrough]]` annotation).

https://github.com/llvm/llvm-project/pull/140702
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to