[PATCH] D68914: [clang-format] Remove duplciate code from Invalid BOM detection

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 12 09:41:34 PDT 2019


MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: bruno, arphaman, klimek, owenpan, mitchell-stellar, dexonsmith.
MyDeveloperDay added projects: clang, clang-format, clang-tools-extra.

Review comments on D68767: [clang-format] NFC - Move functionality into functions to help code structure <https://reviews.llvm.org/D68767> asked that this duplicated code in clang-format was moved to one central location that being SourceManager (where it had originally be copied from I assume)

Moved function into static function  ContentCache::getInvalidBOM(...)  - (closest class to where it was defined before)
Updated clang-format to call this static function

Added unit tests for said new function in BasicTests

Sorry not my normal code area so may have the wrong reviewers. (but your names were on the recent history)


Repository:
  rC Clang

https://reviews.llvm.org/D68914

Files:
  clang/include/clang/Basic/SourceManager.h
  clang/lib/Basic/SourceManager.cpp
  clang/tools/clang-format/ClangFormat.cpp
  clang/unittests/Basic/SourceManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68914.224752.patch
Type: text/x-patch
Size: 7291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191012/1ea5a62b/attachment-0001.bin>


More information about the cfe-commits mailing list