aengelke wrote: Not sure what Clang does, but the reason is probably that Clang compile-time-evaluates the StringRef constructor (which uses string_view's constexpr strlen-equivalent) a second time.
- `static const llvm::StringRef AttrDoc[]`, no warning - `static constexpr llvm::StringRef AttrDoc[]`, error (not constexpr) - `static constexpr llvm::StringLiteral AttrDoc[]`, fine and also much faster NB: this should use some other way to store strings without dynamic relocs anyway... https://github.com/llvm/llvm-project/pull/246753 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
