[libc-commits] [PATCH] D77281: [libc] Add libc-tidy.
Michael Schellenberger Costa via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Apr 2 04:18:45 PDT 2020
miscco added inline comments.
================
Comment at: libc/utils/LibcTidy/LibcTidyTool.cpp:50
+ StringRef restOfLine = buffer->substr(offset).split('\n').first;
+ if (restOfLine.contains("LIBC-NOLINT"))
+ return true;
----------------
could we shorten that to `return restOfLine.contains("LIBC-NOLINT")`
================
Comment at: libc/utils/LibcTidy/LibcTidyTool.cpp:76
+ // If the call is prefixed with the qualified __llvm_libc:: it's good to go.
+ if (funcDecl->getQualifiedNameAsString().rfind("__llvm_libc::", 0) == 0)
+ return;
----------------
`rfind` searches for the last occurrence of the sub-string. Do you expect multiple qualifiers?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77281/new/
https://reviews.llvm.org/D77281
More information about the libc-commits
mailing list