[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 18:10:45 PDT 2024
================
@@ -131,6 +135,12 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) {
return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
}
+inline bool ends_with(std::string const & value, std::string const & ending)
+{
+ if (ending.size() > value.size()) return false;
+ return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
+}
+
----------------
ilovepi wrote:
`ends_with` is a c++20 feature. I believe LLVM is still on C++17 (https://www.llvm.org/docs/CodingStandards.html#c-standard-versions), you can't use the one from the STL, but `SmallString` does, https://llvm.org/doxygen/classllvm_1_1SmallString.html#a6f1b0c312b24ebd6db62d9612a466f46.
https://github.com/llvm/llvm-project/pull/93928
More information about the cfe-commits
mailing list