@@ -1234,33 +1234,131 @@ Code Completion
1234
1234
1235
1235
Static Analyzer
1236
1236
---------------
1237
- - Fixed a crash when C++20 parenthesized initializer lists are used. This issue
1238
- was causing a crash in clang-tidy. (#GH136041)
1239
1237
1240
1238
New features
1241
1239
^^^^^^^^^^^^
1242
1240
1241
+ - A new flag - `-static-libclosure ` was introduced to support statically linking
1242
+ the runtime for the Blocks extension on Windows. This flag currently only
1243
+ changes the code generation, and even then, only on Windows. This does not
1244
+ impact the linker behaviour like the other `-static-* ` flags.
1245
+ - OpenACC support, enabled via `-fopenacc ` has reached a level of completeness
1246
+ to finally be at least notionally usable. Currently, the OpenACC 3.4
1247
+ specification has been completely implemented for Sema and AST creation, so
1248
+ nodes will show up in the AST after having been properly checked. Lowering is
1249
+ currently a work in progress, with compute, loop, and combined constructs
1250
+ partially implemented, plus a handful of data and executable constructs
1251
+ implemented. Lowering will only work in Clang-IR mode (so only with a compiler
1252
+ built with Clang-IR enabled, and with `-fclangir ` used on the command line).
1253
+ However, note that the Clang-IR implementation status is also quite partial,
1254
+ so frequent 'not yet implemented' diagnostics should be expected. Also, the
1255
+ ACC MLIR dialect does not currently implement any lowering to LLVM-IR, so no
1256
+ code generation is possible for OpenACC.
1257
+ - Implemented `P2719R5 Type-aware allocation and deallocation functions <https://wg21.link/P2719 >`_
1258
+ as an extension in all C++ language modes.
1259
+
1260
+ - Added support for the ``[[clang::assume(cond)]] `` attribute, treating it as
1261
+ ``__builtin_assume(cond) `` for better static analysis. (#GH129234)
1262
+
1263
+ - Introduced per-entry-point statistics to provide more detailed analysis metrics.
1264
+ Documentation: :doc: `analyzer/developer-docs/Statistics ` (#GH131175)
1265
+
1266
+ - Added time-trace scopes for high-level analyzer steps to improve performance
1267
+ debugging. Documentation: :doc: `analyzer/developer-docs/PerformanceInvestigation `
1268
+ (#GH125508, #GH125884)
1269
+
1270
+ - Enhanced the ``check::BlockEntrance `` checker callback to provide more granular
1271
+ control over block-level analysis.
1272
+ `Documentation (check::BlockEntrance)
1273
+ <https://clang.llvm.org/doxygen/CheckerDocumentation_8cpp_source.html> `_
1274
+ (#GH140924)
1275
+
1276
+ - Added a new checker ``core.FixedAddressDereference `` to detect dereferences
1277
+ of fixed addresses, which can be useful for finding hard-coded memory
1278
+ accesses. (#GH127191, #GH132404)
1279
+
1243
1280
Crash and bug fixes
1244
1281
^^^^^^^^^^^^^^^^^^^
1245
1282
1246
- - Fixed a crash in ``UnixAPIMisuseChecker `` and ``MallocChecker `` when analyzing
1283
+ - Fixed a crash when C++20 parenthesized initializer lists are used.
1284
+ This affected a crash of the well-known lambda overloaded pattern.
1285
+ (#GH136041, #GH135665)
1286
+
1287
+ - Dropped an unjustified assertion, that was triggered in ``BugReporterVisitors.cpp ``
1288
+ for variable initialization detection. (#GH125044)
1289
+
1290
+ - Fixed a crash in ``unix.API `` and ``unix.Malloc `` when analyzing
1247
1291
code with non-standard ``getline `` or ``getdelim `` function signatures. (#GH144884)
1248
1292
1293
+ - Fixed crashes involving ``__builtin_bit_cast ``. (#GH139188)
1294
+
1295
+ - ``__datasizeof `` (C++) and ``_Countof `` (C) no longer cause a failed assertion
1296
+ when given an operand of VLA type. (#GH151711)
1297
+
1298
+ - Fixed a crash in ``alpha.core.CastSize ``. (#GH134387)
1299
+
1300
+ - Some ``cplusplus.PlacementNew `` false positives were fixed. (#GH150161)
1301
+
1249
1302
Improvements
1250
1303
^^^^^^^^^^^^
1251
1304
1305
+ - Added option to assume at least one iteration in loops to reduce false positives.
1306
+ (#GH125494)
1307
+
1252
1308
- The checker option ``optin.cplusplus.VirtualCall:PureOnly `` was removed,
1253
- because it had been deprecated since 2019 and it is completely useless (it
1254
- was kept only for compatibility with pre-2019 versions, setting it to true is
1255
- equivalent to completely disabling the checker).
1309
+ because it had been deprecated since 2019. (#GH131823)
1310
+
1311
+ - Enhanced the ``core.StackAddressEscape `` to detect more cases of stack address
1312
+ escapes, including return values for child stack frames. (#GH126620, #GH126986)
1313
+
1314
+ - Improved the ``unix.BlockInCriticalSection `` to recognize ``O_NONBLOCK ``
1315
+ streams and suppress reports in those cases. (#GH127049)
1316
+
1317
+ - Better support for lambda-converted function pointers in analysis. (#GH144906)
1318
+
1319
+ - Improved modeling of ``getcwd `` function in ``unix.StdCLibraryFunctions `` checker.
1320
+ (#GH141076)
1321
+
1322
+ - Enhanced the ``optin.core.EnumCastOutOfRange `` checker to ignore ``[[clang::flag_enum]] ``
1323
+ enums. (#GH141232)
1324
+
1325
+ - Improved handling of structured bindings captured by lambdas. (#GH132579, #GH91835)
1326
+
1327
+ - Fixed unnamed bitfield handling in ``optin.cplusplus.UninitializedObject ``. (#GH132427, #GH132001)
1328
+
1329
+ - Enhanced iterator checker modeling for ``insert `` operations. (#GH132596)
1330
+
1331
+ - Improved ``format `` attribute handling in ``optin.taint.GenericTaint ``. (#GH132765)
1332
+
1333
+ - Added support for ``consteval `` in ``ConditionBRVisitor::VisitTerminator ``.
1334
+ (#GH146859, #GH139130)
1335
+
1336
+ - C standard streams are no longer invalidated by all C library function calls.
1337
+ (#GH147766)
1338
+
1339
+ - Enhanced store management with region-store-binding-limit to improve performance.
1340
+ See `region-store-max-binding-fanout
1341
+ <https://clang.llvm.org/docs/analyzer/user-docs/Options.html#region-store-max-binding-fanout> `_
1342
+ config option. Overriding these options are discouraged, unless you know what you do.
1343
+ (#GH127602)
1344
+
1345
+ - Updated undefined assignment checker (``core.uninitialized.Assign ``) diagnostics
1346
+ to avoid using the term ``garbage ``. (#GH126596)
1347
+
1348
+ - Fixed false memory leak reports involving placement new. (#GH144341)
1349
+
1350
+ - Avoided unnecessary super region invalidation in ``unix.cstring.* `` checkers.
1351
+ (#GH146212, #GH143807)
1352
+
1353
+ - Enhanced handling of tainted division-by-zero error paths in the
1354
+ ``optin.taint.TaintedDiv `` checker. (#GH144491)
1256
1355
1257
1356
Moved checkers
1258
1357
^^^^^^^^^^^^^^
1259
1358
1260
- - After lots of improvements, the checker ``alpha.security.ArrayBoundV2 `` is
1359
+ - After lots of improvements, the checker ``alpha.security.ArrayBoundV2 `` was
1261
1360
renamed to ``security.ArrayBound ``. As this checker is stable now, the old
1262
- checker ``alpha.security.ArrayBound `` (which was searching for the same kind
1263
- of bugs with an different, simpler and less accurate algorithm) is removed.
1361
+ checker ``alpha.security.ArrayBound `` was removed.
1264
1362
1265
1363
.. _release-notes-sanitizers :
1266
1364
0 commit comments