Hi,<br><br>Starting with revision 110175, there was a regression in clang where the return type of the new operator was not marked with noalias when there was an explicit declaration of the new operator. This is a problem since the <new> header explicitly declares the new operator. The <new> header is indirectly including through many other headers including <string> and <iostream>. I have enclosed a patch to add the MallocAttr to the new operator as long as -fassume-sane-operator-new is set.<br>
<br>Here is a simple test case:<br>$ echo -e "#include <string>\nvoid foo(void) { delete[] new int[10]; }" | clang -x c++ - -emit-llvm -S -o - | grep declare.*Znam<br>declare i8* @_Znam(i64)<br><br>after the patch:<br>
$ echo -e "#include <string>\nvoid foo(void) { delete[] new 
int[10]; }" | clang -x c++ - -emit-llvm -S -o - | grep declare.*Znam<br>declare noalias i8* @_Znam(i64)<br><br>Thanks your help.<br><br>Sincerely yours,<br>Tom<br>