================
@@ -57,7 +57,7 @@ inline raw_ostream &Indent(raw_ostream &o, const unsigned
indent) {
}
inline raw_ostream &EmitPlistHeader(raw_ostream &o) {
- static const char *PlistHeader =
+ constexpr char PlistHeader[] =
----------------
efriedma-quic wrote:
This is copying the string to the stack; the array is a local variable. Please
don't do that. (It might get optimized if you're lucky, but we can't optimize
it in general.)
Maybe just use `const char* PlistHeader`.
I'm adding a comment "Copy to stack." to similar constructs.
https://github.com/llvm/llvm-project/pull/183287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits