[PATCH] D68914: [clang-format] Remove duplciate code from Invalid BOM detection
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 12 17:35:57 PDT 2019
owenpan added inline comments.
================
Comment at: clang/include/clang/Basic/SourceManager.h:232
+ // nullptr
+ static const char *getInvalidBOM(StringRef BufStr);
};
----------------
Can you make the parameter `const`?
================
Comment at: clang/lib/Basic/SourceManager.cpp:98
+const char *ContentCache::getInvalidBOM(StringRef BufStr) {
+ // If the buffer is valid, check to see if it has a UTF Byte Order Mark
----------------
Add `const` to the parameter to be more precise?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68914/new/
https://reviews.llvm.org/D68914
More information about the cfe-commits
mailing list