[clang] [clang][Sema] Add fortify warnings for `unistd.h` (PR #161737)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 14:49:03 PDT 2025


================
@@ -12528,9 +12528,12 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
     assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'b'!");
     Type = Context.BoolTy;
     break;
-  case 'z':  // size_t.
-    assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'z'!");
-    Type = Context.getSizeType();
+  case 'z': // size_t and ssize_t.
+    assert(HowLong == 0 && "Bad modifiers for 'z'!");
+    if (Signed)
----------------
shafik wrote:

Are both branches covered in testing? Please specify which test.

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


More information about the cfe-commits mailing list