[PATCH] D131109: [clang][dataflow][NFC] Fix outdated comment on getStableStorageLocation

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 13:19:04 PDT 2022


li.zhe.hua created this revision.
li.zhe.hua added a reviewer: sgatev.
Herald added subscribers: martong, xazax.hun.
Herald added a reviewer: NoQ.
Herald added a project: All.
li.zhe.hua requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Follow-up to D129097 <https://reviews.llvm.org/D129097>.

It is no longer a requirement that the `QualType` passed to to
`DataflowAnalysisContext::getStableStorageLocation()` is not null. A
null type pass as an argument is only applicable as the pointee type
of a `std::nullptr_t` pointer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131109

Files:
  clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h


Index: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
===================================================================
--- clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
+++ clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
@@ -93,9 +93,7 @@
 
   /// Returns a new storage location appropriate for `Type`.
   ///
-  /// Requirements:
-  ///
-  ///  `Type` must not be null.
+  /// A null `Type` is interpreted as the pointee type of `std::nullptr_t`.
   StorageLocation &createStorageLocation(QualType Type);
 
   /// Returns a stable storage location for `D`.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131109.449768.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220803/31f4bc46/attachment.bin>


More information about the cfe-commits mailing list