Use StringRef and ArrayRef where possible. This adds an accessor to the
Args class to get a view of the arguments as ArrayRef<const char *>.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 4355 Build 4355: arc lint + arc unit
Event Timeline
include/lldb/Interpreter/Args.h | ||
---|---|---|
196–197 | can this be written return makeArrayRef(m_argv).drop_back();? | |
source/API/SBDebugger.cpp | ||
1129 | makeArrayRef(categories, len) again seems more readable. | |
source/Core/Log.cpp | ||
74–80 | How about bool exists = llvm::any(entry.second.channel.categories, [&](const Log::Category &c) { return c.name.equals_lower(category); })); if (exists) { ... } | |
unittests/Interpreter/TestArgs.cpp | ||
174 | I'd probably use auto here since the function indicates that it's returning an ArrayRef. I don't feel strongly though. |
can this be written return makeArrayRef(m_argv).drop_back();?