https://github.com/Xazax-hun approved this pull request.
Overall looks good to me, some nits inline.
https://github.com/llvm/llvm-project/pull/128150
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/128150
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -91,6 +91,10 @@ Improvements to clang-query
Improvements to clang-tidy
--
+- It no longer processes declarations from system headers by default, greatly
Xazax-hun wrote:
I think we should mention somewhere that downstream users migh
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/130418
___
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!
https://github.com/llvm/llvm-project/pull/130683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
This change looks good to me. I think you could open PRs for the questions you
brought up and we could sort them out in the review process.
https://github.com/llvm/llvm-project/pull/130683
___
cfe-commits mailing list
cfe-commits@lis
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call,
CheckerContext &C,
}
}
-class BuiltinFunctionChecker : public Checker {
+class BuiltinFunctionChecker
+: public Checker> {
public:
+ void checkPostStmt(const AttributedStmt *A, CheckerCont
https://github.com/Xazax-hun approved this pull request.
I have one question once that is resolved the rest looks good to me.
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/130780
___
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/129224
___
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/129234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -443,21 +443,44 @@ class reverse_children {
} // namespace
-reverse_children::reverse_children(Stmt *S) {
- if (CallExpr *CE = dyn_cast(S)) {
-children = CE->getRawSubExprs();
+reverse_children::reverse_children(Stmt *S, ASTContext &Ctx) {
+ switch (S->getStmtClass()
@@ -180,3 +183,58 @@ int test_reference_that_might_be_after_the_end(int idx) {
return ref;
}
+// From: https://github.com/llvm/llvm-project/issues/100762
+extern int arrOf10[10];
+void using_builtin(int x) {
+ __builtin_assume(x > 101); // CallExpr
+ arrOf10[x] = 404; // e
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/72257
___
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/129234
___
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/130953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -41,19 +41,19 @@ class BugType {
Checker(nullptr), SuppressOnSink(SuppressOnSink) {}
BugType(const CheckerBase *Checker, StringRef Desc,
StringRef Cat = categories::LogicError, bool SuppressOnSink = false)
- : CheckerName(Checker->getCheckerName()),
@@ -315,16 +342,54 @@ bool
BlockInCriticalSectionChecker::isBlockingInCritSection(
void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call,
CheckerContext &C) const {
if (isBlockingInCritSection(Call, C)) {
+
https://github.com/Xazax-hun commented:
Mostly looks good to me, I have one question inline.
https://github.com/llvm/llvm-project/pull/127049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
https://github.com/Xazax-hun approved this pull request.
I am fine going ahead with this.
https://github.com/llvm/llvm-project/pull/123003
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/Xazax-hun approved this pull request.
Looks good! Suppressing results for cases we do not model properly is the right
thing to do. That being said, I wonder if we should record the presence of
casts when we produce `ElementRegion`s to better help checks suppress
potentially
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/127460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
> FYI: This may be a breaking change to some downstream users that may had some
> means to attach different listeners and what not to e.g. the Preprocessor
> inside their checker register functions. Since we delay the calls to these
> register fns after parsing is already done
@@ -73,6 +73,23 @@ Nullability getNullabilityAnnotation(QualType Type);
/// returned.
std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP);
+class CachedMacroValue {
Xazax-hun wrote:
I think with the optional we cannot distinguish between
@@ -337,6 +391,28 @@ void
BlockInCriticalSectionChecker::reportBlockInCritSection(
<< "' inside of critical section";
auto R = std::make_unique(BlockInCritSectionBugType,
os.str(), ErrNode);
+ // for 'read' and 'recv'
https://github.com/Xazax-hun closed
https://github.com/llvm/llvm-project/pull/127807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
A moved from object could be reinitalized:
```
void test() {
std::vector abc;
std::string b;
add(abc, std::move(b));
b = std::string(); // now b can be used again.
}
That being said, maybe this is rare enough that we could have an opt-in
warning. B
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/128368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -171,19 +172,11 @@ class SValBuilder {
// Forwarding methods to SymbolManager.
- const SymbolConjured* conjureSymbol(const Stmt *stmt,
- const LocationContext *LCtx,
- QualType type,
-
@@ -27,7 +27,8 @@ namespace ento {
/// by the loop body in any iteration.
ProgramStateRef getWidenedLoopState(ProgramStateRef PrevState,
const LocationContext *LCtx,
-unsigned BlockCount, const Stmt *LoopSt
@@ -1515,7 +1515,8 @@ void CStringChecker::evalCopyCommon(CheckerContext &C,
const CallEvent &Call,
// conjure a return value for later.
if (lastElement.isUnknown())
lastElement = C.getSValBuilder().conjureSymbolVal(
-nullptr, Call.getOriginExpr
@@ -101,8 +103,10 @@ class SymbolConjured : public SymbolData {
}
public:
- /// It might return null.
- const Stmt *getStmt() const { return S; }
Xazax-hun wrote:
Would it make sense to keep `getStmt`? It could still return null but some
callers might fi
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/128013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
Looks good! I wonder if we should rename the directory to something like
`clang/test/StaticAnalyzer` to avoid confusion in the future.
https://github.com/llvm/llvm-project/pull/128013
___
cfe-commits mailing list
cfe-commits@lists.llv
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/128558
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
I'd prefer to go ahead with this and continue the discussion once that PR
landed. This would unbreak the checks/resolve the backward compatibility issues
while providing some of the benefits (even if the perf gain is smaller). At
least we will be in a state that does not break
@@ -157,8 +157,11 @@ void ContainerModeling::checkPostCall(const CallEvent
&Call,
if (Func->isOverloadedOperator()) {
const auto Op = Func->getOverloadedOperator();
if (Op == OO_Equal) {
- // Overloaded 'operator=' must be a non-static member function.
- co
https://github.com/Xazax-hun approved this pull request.
Looks good to me.
https://github.com/llvm/llvm-project/pull/132581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
> What is the relationship of this new callback with the BranchCondition
> callback
+1, I am also interested to learn what is the main motivation behind the new
callback. Do you have some example use cases in mind? I think users might get
confused which one to use.
https://
https://github.com/Xazax-hun commented:
Should we still warn if we store a negative value or a value >= 2*last member?
https://github.com/llvm/llvm-project/pull/141232
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/141232
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -611,6 +623,29 @@ class CompilerInstance : public ModuleLoader {
/// the compiler instance takes ownership of \p Value.
void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
+ /// @}
+ /// @name Summary
+ /// @{
+
+ bool hasSummaryContext() { return (bool)Sum
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/144224
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,60 @@
+#ifndef LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H
+#define LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H
+
+#include "clang/Summary/SummaryAttribute.h"
+#include "clang/Summary/SummaryConsumer.h"
+#include
+
+namespace clang {
+class FunctionSummary {
+ SmallVector ID;
---
https://github.com/Xazax-hun commented:
I did not have time to look at it properly, just some small drive by comments.
https://github.com/llvm/llvm-project/pull/144224
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
@@ -0,0 +1,60 @@
+#ifndef LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H
+#define LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H
+
+#include "clang/Summary/SummaryAttribute.h"
+#include "clang/Summary/SummaryConsumer.h"
+#include
+
+namespace clang {
+class FunctionSummary {
+ SmallVector ID;
+ std:
@@ -0,0 +1,753 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,753 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,753 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,23 @@
+#include "clang/Summary/SummaryConsumer.h"
+#include "clang/Summary/SummaryContext.h"
+
+namespace clang {
+void JSONPrintingSummaryConsumer::ProcessFunctionSummary(
+const FunctionSummary &Summary) {
+ JOS.object([&] {
+JOS.attribute("id", llvm::json::V
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/145947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -195,6 +195,52 @@ declaration kind), all of which are optional:
SwiftReleaseOp: immortal
SwiftRetainOp: immortal
+:SwiftReturnOwnership:
+
+ Specifies the ownership convention of a function or method returning a C++
type
+ that has been imported as a Swift re
@@ -195,6 +195,52 @@ declaration kind), all of which are optional:
SwiftReleaseOp: immortal
SwiftRetainOp: immortal
+:SwiftReturnOwnership:
+
+ Specifies the ownership convention of a function or method returning a C++
type
+ that has been imported as a Swift re
@@ -195,6 +195,52 @@ declaration kind), all of which are optional:
SwiftReleaseOp: immortal
SwiftRetainOp: immortal
+:SwiftReturnOwnership:
+
+ Specifies the ownership convention of a function or method returning a C++
type
+ that has been imported as a Swift re
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
Xazax-hun wrote:
> implement a warning (maybe return-stack-addr) in this patch.
This patch is already big enough. But I think a small comment of how reporting
will work down the line might be useful.
https://github.com/llvm/llvm-project/pull/142313
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/142313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,362 @@
+// RUN: %clang_cc1 -mllvm
-debug-only=ExperimentalLifetimeAnalysis,LifetimeFacts,LifetimeDataflow
-Wreturn-stack-address-cfg %s 2>&1 | FileCheck %s
+
+struct MyObj {
+ int id;
+ ~MyObj() {} // Non-trivial destructor
+};
+
+// Simple Local Variable Address an
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
https://github.com/Xazax-hun commented:
Overall, I don't have any major comments on the design, I have mostly some nits
inline.
https://github.com/llvm/llvm-project/pull/142313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
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
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
@@ -596,143 +709,66 @@ struct LifetimeLattice {
}
};
-// = //
-// The Transfer Function
-// = //
-clas
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
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
@@ -0,0 +1,728 @@
+#include "clang/Analysis/Analyses/LifetimeSafety.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
+#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#inc
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/142313
___
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.
There are some discussions open on this PR e.g., whether access paths need
kinds. But I don't think those are blockers, this is exploratory work and it is
expected that some design decisions might be revisited along the way when we
learn
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/142313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,508 @@
+//===- 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
Xazax-hun wrote:
Actually, before merging, did you manage to run this on any non-trivial
projects to see if there are any false positives? I think this change is
valuable and important but these sorts of changes can expose some false
positives. If that is the case (or there are some noisy patt
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/147221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -438,13 +438,10 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) {
return;
}
bool isTrivialBody = hasTrivialBody(CE);
- // If a value is passed by const pointer to a function,
- // we should not assume that it is initialized by the call, and we
- // conservativel
https://github.com/Xazax-hun approved this pull request.
LGTM! I have a nit inline for your consideration.
https://github.com/llvm/llvm-project/pull/147221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
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
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
@@ -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 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
@@ -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 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
@@ -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
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() {
isOptionalMemberCallWithNameMatcher(hasName("isNull")),
transferOptionalIsNullCall)
+ // NullableValue::makeValue, NullableValue::makeValueInplace
+ // Only NullableValue has these methods, bu
@@ -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 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
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.
https://github.com/llvm/llvm-project/pull/145500
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Xazax-hun wrote:
Hey, could you add a LIT test that fails before your changes but passes after?
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
901 - 1000 of 1011 matches
Mail list logo