teak-llvm/clang/lib/Basic
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
..
Targets Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFC 2019-10-21 17:58:14 +00:00
Attributes.cpp Move some definitions from Sema to Basic to fix shared libs build 2019-09-16 13:58:59 +00:00
Builtins.cpp
CharInfo.cpp
CMakeLists.txt Improve behavior in the case of stack exhaustion. 2019-08-26 18:18:07 +00:00
CodeGenOptions.cpp
Cuda.cpp [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 2019-07-11 17:50:09 +00:00
Diagnostic.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
DiagnosticIDs.cpp Use a unique_ptr instead of manual memory management for CustomDiagInfo 2019-07-15 17:20:34 +00:00
DiagnosticOptions.cpp
FileManager.cpp [Stats] Convert some ad-hoc header search stats to ALWAYS_ENABLED_STATISTIC. 2019-10-11 18:22:34 +00:00
FileSystemStatCache.cpp
FixedPoint.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
IdentifierTable.cpp [Sema][ObjC] Fix a -Wformat false positive with localizedStringForKey 2019-08-14 16:57:11 +00:00
LangOptions.cpp
LangStandards.cpp Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
Module.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
ObjCRuntime.cpp
OpenMPKinds.cpp [OPENMP50]Add support for master taskloop simd. 2019-10-18 16:47:35 +00:00
OperatorPrecedence.cpp
SanitizerBlacklist.cpp
Sanitizers.cpp
SanitizerSpecialCaseList.cpp
SourceLocation.cpp
SourceManager.cpp [clang-format] Remove duplciate code from Invalid BOM detection 2019-10-24 20:24:44 +01:00
Stack.cpp [msvc] Add necessary #include to make compiler intrinsics available. 2019-08-26 18:33:15 +00:00
TargetInfo.cpp Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFC 2019-10-21 17:58:14 +00:00
Targets.cpp [RISCV] Add FreeBSD targets 2019-08-01 13:14:30 +00:00
Targets.h De-templatize non-dependent VS macro logic, NFC 2019-07-09 20:57:28 +00:00
TokenKinds.cpp Use switch instead of series of comparisons 2019-08-03 16:32:49 +00:00
Version.cpp This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. 2019-07-13 06:27:35 +00:00
Warnings.cpp
XRayInstr.cpp
XRayLists.cpp