[all-commits] [llvm/llvm-project] 2d7ad9: [clang][analyzer] Fix error path of builtin overfl...

Pavel Skripkin via All-commits all-commits at lists.llvm.org
Fri Apr 25 16:44:00 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d7ad98ec0a896ce74ef1218cd28e1f6e67477e9
      https://github.com/llvm/llvm-project/commit/2d7ad98ec0a896ce74ef1218cd28e1f6e67477e9
  Author: Pavel Skripkin <paskripkin at gmail.com>
  Date:   2025-04-25 (Fri, 25 Apr 2025)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
    M clang/test/Analysis/builtin_overflow.c
    M clang/test/Analysis/builtin_overflow_notes.c

  Log Message:
  -----------
  [clang][analyzer] Fix error path of builtin overflow (#136345)

According to
https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins,
result of builtin_*_overflow functions will be initialized even in case
of overflow. Align analyzer logic to docs and always initialize 3rd
argument of such builtins.

Closes #136292

(cherry picked from commit 060f9556a2f6ef4669f1c2cd8c4a4d76748a440f)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list