[clang] 54d24ea - [clang][dataflow][NFC] Fix outdated comment on getStableStorageLocation

Eric Li via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 08:15:27 PDT 2022


Author: Eric Li
Date: 2022-08-04T11:15:14-04:00
New Revision: 54d24eae98726e37867bc3a683cd58af6ec128df

URL: https://github.com/llvm/llvm-project/commit/54d24eae98726e37867bc3a683cd58af6ec128df
DIFF: https://github.com/llvm/llvm-project/commit/54d24eae98726e37867bc3a683cd58af6ec128df.diff

LOG: [clang][dataflow][NFC] Fix outdated comment on getStableStorageLocation

Follow-up to 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.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
index a31e08fd16c48..ab60d313f242c 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
@@ -93,9 +93,7 @@ class DataflowAnalysisContext {
 
   /// 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`.


        


More information about the cfe-commits mailing list