efriedma added inline comments.

================
Comment at: clang/lib/AST/ItaniumMangle.cpp:1659
       mangleCXXDtorType(Dtor_Complete);
+    assert(ND);
     writeAbiTags(ND, AdditionalAbiTags);
----------------
aaron.ballman wrote:
> This seems incorrect -- if the declaration name is a destructor, then `ND` 
> should always be null, right?
Seems okay to me?  ND is the destructor declaration.


================
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:1806
     // Complex types.
+    assert(contBB);
     CGF.EmitBlock(contBB);
----------------
aaron.ballman wrote:
> Hmmm, is assert the correct approach here? It seems to me that a Complex 
> rvalue will trigger this assertion. I think this deserves some additional 
> thinking rather than silencing the static analysis warning. CC @efriedma 
> @rjmccall who might have ideas.
Yes, if a complex value hit this codepath with a null contBB, it would just 
crash, so the analysis is flagging a real issue.

I'm not sure how to write ObjC code to actually trigger this codepath, though.  
Probably involves a `_Complex _BitInt(128)` or something like that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156274/new/

https://reviews.llvm.org/D156274

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to