hanchenye-llvm-project/clang/unittests
paulhoad 8fa5e98fd1 [clang-format] Remove duplciate code from Invalid BOM detection
Summary:
Review comments on {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)

Reviewers: bruno, arphaman, klimek, owenpan, mitchell-stellar, dexonsmith

Reviewed By: owenpan

Subscribers: cfe-commits

Tags: #clang, #clang-format, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D68914
2019-10-24 20:24:44 +01:00
..
AST Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFC 2019-10-21 17:58:14 +00:00
ASTMatchers Fix the nullPointerConstant() test to get bots back to green. 2019-08-22 18:56:18 +00:00
Analysis [CFG] Introduce CFGElementRef, a wrapper that knows it's position in a CFGBlock 2019-08-14 17:05:55 +00:00
Basic [clang-format] Remove duplciate code from Invalid BOM detection 2019-10-24 20:24:44 +01:00
CodeGen Added 'inline' to functions defined in headers to avoid ODR violations 2019-08-29 16:58:13 +00:00
CrossTU [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
DirectoryWatcher Use ASSERT_THAT_ERROR instead of logAllUnhandledErrors/exit 2019-08-09 06:14:54 +00:00
Driver Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT` 2019-09-28 12:21:06 +00:00
Format [Format] Add format check for throwing negative numbers 2019-10-18 16:59:02 +00:00
Frontend [FrontendTests] Try again to make test not write an output file 2019-10-22 08:44:34 +00:00
Index [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
Lex [clang-scan-deps] Improve string/character literal skipping 2019-10-08 22:42:44 +00:00
Rename cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [LifetimeAnalysis] don't use raw string literals in macros 2019-09-06 19:15:02 +00:00
Serialization cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
StaticAnalyzer [analyzer][NFC] Fix inconsistent references to checkers as "checks" 2019-09-12 19:09:24 +00:00
Tooling [libTooling] Fix r374962: add more Transformer forwarding decls. 2019-10-16 14:26:20 +00:00
libclang [libclang] Fix UninstallAbortingLLVMFatalErrorHandler test 2019-09-12 23:51:48 +00:00
CMakeLists.txt [clang] [unittest] Import LLVMTestingSupport if necessary 2019-09-12 13:06:12 +00:00