r359158 - Fix typo in comment in r312851.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 17:22:12 PDT 2019


Author: rsmith
Date: Wed Apr 24 17:22:11 2019
New Revision: 359158

URL: http://llvm.org/viewvc/llvm-project?rev=359158&view=rev
Log:
Fix typo in comment in r312851.

Thanks to Nico Weber for pointing this out!

Modified:
    cfe/trunk/include/clang/Basic/SourceManager.h

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=359158&r1=359157&r2=359158&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Wed Apr 24 17:22:11 2019
@@ -841,8 +841,8 @@ public:
 
   /// Create a new FileID that represents the specified memory buffer.
   ///
-  /// This does no caching of the buffer and takes ownership of the
-  /// MemoryBuffer, so only pass a MemoryBuffer to this once.
+  /// This does not take ownership of the MemoryBuffer. The memory buffer must
+  /// outlive the SourceManager.
   FileID createFileID(UnownedTag, const llvm::MemoryBuffer *Buffer,
                       SrcMgr::CharacteristicKind FileCharacter = SrcMgr::C_User,
                       int LoadedID = 0, unsigned LoadedOffset = 0,




More information about the cfe-commits mailing list