[clang] [clang][dataflow] Add test repro for a crash (PR #128065)

2025-02-20 Thread Jan Voung via cfe-commits
https://github.com/jvoung created https://github.com/llvm/llvm-project/pull/128065 An issue with looking up the "this" when a default init of field2 refers to field1. >From a7002fb5a61c2f6f3c4df2347b6d5f861bf45f8e Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Thu, 20 Feb 2025 19:40:16 +

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -3863,6 +3863,192 @@ TEST_P(UncheckedOptionalAccessTest, ConstBoolAccessorWithModInBetween) { )cc"); } +TEST_P(UncheckedOptionalAccessTest, + ConstRefAccessorToOptionalViaConstRefAccessorToHoldingObject) { + ExpectDiagnosticsFor(R"cc( +#include "unchecked_opti

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -3863,6 +3863,192 @@ TEST_P(UncheckedOptionalAccessTest, ConstBoolAccessorWithModInBetween) { )cc"); } +TEST_P(UncheckedOptionalAccessTest, + ConstRefAccessorToOptionalViaConstRefAccessorToHoldingObject) { + ExpectDiagnosticsFor(R"cc( +#include "unchecked_opti

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE, return; } + // Cache if the const method returns a reference + if (RecordLoc != nullptr && CE->isGLValue()) { +const FunctionDecl *DirectCallee = CE->getDirectCallee(); +if (DirectCallee == nul

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE, return; } + // Cache if the const method returns a reference + if (RecordLoc != nullptr && CE->isGLValue()) { +const FunctionDecl *DirectCallee = CE->getDirectCallee(); +if (DirectCallee == nul

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
https://github.com/jvoung commented: Thanks! https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [dataflow] generalize smart pointer caching (PR #133350)

2025-03-28 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. https://github.com/llvm/llvm-project/pull/133350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] remove unused frontend flag -fretain-subst-template-type-parm-type-ast-nodes (PR #134177)

2025-04-03 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. Please go ahead (need to wait for 1 to 2 weeks) and thanks again for splitting! https://github.com/llvm/llvm-project/pull/134177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] Reland [clang][dataflow] Fix unsupported types always being equal (PR #131575)

2025-04-04 Thread Jan Voung via cfe-commits
jvoung wrote: Hi, just checking if you wanted to merge this, or if there were any other issues. Thanks! https://github.com/llvm/llvm-project/pull/131575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

<    1   2   3