[all-commits] [llvm/llvm-project] 006519: clang-{tools, unittests}: Stop using SourceManager:...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Wed Oct 14 22:01:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 006519816689acef5fd971955e21b7ab17ae65d9
      https://github.com/llvm/llvm-project/commit/006519816689acef5fd971955e21b7ab17ae65d9
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-10-15 (Thu, 15 Oct 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
    M clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
    M clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
    M clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
    M clang-tools-extra/clangd/ParsedAST.cpp
    M clang-tools-extra/clangd/SemanticHighlighting.cpp
    M clang-tools-extra/clangd/SourceCode.cpp
    M clang-tools-extra/modularize/PreprocessorTracker.cpp
    M clang/tools/clang-diff/ClangDiff.cpp
    M clang/tools/clang-import-test/clang-import-test.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  clang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC

Update clang-tools-extra, clang/tools, clang/unittests to migrate from
`SourceManager::getBuffer`, which returns an always dereferenceable
`MemoryBuffer*`, to `getBufferOrNone` or `getBufferOrFake`, both of
which return a `MemoryBufferRef`, depending on whether the call site was
checking for validity of the buffer. No functionality change intended.

Differential Revision: https://reviews.llvm.org/D89416




More information about the All-commits mailing list