[all-commits] [llvm/llvm-project] 8fa5e9: [clang-format] Remove duplciate code from Invalid ...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Thu Oct 24 12:25:08 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fa5e98fd191d02fc7e0e220d74af267b9140e6a
      https://github.com/llvm/llvm-project/commit/8fa5e98fd191d02fc7e0e220d74af267b9140e6a
  Author: paulhoad <mydeveloperday at gmail.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

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

  Log Message:
  -----------
  [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




More information about the All-commits mailing list