[clang] [CIR] Match OGCG noalias and memory effects on operator new (PR #221818)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 06:47:19 PDT 2026


================
@@ -382,8 +382,16 @@ void CIRGenModule::constructAttributeList(
       addAttributesFromFunctionProtoType(
           getBuilder(), attrs, func->getType()->getAs<FunctionProtoType>());
 
-      // TODO(cir): When doing 'return attrs' we need to cover the 'NoAlias' for
-      // global allocation functions here.
+      // A sane operator new returns a non-aliasing pointer. Classic applies
----------------
erichkeane wrote:

Where does this comment come from?  Its in a bizarre voice/not particularly descriptive?

https://github.com/llvm/llvm-project/pull/221818


More information about the cfe-commits mailing list