Revision tags: llvmorg-21-init |
|
#
286f8423 |
| 16-Jan-2025 |
Kazu Hirata <kazu@google.com> |
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#123158)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#123158)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T>
Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect AP to be nonnull.
show more ...
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
1e3e199e |
| 27-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Sema] Migrate away from PointerUnion::{is,get} (NFC) (#117498)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_
[Sema] Migrate away from PointerUnion::{is,get} (NFC) (#117498)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
show more ...
|
#
43892205 |
| 22-Nov-2024 |
smanna12 <soumi.manna@intel.com> |
[Clang] Prevent potential null pointer dereferences (#117176)
This commit addresses several null pointer issues identified by static
analysis by replacing dyn_cast<> with cast<> and getAs<> with ca
[Clang] Prevent potential null pointer dereferences (#117176)
This commit addresses several null pointer issues identified by static
analysis by replacing dyn_cast<> with cast<> and getAs<> with castAs<>
in various parts of the Clang codebase. The cast and castAs method is
used to ensure that the type is correctly cast, which helps prevent
potential null pointer dereferences.
Changes:
1. ASTContext.cpp:
Replaced dyn_cast with cast to ensure that the type is correctly cast to
AttributedType.
2. SemaFunctionEffects.cpp:
Replaced getAs with castAs to ensure that the type is correctly cast to
FunctionProtoType.
3. SemaHLSL.cpp:
Replaced getAs with castAs to ensure that the type is correctly cast to
VectorType.
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
39bdf7a9 |
| 19-Nov-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] SemaFunctionEffects: Fix bug where lambdas produced by template expansion weren't verified. (#116505)
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
|
#
dde802b1 |
| 15-Nov-2024 |
Sirraide <aeternalmail@gmail.com> |
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysi
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysis` to inherit from DRAV instead. This is over half of the
visitors that inherit from RAV directly.
See also #115132, #110040, #93462
LLVM Compile-Time Tracker link for this branch:
https://llvm-compile-time-tracker.com/compare.php?from=5adb5c05a2e9f31385fbba8b0436cbc07d91a44d&to=b58e589a86c06ba28d4d90613864d10be29aa5ba&stat=instructions%3Au
show more ...
|
#
3e30b365 |
| 11-Nov-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] SemaFunctionEffects: When verifying a function, ignore any conditional noexcept expression. (#115342)
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
|
#
7f9d348e |
| 05-Nov-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] SemaFunctionEffects: When verifying a function, ignore any trailing `requires` clause. (#114266)
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
|
Revision tags: llvmorg-19.1.3 |
|
#
19aa4c85 |
| 18-Oct-2024 |
Jinsong Ji <jinsong.ji@intel.com> |
[NFC] Fix implicit-fallthrough warnings (#112825)
This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on.
Built by GCC 11.
Fix warnings:
clang/lib/Sema/SemaFunctionEffects.cpp:1
[NFC] Fix implicit-fallthrough warnings (#112825)
This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on.
Built by GCC 11.
Fix warnings:
clang/lib/Sema/SemaFunctionEffects.cpp:1531:5: error: this statement may
fall through [-Werror=implicit-fallthrough=]
1531 | switch (DiffKind) {
| ^~~~~~
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
cef66aa0 |
| 14-Oct-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] Diagnose additional ObjC statements as function effect violations (#112148)
Bug fix: `@autoreleasepool`, `@synchronized`, and `@finally` were not
being noticed and treated as function effec
[Clang] Diagnose additional ObjC statements as function effect violations (#112148)
Bug fix: `@autoreleasepool`, `@synchronized`, and `@finally` were not
being noticed and treated as function effect violations.
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
show more ...
|
#
4d218caa |
| 08-Oct-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] [Sema] Effects: Correctly detect `(x ? a : b)` as nonblocking when a and b are (#111224)
Correctly detect `(x ? a : b)` as nonblocking when `a` and `b` are. Use
`FunctionEffectsRef::get` t
[Clang] [Sema] Effects: Correctly detect `(x ? a : b)` as nonblocking when a and b are (#111224)
Correctly detect `(x ? a : b)` as nonblocking when `a` and `b` are. Use
`FunctionEffectsRef::get` to get to the actual effect set instead of trying
to retrieve it manually via the `FunctionProtoType` as we may have to
look through function pointers etc. in some cases.
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
show more ...
|
#
7fe43ada |
| 03-Oct-2024 |
Doug Wyatt <doug@sonosphere.com> |
[Clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (#99656)
- In Sema, when encountering Decls with function effects needing
verification, add them to a vector, DeclsWith
[Clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (#99656)
- In Sema, when encountering Decls with function effects needing
verification, add them to a vector, DeclsWithEffectsToVerify.
- Update AST serialization to include DeclsWithEffectsToVerify.
- In AnalysisBasedWarnings, use DeclsWithEffectsToVerify as a work
queue, verifying functions with declared effects, and inferring (when
permitted and necessary) whether their callees have effects.
---------
Co-authored-by: Doug Wyatt <dwyatt@apple.com>
Co-authored-by: Sirraide <aeternalmail@gmail.com>
Co-authored-by: Erich Keane <ekeane@nvidia.com>
show more ...
|