[clang] [clang][sema] Add nonnull attribute to builtin format functions (PR #158626)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 15 10:51:28 PDT 2025


================
@@ -392,6 +392,10 @@ class Context {
   bool performsCallback(unsigned ID,
                         llvm::SmallVectorImpl<int> &Encoding) const;
 
+  /// Return true if this builtin has parameters at fixed positions
+  /// that must be non-null.
+  bool IsNonNull(unsigned ID, llvm::SmallVectorImpl<int> &Indxs) const;
----------------
Sirraide wrote:

```suggestion
  /// Return true if this builtin has parameters that must be non-null. 
  /// The parameter indices are appended into 'Indxs'.
  bool isNonNull(unsigned ID, SmallVectorImpl<int> &Indxs) const;
```
The other functions here seem to use camelCase, so this one should too for consistency.

https://github.com/llvm/llvm-project/pull/158626


More information about the cfe-commits mailing list