https://github.com/kinu approved this pull request.
Ah- thanks! I just didn't want to loosen the check too much, but looks like
this wasn't the only condition.
https://github.com/llvm/llvm-project/pull/67311
___
cfe-commits mailing list
cfe-commits@l
https://github.com/kinu created https://github.com/llvm/llvm-project/pull/65645:
We can dump the same information from RecordStorageLocation.
Tested the behavior before and after patch, that generates the field values in
the HTML
in both cases (and also made sure that removing the relevant code
https://github.com/kinu review_requested
https://github.com/llvm/llvm-project/pull/65645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kinu wrote:
@martinboehme @Xazax-hun @ymand if anyone can review this small patch that
removes one more dependency on RecordValue.getLoc()... thanks!
https://github.com/llvm/llvm-project/pull/65645
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/kinu created https://github.com/llvm/llvm-project/pull/65732:
When we call `getEnvironment`, `BlockToState[BlockId]` for the block can return
null even if CFCtx.isBlockReachable(B) returns true if it is called from a
particular block that is marked unreachable to the block.
https://github.com/kinu review_requested
https://github.com/llvm/llvm-project/pull/65732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu review_requested
https://github.com/llvm/llvm-project/pull/65732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -43,7 +43,20 @@ const Environment *StmtToEnvMap::getEnvironment(const Stmt
&S) const {
if (!CFCtx.isBlockReachable(*BlockIt->getSecond()))
return nullptr;
const auto &State = BlockToState[BlockIt->getSecond()->getBlockID()];
- assert(State);
+ if (!(State)) {
+
kinu wrote:
CC @martinboehme @Xazax-hun @ymand
https://github.com/llvm/llvm-project/pull/65732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -121,18 +121,18 @@ static Value *mergeDistinctValues(QualType Type, Value
&Val1,
Value *MergedVal = nullptr;
if (auto *RecordVal1 = dyn_cast(&Val1)) {
-[[maybe_unused]] auto *RecordVal2 = cast(&Val2);
-
-// Values to be merged are always associated with the sam
@@ -121,18 +121,18 @@ static Value *mergeDistinctValues(QualType Type, Value
&Val1,
Value *MergedVal = nullptr;
if (auto *RecordVal1 = dyn_cast(&Val1)) {
-[[maybe_unused]] auto *RecordVal2 = cast(&Val2);
-
-// Values to be merged are always associated with the sam
https://github.com/kinu updated https://github.com/llvm/llvm-project/pull/65732:
>From bc119f4bb478431bf85cda47dbc2a25faa59e85f Mon Sep 17 00:00:00 2001
From: Kinuko Yasuda
Date: Fri, 8 Sep 2023 09:03:35 +
Subject: [PATCH 1/2] [clang][dataflow] Don't crash when BlockToState doesn't
have unr
https://github.com/kinu created https://github.com/llvm/llvm-project/pull/65932:
No one seems to be using transferBlock() in TypeErasedDataflowAnalysis, it is
likely a remnant of old code
>From dc808e4edccdd8d405660729713dd169c87daf71 Mon Sep 17 00:00:00 2001
From: Kinuko Yasuda
Date: Fri, 8
https://github.com/kinu review_requested
https://github.com/llvm/llvm-project/pull/65932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kinu wrote:
Here's the screenshot for a simple code snippet

'Without the patch' image is almost identical
You can see some more screenshots here:
https://docs.google.com/document/d/1g
https://github.com/kinu closed https://github.com/llvm/llvm-project/pull/65932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kinu wrote:
Thanks, closing
https://github.com/llvm/llvm-project/pull/65932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu created https://github.com/llvm/llvm-project/pull/66364:
In C++ it seems it is legit to use base class's operator (e.g. `using
Base::operator=`) to perform copy if the base class is the common ancestor of
the source and destination object. In such a case we shouldn't try
kinu wrote:
@martinboehme @sam-mccall @ymand
appreciated if any of you (or other owners) can review
https://github.com/llvm/llvm-project/pull/66364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/kinu created https://github.com/llvm/llvm-project/pull/66368:
So that the values that are accessed via such accessors can be analyzed as a
limited version of context-sensitive analysis. We can potentially do this only
when some option is set, but doing additional modeling lik
kinu wrote:
/cc @martinboehme @ymand
https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu updated https://github.com/llvm/llvm-project/pull/66368
>From d311f12fe3ca0d30a40e659236ba7eaccda24a8b Mon Sep 17 00:00:00 2001
From: Kinuko Yasuda
Date: Thu, 14 Sep 2023 12:45:04 +
Subject: [PATCH 1/4] [clang][dataflow] Model the fields that are accessed via
inline
@@ -1446,6 +1446,51 @@ TEST(TransferTest, BaseClassInitializer) {
llvm::Succeeded());
}
+TEST(TransferTest, StructModeledFieldsWithAccessor) {
+ std::string Code = R"(
+class S {
+ int *P;
+ int *Q;
+ int X;
+ int Y;
+ int Z;
+public:
+
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -324,6 +336,12 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields,
} else if (auto *E = dyn_cast(&S)) {
insertIfGlobal(*E->getDecl(), Vars);
insertIfFunction(*E->getDecl(), Funcs);
+ } else if (const auto *C = dyn_cast(&S)) {
+// If this is a method t
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -288,6 +288,18 @@ static void insertIfFunction(const Decl &D,
Funcs.insert(FD);
}
+static Expr *getRetValueFromSingleReturnStmtMethod(const CXXMemberCallExpr &C)
{
+ auto *D = cast_or_null(C.getMethodDecl()->getDefinition());
+ if (!D)
+return nullptr;
+ auto *S
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kinu wrote:
Thanks! Addressed comments.
https://github.com/llvm/llvm-project/pull/66368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu edited https://github.com/llvm/llvm-project/pull/65319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu commented:
Thanks, this LGTM (confirmed that it makes it go through with one of the real
code I hit this)
https://github.com/llvm/llvm-project/pull/65319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -121,18 +121,18 @@ static Value *mergeDistinctValues(QualType Type, Value
&Val1,
Value *MergedVal = nullptr;
if (auto *RecordVal1 = dyn_cast(&Val1)) {
-[[maybe_unused]] auto *RecordVal2 = cast(&Val2);
-
-// Values to be merged are always associated with the sam
@@ -121,18 +121,18 @@ static Value *mergeDistinctValues(QualType Type, Value
&Val1,
Value *MergedVal = nullptr;
if (auto *RecordVal1 = dyn_cast(&Val1)) {
-[[maybe_unused]] auto *RecordVal2 = cast(&Val2);
-
-// Values to be merged are always associated with the sam
https://github.com/kinu edited https://github.com/llvm/llvm-project/pull/65319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kinu commented:
Nice! Actual changes are tests only, LGTM (though I'm not a reviewer)
https://github.com/llvm/llvm-project/pull/65586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
kinu wrote:
Would the alternative that is discussed here mean we want to forward some
attributes only when they are applicable, something like
`clang::forwad_lifetimebound`?
Regardless, I think it'd be also good to agree on the use cases we want to
support in a concrete code snippet (that sho
38 matches
Mail list logo