https://github.com/Xazax-hun approved this pull request.
LG, thanks!
https://github.com/llvm/llvm-project/pull/160751
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/160725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
cc., @steakhal , @necto , @NagyDonat , you might want to run some benchmarks
with this patch applied to see if there is a measurable impact on the Clang
Static Analyzer.
https://github.com/llvm/llvm-project/pull/159845
___
cfe-commi
Xazax-hun wrote:
Did we only have this issue with the sets? Are the maps fine?
https://github.com/llvm/llvm-project/pull/159845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
LG, thanks!
https://github.com/llvm/llvm-project/pull/159845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun created
https://github.com/llvm/llvm-project/pull/157506
Swift supports a strictly memory safe mode where every expressions using an
unsafe feature or API need to be annotatated with the unsafe effect. This
sometimes requires adding safety annotations to the foreig
@@ -291,6 +292,13 @@ static void ProcessAPINotes(Sema &S, Decl *D,
});
}
+ // swift_safety
+ if (auto SafetyKind = Info.getSwiftSafety();
+ SafetyKind != api_notes::SwiftSafetyKind::None)
+D->addAttr(SwiftAttrAttr::Create(
+S.Context,
+Safe
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/159164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun closed
https://github.com/llvm/llvm-project/pull/157506
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
> Is there any piece specifically you have in mind.
The very least, there are a list of helper functions that I believe could be
shared and greatly improve the consistency between the two analysis. Including:
* `shouldTrackFirstArgumentForConstructor`
* `isCopyLikeConstructor`
https://github.com/Xazax-hun updated
https://github.com/llvm/llvm-project/pull/157506
From 1fd3a7966a2873ebc482a569f4ce04ffdb10ed99 Mon Sep 17 00:00:00 2001
From: Gabor Horvath
Date: Mon, 8 Sep 2025 17:21:45 +0100
Subject: [PATCH] [APINotes] Support annotating safety of APIs
Swift supports a s
https://github.com/Xazax-hun commented:
The Clang Static Analyzer change looks good to me.
https://github.com/llvm/llvm-project/pull/158381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
@@ -291,6 +292,13 @@ static void ProcessAPINotes(Sema &S, Decl *D,
});
}
+ // swift_safety
+ if (auto SafetyKind = Info.getSwiftSafety();
+ SafetyKind != api_notes::SwiftSafetyKind::None)
+D->addAttr(SwiftAttrAttr::Create(
+S.Context,
+Safe
@@ -291,6 +292,13 @@ static void ProcessAPINotes(Sema &S, Decl *D,
});
}
+ // swift_safety
+ if (auto SafetyKind = Info.getSwiftSafety();
+ SafetyKind != api_notes::SwiftSafetyKind::None)
+D->addAttr(SwiftAttrAttr::Create(
+S.Context,
+Safe
https://github.com/Xazax-hun updated
https://github.com/llvm/llvm-project/pull/157506
From 1fd3a7966a2873ebc482a569f4ce04ffdb10ed99 Mon Sep 17 00:00:00 2001
From: Gabor Horvath
Date: Mon, 8 Sep 2025 17:21:45 +0100
Subject: [PATCH] [APINotes] Support annotating safety of APIs
Swift supports a s
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157800
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun updated
https://github.com/llvm/llvm-project/pull/157506
From 09a1cc08019ffc336609aa2909565baf775129bb Mon Sep 17 00:00:00 2001
From: Gabor Horvath
Date: Mon, 8 Sep 2025 17:21:45 +0100
Subject: [PATCH] [APINotes] Support annotating safety of APIs
Swift supports a s
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157685
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -99,6 +99,9 @@ void ReadCommonEntityInfo(const uint8_t *&Data,
CommonEntityInfo &Info) {
Info.UnavailableInSwift = UnavailableBits & 0x01;
if ((UnavailableBits >> 2) & 0x01)
Info.setSwiftPrivate(static_cast((UnavailableBits >> 3) & 0x01));
+ if ((UnavailableBits >>
https://github.com/Xazax-hun updated
https://github.com/llvm/llvm-project/pull/157506
From dc0959442a82f8d449eea27ddc7ff86347221b97 Mon Sep 17 00:00:00 2001
From: Gabor Horvath
Date: Mon, 8 Sep 2025 17:21:45 +0100
Subject: [PATCH] [APINotes] Support annotating safety of APIs
Swift supports a s
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/157645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -90,8 +90,8 @@ namespace {
if (A.isEmpty())
return B;
-for (typename SET::iterator it = B.begin(), ei = B.end(); it != ei; ++it) {
- A = A.add(*it);
+for (const auto &element : B) {
Xazax-hun wrote:
We have pointers in these sets. Ma
@@ -556,8 +554,47 @@ class FactGeneratorVisitor : public
ConstStmtVisitor {
return false;
}
+ void handleAssignment(const Expr *LHSExpr, const Expr *RHSExpr) {
+// Find the underlying variable declaration for the left-hand side.
+if (const auto *DRE_LHS =
+
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/154316
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
This is very clean now, thanks!
https://github.com/llvm/llvm-project/pull/153661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
Xazax-hun wrote:
One last question, I am sort of wondering if working on a CFG with
`AC.getCFGBuildOptions().setAllAlwaysAdd();` would make this simpler. Would
that have the properties we want?
https://github.com/llvm/llvm-project/pull/153661
___
c
@@ -403,29 +404,17 @@ class FactManager {
llvm::BumpPtrAllocator FactAllocator;
};
-class FactGenerator : public ConstStmtVisitor {
- using Base = ConstStmtVisitor;
+class FactGeneratorVisitor : public ConstStmtVisitor {
+ using Base = ConstStmtVisitor;
public:
- FactG
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/153661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun closed
https://github.com/llvm/llvm-project/pull/150952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
Feel free to merge this once the CI is green.
https://github.com/llvm/llvm-project/pull/150952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/154575
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
Thanks!
I have one more question. So we need the reverse post order property of the CFG
to ensure that we visit everything in the right order. The only reason why I am
a bit unsure here, is because I wonder if it can ever cause some trouble that
the RAV visiting the subexpre
Xazax-hun wrote:
Thanks! I am not actually sure if this one is simpler than the original
version. Sorry about that. I don't have a strong feeling which one to pick. I
guess the complexity here is an inevitable consequence of our CFGs being just
an overlay on top of the AST and it is not entire
https://github.com/Xazax-hun approved this pull request.
LG, thanks!
https://github.com/llvm/llvm-project/pull/149731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
> The RAV would still need to maintain a Visited set
Could you elaborate on why?
> WDYT about this alternative of using a RAV driver ?
Hmm, there is a change that this could be a bit simpler than the current
solution. If you can give this a try to see where does that lead it
Xazax-hun wrote:
We started to see a CI failure around the time this PR landed in
https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-Rthinlto/1079/
The build hangs in this step (using a stage 2 compiler):
```
12:39:17 [384/5387] : &&
DYLD_LIBRARY_PATH=/Users/ec2-user/jenkins/workspace/l
@@ -723,17 +772,14 @@ join(llvm::ImmutableMap A, llvm::ImmutableMap
B,
// = //
using OriginLoanMap = llvm::ImmutableMap;
+using ExpiredLoanMap = llvm::ImmutableMap;
Xazax-hun wrote:
I am
@@ -861,26 +911,29 @@ class ExpiredLoansAnalysis
: public DataflowAnalysis {
- LoanSet::Factory &Factory;
+ ExpiredLoanMap::Factory &Factory;
public:
ExpiredLoansAnalysis(const CFG &C, AnalysisDeclContext &AC, FactManager &F,
LifetimeFactory
https://github.com/Xazax-hun commented:
Overall looks good, I only have a couple questions around determinism.
https://github.com/llvm/llvm-project/pull/149731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
@@ -0,0 +1,253 @@
+// RUN: %clang_cc1 -fsyntax-only -fexperimental-lifetime-safety
-Wexperimental-lifetime-safety -verify %s
+
+struct MyObj {
+ int id;
+ ~MyObj() {} // Non-trivial destructor
+ MyObj operator+(MyObj);
+};
+
+//===-
@@ -912,24 +965,129 @@ class ExpiredLoansAnalysis
Lattice transfer(Lattice In, const IssueFact &F) {
return Lattice(Factory.remove(In.Expired, F.getLoanID()));
}
+
+ ExpiredLoanMap getExpiredLoans(ProgramPoint P) { return getState(P).Expired;
}
};
// =
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/149731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun closed
https://github.com/llvm/llvm-project/pull/153261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/151035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/152850
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -140,6 +140,15 @@ class DataflowAnalysisContext {
/// Adds `Constraint` to the flow condition identified by `Token`.
void addFlowConditionConstraint(Atom Token, const Formula &Constraint);
+ /// Adds `Deps` to the dependencies of the flow condition identified by
+ ///
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() {
isOptionalMemberCallWithNameMatcher(hasName("isNull")),
transferOptionalIsNullCall)
+ // NullableValue::makeValue, NullableValue::makeValueInplace
+ // Only NullableValue has these methods, bu
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/151908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
> The rationale being that a user typically cannot change the contents of a
> system macro anyway.
This is not always true, e.g., when it comes to macros with arguments. I am
mostly interested in the scenario where someone has something like:
```
SYSTEM_HEADER_MACRO(UserCode)
@@ -105,6 +105,10 @@ Improvements to clang-tidy
now run checks in parallel by default using all available hardware threads.
Both scripts display the number of threads being used in their output.
+- :program:`clang-tidy` no longer attemps to analyze code from system headers
@@ -1507,11 +1544,17 @@ bool MatchASTVisitor::TraverseStmt(Stmt *StmtNode,
DataRecursionQueue *Queue) {
}
bool MatchASTVisitor::TraverseType(QualType TypeNode) {
+ if (shouldSkipNode(TypeNode))
Xazax-hun wrote:
> b) overload the function for QualType and di
@@ -1507,11 +1544,17 @@ bool MatchASTVisitor::TraverseStmt(Stmt *StmtNode,
DataRecursionQueue *Queue) {
}
bool MatchASTVisitor::TraverseType(QualType TypeNode) {
+ if (shouldSkipNode(TypeNode))
Xazax-hun wrote:
What is the point of this if we never get a lo
@@ -105,6 +105,10 @@ Improvements to clang-tidy
now run checks in parallel by default using all available hardware threads.
Both scripts display the number of threads being used in their output.
+- :program:`clang-tidy` no longer attemps to analyze code from system headers
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/151035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun commented:
What is the design here around macros? Like what is the expected behavior for
code expanded from macros defined in system header?
https://github.com/llvm/llvm-project/pull/151035
___
cfe-commits mailing list
cfe
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/151719
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/151270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun commented:
What about functions with the same name but in different namespaces? Maybe we
should check that the function is either in the global scope or in the `std`
namespace instead?
https://github.com/llvm/llvm-project/pull/151270
___
@@ -26,3 +26,6 @@ Classes:
- Name:scalarNewProperty
PropertyKind:Instance
Nullability: Scalar
+Typedefs:
+ - Name:MyTypedef
Xazax-hun wrote:
Is this covered by filecheck?
https://github.com/llvm/llvm-proj
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/151213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2668,6 +2668,10 @@ class FunctionDecl : public DeclaratorDecl,
/// an attribute on its declaration or its type.
bool isNoReturn() const;
+ /// Determines whether this function is known to be 'noreturn' for analyzer,
+ /// through an `analyzer_noreturn` attribute on i
https://github.com/Xazax-hun approved this pull request.
This looks reasonable to me, thanks!
https://github.com/llvm/llvm-project/pull/150952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/150952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -910,24 +961,129 @@ class ExpiredLoansAnalysis
Lattice transfer(Lattice In, const IssueFact &F) {
return Lattice(Factory.remove(In.Expired, F.getLoanID()));
}
+
+ ExpiredLoanMap getExpiredLoans(ProgramPoint P) { return getState(P).Expired;
}
};
// =
@@ -492,7 +522,8 @@ class FactGenerator : public
ConstStmtVisitor {
// Check if the loan is for a stack variable and if that variable
// is the one being destructed.
if (LoanPath.D == DestructedVD)
-CurrentBlockFacts.push_back(FactMgr.createFact(L.ID)
https://github.com/Xazax-hun commented:
Overall looks good but will want to have another pass. Added some random
comments most of which are probably not actionable at the moment.
https://github.com/llvm/llvm-project/pull/149731
___
cfe-commits mailin
@@ -19,14 +19,35 @@
#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
+#include "clang/Basic/SourceLocation.h"
+#include "llvm/ADT/DenseMapInfo.h"
+#include "llvm/ADT/ImmutableMap.h"
#include "
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/149731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
The change looks good to me but I have the same question/concern I raised in
https://github.com/llvm/llvm-project/pull/150133
https://github.com/llvm/llvm-project/pull/150139
___
cfe-commits mai
https://github.com/Xazax-hun approved this pull request.
While this change looks good to me now this file system related validations
will be scattered all over the codebase. I don't have a strong opinion but
wondering if having a validation step right after the command line parsing is
done wou
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/149158
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/149951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -23,3 +23,8 @@ struct EscapableType { int value; };
struct RefCountedTypeWithDefaultConvention {};
inline void retain(RefCountedType *x) {}
inline void release(RefCountedType *x) {}
+
+struct OpaqueRefCountedType;
Xazax-hun wrote:
Could we add multiple forw
https://github.com/Xazax-hun approved this pull request.
Looks great, thanks!
https://github.com/llvm/llvm-project/pull/149951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/149951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/149592
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
LG, thanks!
https://github.com/llvm/llvm-project/pull/149199
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -524,14 +531,20 @@ template
class DataflowAnalysis {
public:
using Lattice = LatticeType;
- using Base = DataflowAnalysis;
+ using Base = DataflowAnalysis;
private:
const CFG &Cfg;
AnalysisDeclContext ∾
+ /// The dataflow state before a basic block is pro
@@ -524,14 +531,20 @@ template
class DataflowAnalysis {
public:
using Lattice = LatticeType;
- using Base = DataflowAnalysis;
+ using Base = DataflowAnalysis;
private:
const CFG &Cfg;
AnalysisDeclContext ∾
+ /// The dataflow state before a basic block is pro
@@ -502,6 +502,12 @@ class FactGenerator : public
ConstStmtVisitor {
enum class Direction { Forward, Backward };
+/// A program point is a pair of a CFGBlock and a Fact within that block.
+///
+/// This is used to represent the state of the program *after* the Fact is
+/// e
https://github.com/Xazax-hun approved this pull request.
Overall looks good to me. One question for the future: sometimes it might be
better to run certain analyses side by side in the same worklist rather than
running them sequentially after each other. Do you think there are some
analysis st
@@ -596,143 +709,66 @@ struct LifetimeLattice {
}
};
-// = //
-// The Transfer Function
-// = //
-clas
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/148222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/148065
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -493,7 +496,247 @@ class FactGenerator : public
ConstStmtVisitor {
};
// = //
-// TODO: Run dataflow analysis to propagate loans, analyse and error
reporting.
+// The Dat
@@ -493,7 +496,247 @@ class FactGenerator : public
ConstStmtVisitor {
};
// = //
-// TODO: Run dataflow analysis to propagate loans, analyse and error
reporting.
+// The Dat
@@ -493,7 +496,247 @@ class FactGenerator : public
ConstStmtVisitor {
};
// = //
-// TODO: Run dataflow analysis to propagate loans, analyse and error
reporting.
+// The Dat
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/148065
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
Some minor things inline, overall looks good to me.
https://github.com/llvm/llvm-project/pull/148065
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() {
isOptionalMemberCallWithNameMatcher(hasName("isNull")),
transferOptionalIsNullCall)
+ // NullableValue::makeValue, NullableValue::makeValueInplace
+ // Only NullableValue has these methods, bu
@@ -0,0 +1,510 @@
+//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*-
C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/146355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2833,8 +2834,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C,
AddStmtChoice asc) {
if (!FD->isVariadic())
findConstructionContextsForArguments(C);
-if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context))
- NoReturn = true;
+if (!NoReturn)
+
https://github.com/Xazax-hun commented:
I think this is a good change in general, but I wonder what is the performance
impact.
Note that clang CFGs have many clients and some of them might not need this
information. If there is a measurable performance cost, we might want to put
this behind a
@@ -6298,10 +6334,43 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) {
// at least for now, but once we have better support for exceptions,
// we'd need to carefully handle the case when the throw is being
// immediately caught.
- if (llvm::any_of(*Blk, [](const
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/146355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/146859
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 1082 matches
Mail list logo