@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
https://github.com/haoNoQ commented:
> If that is an issue, one way to do this "properly" would be to create a graph
Note that we do have a
[`CallGraph`](https://clang.llvm.org/doxygen/classclang_1_1CallGraph.html)
class. The static analyzer uses it to identify top-level entry points. It
@@ -231,6 +231,15 @@ class RefCounted {
void method();
void someFunction();
int otherFunction();
+ unsigned recursiveTrivialFunction(int n) { return !n ? 1 :
recursiveTrivialFunction(n - 1); }
+ unsigned recursiveComplexFunction(int n) { return !n ? otherFunction() :
@@ -231,6 +231,15 @@ class RefCounted {
void method();
void someFunction();
int otherFunction();
+ unsigned recursiveTrivialFunction(int n) { return !n ? 1 :
recursiveTrivialFunction(n - 1); }
+ unsigned recursiveComplexFunction(int n) { return !n ? otherFunction() :
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91876
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
(It might be a good idea to add comments to those parts of the code to make
sure the reader knows that it was intentional.)
https://github.com/llvm/llvm-project/pull/92639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/haoNoQ approved this pull request.
Aha in this case LGTM!
https://github.com/llvm/llvm-project/pull/92639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -51,92 +169,137 @@ class RefCntblBaseVirtualDtorChecker
bool shouldVisitImplicitCode() const { return false; }
bool VisitCXXRecordDecl(const CXXRecordDecl *RD) {
-Checker->visitCXXRecordDecl(RD);
+if (!RD->hasDefinition())
+ return
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -11,16 +11,134 @@
#include "PtrTypesSemantics.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include
@@ -135,7 +135,19 @@ class UncountedLocalVarsChecker
bool shouldVisitImplicitCode() const { return false; }
bool VisitVarDecl(VarDecl *V) {
-Checker->visitVarDecl(V);
+auto *Init = V->getInit();
+if (Init && V->isLocalVarDecl())
@@ -135,7 +135,19 @@ class UncountedLocalVarsChecker
bool shouldVisitImplicitCode() const { return false; }
bool VisitVarDecl(VarDecl *V) {
-Checker->visitVarDecl(V);
+auto *Init = V->getInit();
+if (Init && V->isLocalVarDecl())
+
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/92432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -420,25 +420,63 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
//already duplicated
// - call both from Sema and from here
- const auto *BaseDRE =
- dyn_cast(Node.getBase()->IgnoreParenImpCasts());
- if (!BaseDRE)
+ if (const auto *BaseDRE =
+
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -std=c++20 -Wno-everything -Wunsafe-buffer-usage \
+// RUN:-fsafe-buffer-usage-suggestions \
+// RUN:-verify %s
+
+void char_literal() {
+ if ("abc"[2] == 'c')
+return;
+ if ("def"[3] == '0')
+return;
+}
+
@@ -420,25 +420,63 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
//already duplicated
// - call both from Sema and from here
- const auto *BaseDRE =
- dyn_cast(Node.getBase()->IgnoreParenImpCasts());
- if (!BaseDRE)
+ if (const auto *BaseDRE =
+
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/92432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ commented:
Overall looks great!
I think I see a couple easy improvements, this isn't blocking but let's take a
moment to consider them
https://github.com/llvm/llvm-project/pull/92432
___
cfe-commits mailing list
@@ -420,25 +420,63 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
//already duplicated
// - call both from Sema and from here
- const auto *BaseDRE =
- dyn_cast(Node.getBase()->IgnoreParenImpCasts());
- if (!BaseDRE)
+ if (const auto *BaseDRE =
+
haoNoQ wrote:
I think there should be a way to enable/disable this check separately because
memory exhaustion / denial of service isn't necessarily something you care
about when you enable taint analysis.
It's essential for web servers when the attacker is interested in interrupting
their
haoNoQ wrote:
> serializing the pragmas themselves as AST nodes
These pragmas don't really translate very well into the AST. Similarly to
`#pragma clang diagnostic`, they can be placed weirdly "across" other AST
nodes, like:
```
#pragma clang unsafe_buffer_usage begin
void foo() {
#pragma
@@ -1551,6 +1567,58 @@ bool
Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation ) {
return InSafeBufferOptOutRegion;
}
+SmallVector
+Preprocessor::serializeSafeBufferOptOutMap() const {
+ assert(!InSafeBufferOptOutRegion &&
haoNoQ wrote:
Yeah in
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/92220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -525,11 +525,19 @@ bool TrivialFunctionAnalysis::isTrivialImpl(
if (!IsNew)
return It->second;
+ TrivialFunctionAnalysisVisitor V(Cache);
+
+ if (auto *CtorDecl = dyn_cast(D)) {
+for (auto *CtorInit : CtorDecl->inits()) {
+ if
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/92220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1315,9 +1374,9 @@ class DerefSimplePtrArithFixableGadget : public
FixableGadget {
virtual std::optional
getFixits(const FixitStrategy ) const final;
-
- // TODO remove this method from FixableGadget interface
haoNoQ wrote:
Right!
@@ -445,6 +456,10 @@ class TrivialFunctionAnalysisVisitor
return Visit(VMT->getSubExpr());
}
+ bool VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr* BTE) {
+return Visit(BTE->getSubExpr());
haoNoQ wrote:
Which reminds me, I think we're also
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
Aha great LGTM!
https://github.com/llvm/llvm-project/pull/91873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler ,
+ bool EmitSuggestions) {
+#ifndef NDEBUG
@@ -1551,6 +1567,58 @@ bool
Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation ) {
return InSafeBufferOptOutRegion;
}
+SmallVector
+Preprocessor::serializeSafeBufferOptOutMap() const {
+ assert(!InSafeBufferOptOutRegion &&
+ "Attempt to serialize safe
@@ -1551,6 +1567,58 @@ bool
Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation ) {
return InSafeBufferOptOutRegion;
}
+SmallVector
+Preprocessor::serializeSafeBufferOptOutMap() const {
+ assert(!InSafeBufferOptOutRegion &&
haoNoQ wrote:
We require
https://github.com/haoNoQ commented:
I'm very happy that this is going somewhere! Everything makes sense to me but I
also don't know a lot about this stuff.
> During serialization, it only serializes regions of the current translation
> unit. Regions from loaded files are not serialized.
Hmm
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/92031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler ,
+ bool EmitSuggestions) {
+#ifndef NDEBUG
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler ,
+ bool EmitSuggestions) {
+#ifndef NDEBUG
https://github.com/haoNoQ commented:
Aha makes sense! Thanks for catching these false negatives!!
https://github.com/llvm/llvm-project/pull/91991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets , const
FixitStrategy ,
}
#ifndef NDEBUG
Handler.addDebugNoteForVar(
- VD, F->getBaseStmt()->getBeginLoc(),
+ VD, F->getSourceLoc(),
haoNoQ wrote:
Hmm right, this is literally
@@ -1315,9 +1374,9 @@ class DerefSimplePtrArithFixableGadget : public
FixableGadget {
virtual std::optional
getFixits(const FixitStrategy ) const final;
-
- // TODO remove this method from FixableGadget interface
haoNoQ wrote:
Still relevant tbh.
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91777
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
Aha ok everything makes sense now! I think this is good to go so LGTM! Let me
see the other PR too.
https://github.com/llvm/llvm-project/pull/91777
___
cfe-commits mailing list
@@ -2295,6 +2292,23 @@ class UnsafeBufferUsageReporter : public
UnsafeBufferUsageHandler {
}
}
+ void handleUnsafeOperationInContainer(const Stmt *Operation,
+bool IsRelatedToDecl,
+
@@ -921,10 +937,55 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget {
}
static Matcher matcher() {
-return
stmt(callExpr(callee(functionDecl(hasAttr(attr::UnsafeBufferUsage
-.bind(OpTag));
+auto HasUnsafeFnDecl =
+
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets , const
FixitStrategy ,
}
#ifndef NDEBUG
Handler.addDebugNoteForVar(
- VD, F->getBaseStmt()->getBeginLoc(),
+ VD, F->getSourceLoc(),
haoNoQ wrote:
This is the only place where we
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91777
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ commented:
> https://github.com/llvm/llvm-project/blob/2ff43ce87e66d9324370e35ea6743ef57400c76e/clang/lib/Analysis/UnsafeBufferUsage.cpp#L1373-L1374
>
> These assert that exactly one gadget matched. I think it's kinda worthwhile
> keeping the warnings independent too,
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/91875
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -445,6 +456,10 @@ class TrivialFunctionAnalysisVisitor
return Visit(VMT->getSubExpr());
}
+ bool VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr* BTE) {
+return Visit(BTE->getSubExpr());
haoNoQ wrote:
At this point you probably want to
haoNoQ wrote:
Hi! Thank you for digging into this! Sorry for the delay.
> The new UnsafeBufferUsageCtorAttrGadget gadget explicitly avoids matching
> against the std::span(ptr, size) constructor because that is handled by
> SpanTwoParamConstructorGadget and we never want two gadgets to match
https://github.com/haoNoQ approved this pull request.
https://github.com/llvm/llvm-project/pull/91830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
LGTM thanks!
https://github.com/llvm/llvm-project/pull/91830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/90918
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
@sharkautarch Yeah I think the situation where we observe the allocation site
during analysis may be significantly different in presence of smart pointers.
It may be a good idea to include such check in the heuristic, to reclaim some
of the false negatives currently silenced by
https://github.com/haoNoQ approved this pull request.
Aha ok this aligns with my understanding. LGTM!
https://github.com/llvm/llvm-project/pull/91143
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -27,12 +28,18 @@ tryToFindPtrOrigin(const Expr *E, bool
StopAtFirstRefCountedObj) {
E = tempExpr->getSubExpr();
continue;
}
+if (auto *Expr = dyn_cast(E)) {
+ return tryToFindPtrOrigin(Expr->getTrueExpr(), StopAtFirstRefCountedObj,
+
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91143
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
LGTM now thanks!
https://github.com/llvm/llvm-project/pull/91102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -309,21 +309,8 @@ class TrivialFunctionAnalysisVisitor
bool VisitDefaultStmt(const DefaultStmt *DS) { return VisitChildren(DS); }
bool VisitUnaryOperator(const UnaryOperator *UO) {
-// Operator '*' and '!' are allowed as long as the operand is trivial.
-auto op
https://github.com/haoNoQ approved this pull request.
Perfect thanks!!
https://github.com/llvm/llvm-project/pull/91103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
Nice LGTM!
You could test this patch by pasting the warning into one of the
`expected-warning{{}}` clauses in the tests but I honestly don't think it's all
that important for a patch like this.
@@ -87,7 +90,7 @@ class MIGChecker : public Checker,
#undef CALL
};
- CallDescription OsRefRetain{{"os_ref_retain"}, 1};
+ CallDescription OsRefRetain{CDM::SimpleFunc, {"os_ref_retain"}, 1};
haoNoQ wrote:
Yes, this is a plain C function. Definitely not
https://github.com/haoNoQ approved this pull request.
Looks awesome thank you!
https://github.com/llvm/llvm-project/pull/91331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
> I've just left here what my thought process was when I dig into a similar
> case. It might be useful, who knows.
Medium-to-long-term I think an attribute-based approach might make sense there:
- Either annotate reference-counting pointers as "hey I'm a smart pointer (I'm
@@ -3479,13 +3479,24 @@ PathDiagnosticPieceRef
MallocBugVisitor::VisitNode(const ExplodedNode *N,
// original reference count is positive, we should not report use-after-frees
// on objects deleted in such destructors. This can probably be improved
// through better
@@ -3479,13 +3479,24 @@ PathDiagnosticPieceRef
MallocBugVisitor::VisitNode(const ExplodedNode *N,
// original reference count is positive, we should not report use-after-frees
// on objects deleted in such destructors. This can probably be improved
// through better
https://github.com/haoNoQ approved this pull request.
https://github.com/llvm/llvm-project/pull/91275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/91275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,4 +1,4 @@
-REQUIRES: shell
+REQUIRES: perl
haoNoQ wrote:
A few of those require `rm` and `ls` but these don't count as shell right?
https://github.com/llvm/llvm-project/pull/91275
___
cfe-commits mailing list
https://github.com/haoNoQ approved this pull request.
Looks great thanks a lot!!
I can confirm that it works for me on a mac too.
@jroelofs's comment is on point.
https://github.com/llvm/llvm-project/pull/91275
___
cfe-commits mailing list
@@ -27,12 +28,18 @@ tryToFindPtrOrigin(const Expr *E, bool
StopAtFirstRefCountedObj) {
E = tempExpr->getSubExpr();
continue;
}
+if (auto *Expr = dyn_cast(E)) {
+ return tryToFindPtrOrigin(Expr->getTrueExpr(), StopAtFirstRefCountedObj,
+
haoNoQ wrote:
Aha, this looks like a more traditional solution! Looks great. You can make
tests for this by feeding the compiler fake system headers with the help of
```
#pragma clang system_header
```
!
https://github.com/llvm/llvm-project/pull/91103
@@ -316,10 +316,15 @@ class TrivialFunctionAnalysisVisitor
if (UO->isIncrementOp() || UO->isDecrementOp()) {
// Allow increment or decrement of a POD type.
- if (auto *RefExpr = dyn_cast(UO->getSubExpr())) {
+ auto *SubExpr = UO->getSubExpr();
+ if
https://github.com/haoNoQ approved this pull request.
LGTM! Yeah I really don't know why `ParenExpr` needed to be a thing in the AST.
https://github.com/llvm/llvm-project/pull/91052
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/91009
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ created
https://github.com/llvm/llvm-project/pull/90918
Fixes #90498.
Same as 5337efc69cdd5 for atomic builtins, but for `std::atomic` this time.
This is useful because even though the actual builtin atomic is still there, it
may be buried beyond the inlining depth
haoNoQ wrote:
@mikhailramalho long time no see!
I think @rniwa is right on this one. "Inline" is completely orthogonal to
"safe". Fundamentally it only matters what the function _actually does_; it
doesn't matter how it's defined or where or how the code is generated for it.
These checkers
https://github.com/haoNoQ approved this pull request.
LGTM! The revert was caused entirely by something in the mock headers in tests
right?
https://github.com/llvm/llvm-project/pull/90704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
haoNoQ wrote:
Hmm it doesn't look like we actually have that other suppression. It looks like
the checker simply never warned in the standard library because there aren't
WebKit classes in the standard library. But it looks like you've found a few
cases where it actually happens? How does
haoNoQ wrote:
(If yes, LGTM!)
https://github.com/llvm/llvm-project/pull/90552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
Ok am I reading this right: this is about testing code that lives directly in
namespace `std::` but somehow still lives in your project right? Such as your
custom modifications to standard classes, various overloads and specializations
of standard things.
This patch does not
https://github.com/haoNoQ approved this pull request.
LGTM other than the other tiny comment.
https://github.com/llvm/llvm-project/pull/90414
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -360,6 +370,16 @@ class TrivialFunctionAnalysisVisitor
return TrivialFunctionAnalysis::isTrivialImpl(Callee, Cache);
}
+ bool
+ VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
+// Non-type template paramter is trivial if the
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/90180
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/90153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
I never realized that scan-build makes a "short list" of flags to pass through
and throws away the rest. This is terrifying. It only works because most
compiler flags are recognized because they're prefixed with `-f`, `-W`, etc.;
but it's fascinating that it even works.
This
https://github.com/haoNoQ approved this pull request.
https://github.com/llvm/llvm-project/pull/88017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
> Here's the traceback for the second set:
The constraint manager doesn't even exist yet at the moment of time represented
by this backtrace. There's something else going on. I suspect that you're
loading checkers as clang plugins and one of them is causing it.
@@ -0,0 +1,17 @@
+// REQUIRES: crash-recovery, asserts
haoNoQ wrote:
You probably don't need this. There's no need to disable a perfectly normal
test just because it didn't crash before the patch in that configuration. It's
still nice to know that it doesn't
@@ -788,7 +791,7 @@ class PathDiagnostic : public llvm::FoldingSetNode {
PathDiagnostic(StringRef CheckerName, const Decl *DeclWithIssue,
StringRef bugtype, StringRef verboseDesc, StringRef shortDesc,
StringRef category,
1 - 100 of 1066 matches
Mail list logo