================
@@ -429,6 +430,15 @@ void 
InferAddressSpacesImpl::collectRewritableIntrinsicOperands(
     appendsFlatAddressExpressionToPostorderStack(II->getArgOperand(0),
                                                  PostorderStack, Visited);
     break;
+  case Intrinsic::is_constant: {
+    Value *Ptr = II->getArgOperand(0);
+    if (Ptr->getType()->isPtrOrPtrVectorTy()) {
+      appendsFlatAddressExpressionToPostorderStack(Ptr, PostorderStack,
+                                                   Visited);
+    }
----------------
Artem-B wrote:

> It should never be wrong to include braces.

Having to deal with google style that demands braces everywhere, and LLVM which 
does not want them, my personal choice is "whatever the style guide says". It 
may not always be a perfect choice, but  it's not worth anyone's time to argue 
over specific instances, where the right choice is ambiguous or is a matter of 
personal preference. I wish we could delegate braces/no-braces decisions to 
clang-format, too, but I don't think it currently handles that.

I'd stick with the style guide defaults and either have the braces removed, or 
a comment added to the body. Perhaps, making the function name shorter, and 
avoiding line-wrapping would address your readability concerns about 
braces/no-braces here, too.

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

Reply via email to