[PATCH] D60247: Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer*

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 14:06:30 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE357724: Make SourceManager::createFileID(UnownedTag, ...) take a const llvm… (authored by nico, committed by ).
Herald added a project: clang.

Changed prior to commit:
  https://reviews.llvm.org/D60247?vs=193655&id=193776#toc

Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60247/new/

https://reviews.llvm.org/D60247

Files:
  clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
  clang-tidy/misc/StaticAssertCheck.cpp


Index: clang-tidy/misc/StaticAssertCheck.cpp
===================================================================
--- clang-tidy/misc/StaticAssertCheck.cpp
+++ clang-tidy/misc/StaticAssertCheck.cpp
@@ -145,7 +145,7 @@
   const LangOptions &Opts = ASTCtx->getLangOpts();
   const SourceManager &SM = ASTCtx->getSourceManager();
 
-  llvm::MemoryBuffer *Buffer = SM.getBuffer(SM.getFileID(AssertLoc));
+  const llvm::MemoryBuffer *Buffer = SM.getBuffer(SM.getFileID(AssertLoc));
   if (!Buffer)
     return SourceLocation();
 
Index: clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
===================================================================
--- clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
+++ clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
@@ -53,7 +53,7 @@
 
   SourceLocation LocEnd = Semicolon->getEndLoc();
   FileID FID = SM.getFileID(LocEnd);
-  llvm::MemoryBuffer *Buffer = SM.getBuffer(FID, LocEnd);
+  const llvm::MemoryBuffer *Buffer = SM.getBuffer(FID, LocEnd);
   Lexer Lexer(SM.getLocForStartOfFile(FID), Ctxt.getLangOpts(),
               Buffer->getBufferStart(), SM.getCharacterData(LocEnd) + 1,
               Buffer->getBufferEnd());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60247.193776.patch
Type: text/x-patch
Size: 1166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190404/5c156114/attachment-0001.bin>


More information about the cfe-commits mailing list