Author: Benjamin Kramer Date: 2020-06-07T17:22:44+02:00 New Revision: 0c3df70fad83daba2384fab10e026288a9571901
URL: https://github.com/llvm/llvm-project/commit/0c3df70fad83daba2384fab10e026288a9571901 DIFF: https://github.com/llvm/llvm-project/commit/0c3df70fad83daba2384fab10e026288a9571901.diff LOG: Remove global std::string. StringRef is sufficient. NFC. Added: Modified: clang/lib/Analysis/ExprMutationAnalyzer.cpp Removed: ################################################################################ diff --git a/clang/lib/Analysis/ExprMutationAnalyzer.cpp b/clang/lib/Analysis/ExprMutationAnalyzer.cpp index 5e305534c812..e57a425f802d 100644 --- a/clang/lib/Analysis/ExprMutationAnalyzer.cpp +++ b/clang/lib/Analysis/ExprMutationAnalyzer.cpp @@ -73,10 +73,8 @@ const auto isMoveOnly = [] { }; template <class T> struct NodeID; -template <> struct NodeID<Expr> { static const std::string value; }; -template <> struct NodeID<Decl> { static const std::string value; }; -const std::string NodeID<Expr>::value = "expr"; -const std::string NodeID<Decl>::value = "decl"; +template <> struct NodeID<Expr> { static constexpr StringRef value = "expr"; }; +template <> struct NodeID<Decl> { static constexpr StringRef value = "decl"; }; template <class T, class F = const Stmt *(ExprMutationAnalyzer::*)(const T *)> const Stmt *tryEachMatch(ArrayRef<ast_matchers::BoundNodes> Matches, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits