================
@@ -94,6 +94,9 @@ void NonConstParameterCheck::check(const 
MatchFinder::MatchResult &Result) {
           markCanNotBeConst(Arg->IgnoreParenCasts(), false);
         }
       }
+    } else if (const auto *NE = dyn_cast<CXXNewExpr>(S)) {
+      for (const auto *Arg : NE->placement_arguments())
+        markCanNotBeConst(Arg->IgnoreParenCasts(), true);
----------------
zwuis wrote:

We should handle this like handling `CallExpr` or `CXXConstructExpr`.

```cpp
// in clang ASTContext.h, omitting parameter names
void *operator new(size_t, const ASTContext &, size_t);
//                         ^ arguments can be const here
```

https://github.com/llvm/llvm-project/pull/207770
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to