summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/overridevirtual.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/overridevirtual.cxx')
-rw-r--r--compilerplugins/clang/overridevirtual.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/overridevirtual.cxx b/compilerplugins/clang/overridevirtual.cxx
index 8dd29ab0e426..b7fd2ce4d9cc 100644
--- a/compilerplugins/clang/overridevirtual.cxx
+++ b/compilerplugins/clang/overridevirtual.cxx
@@ -16,6 +16,7 @@
#include "clang/AST/Attr.h"
+#include "compat.hxx"
#include "plugin.hxx"
namespace {
@@ -94,7 +95,7 @@ bool OverrideVirtual::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
// where "\<NL>" is followed directly by a real token without
// intervening whitespace, tokens "\<NL>virtual" and "\<NL>{" are
// reported:
- if (s.startswith("\\\n")) {
+ if (compat::starts_with(s, "\\\n")) {
s = s.drop_front(2);
}
if (parens == 0) {
@@ -120,7 +121,7 @@ bool OverrideVirtual::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
addSpace = false;
}
seenSpace = true;
- } else if (s.startswith("/*") || s.startswith("//") || s == "\\") {
+ } else if (compat::starts_with(s, "/*") || compat::starts_with(s, "//") || s == "\\") {
if (!seenSpace) {
addSpace = true;
}