@@ -1039,10 +1039,6 @@ def ArrayBoundCheckerV2 : Checker<"ArrayBoundV2">,
HelpText<"Warn about buffer overflows (newer checker)">,
Documentation;
-def MallocOverflowSecurityChecker : Checker<"MallocOverflow">,
haoNoQ wrote:
We could keep this for a while
haoNoQ wrote:
> Instead of actually tracking the symbolic values and the known constraints on
> them, this checker blindly gropes the AST and uses heuristics like "this
> variable was seen in a comparison operator expression that is not a loop
> condition, so it's probably not too large" (whic
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
@@ -783,6 +783,18 @@ bool ParsePrintfString(FormatStringHandler &H,
bool ParseFormatStringHasSArg(const char *beg, const char *end,
const LangOptions &LO, const TargetInfo &Target);
+/// Parse C format string and return index (relative to `ArgInde
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
@@ -483,6 +483,34 @@ bool
clang::analyze_format_string::ParseFormatStringHasSArg(const char *I,
return false;
}
+unsigned clang::analyze_format_string::ParseFormatStringFirstSArgIndex(
+const char *&I, const char *E, unsigned ArgIndex, const LangOptions &LO,
+const
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
@@ -2292,6 +2292,18 @@ class UnsafeBufferUsageReporter : public
UnsafeBufferUsageHandler {
}
}
+ void handleUnsafeLibcCall(const CallExpr *Call, unsigned PrintfInfo,
+ASTContext &Ctx) override {
+// We have checked that there is a direct
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+namespace libc_fun_disjoint_inner_matchers {
+// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match
+// disjoint node sets. They all take a `CoreName`, which
https://github.com/haoNoQ edited
https://github.com/llvm/llvm-project/pull/102953
___
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/101583
___
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/102953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -788,7 +791,7 @@ class PathDiagnostic : public llvm::FoldingSetNode {
PathDiagnostic(StringRef CheckerName, const Decl *DeclWithIssue,
StringRef bugtype, StringRef verboseDesc, StringRef shortDesc,
StringRef category, PathDiagnosticLocatio
@@ -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 cr
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.
https://github.co
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:
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 may
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
@@ -1483,26 +1484,40 @@ void Preprocessor::emitFinalMacroWarning(const Token
&Identifier,
}
bool Preprocessor::isSafeBufferOptOut(const SourceManager &SourceMgr,
- const SourceLocation &Loc) const {
- // Try to find a region in `Safe
@@ -1911,6 +1911,20 @@ SourceManager::getDecomposedIncludedLoc(FileID FID)
const {
return DecompLoc;
}
+FileID SourceManager::getFirstFIDOfLoadedAST(SourceLocation Loc) const {
+ assert(isLoadedSourceLocation(Loc) &&
+ "Must be a source location in a loaded PCH/Mod
haoNoQ wrote:
Ok I think I'm completely happy with the patch now. It makes perfect sense to
me and appears to be doing the right thing. Thank you @ziqingluo-90 for
figuring this out! Let's add that comment and land.
https://github.com/llvm/llvm-project/pull/92031
__
@@ -389,6 +389,7 @@ my %CompilerLinkerOptionMap = (
'-target' => 1,
'-v' => 0,
'-mmacosx-version-min' => 0, # This is really a 1 argument, but always has
'='
+ '-mmacos-version-min' => 0, # This is really a 1 argument, but always has '='
haoNoQ wrote:
@@ -1911,18 +1911,22 @@ SourceManager::getDecomposedIncludedLoc(FileID FID)
const {
return DecompLoc;
}
-FileID SourceManager::getFirstFIDOfLoadedAST(SourceLocation Loc) const {
+unsigned SourceManager::getUniqueLoadedASTID(SourceLocation Loc) const {
assert(isLoadedSour
https://github.com/haoNoQ approved this pull request.
Ok LGTM!! Thanks again for figuring this all out!
https://github.com/llvm/llvm-project/pull/92031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
haoNoQ wrote:
> The checker was renamed at some time ago but the documentation was not
> updated.
Yupp my bad. Thank you folks!
https://github.com/llvm/llvm-project/pull/95003
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
haoNoQ wrote:
I have a high-level question not directly related to the patch. We have
probably even talked about it at a conference a few years ago but I don't
remember 😅
> `ResultObjectVisitor`
I briefly looked at the implementation and I suspect that you folks might be
reinventing
[`Const
haoNoQ wrote:
> Thanks for the info -- I wasn't aware of `ConstructionContext`. Will take a
> look. Can you point me to some examples of how this is used?
The initial motivation was here:
https://github.com/llvm/llvm-project/blob/llvmorg-19-init/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp#
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:
Yeah I think we really gotta cherry-pick this revert, because failing tests on
release branches are somewhat scary (cf.
https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA-release-branch/69/console).
I don't know how it's usually done but let me try to push some buttons,
https://github.com/haoNoQ milestoned
https://github.com/llvm/llvm-project/pull/102226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
/cherry-pick 3ddd7a6df3ef85cbfe3f5fc0294817638275d4df
https://github.com/llvm/llvm-project/pull/102226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
/cherry-pick 030ee841a9c9fbbd6e7c001e751737381da01f7b
https://github.com/llvm/llvm-project/pull/102226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
haoNoQ wrote:
Oh that's just a whitespace change. Would you like me to make a manual PR or
were you looking into it anyway?
https://github.com/llvm/llvm-project/pull/102226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
haoNoQ wrote:
#106439
https://github.com/llvm/llvm-project/pull/102226
___
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.
I think this is good to go, LGTM!!
https://github.com/llvm/llvm-project/pull/101583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/haoNoQ edited
https://github.com/llvm/llvm-project/pull/101583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -443,6 +443,426 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
return false;
}
+AST_MATCHER_P(CallExpr, hasNumArgs, unsigned, Num) {
+ return Node.getNumArgs() == Num;
+}
+
+namespace libc_func_matchers {
+// Under `libc_func_matchers`, define a set of matche
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
@@ -360,6 +370,16 @@ class TrivialFunctionAnalysisVisitor
return TrivialFunctionAnalysis::isTrivialImpl(Callee, Cache);
}
+ bool
+ VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
+// Non-type template paramter is trivial if the replacemen
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
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 aff
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:
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 this
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
https:/
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 do
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 l
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 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://lists.
@@ -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 (au
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
___
@@ -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 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
cfe-commit
@@ -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
cfe
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
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
@@ -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 shar
@@ -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 shar
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
follow
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
@@ -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 bu
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 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.
https://github.com/llvm/llvm-project/pull/914
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
@@ -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 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
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
@@ -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 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
https://lists.llvm.org/cgi-bin/mailman/listinf
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 i
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
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 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
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 t
@@ -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 doub
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
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 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
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets &FixablesForAllVars, const
FixitStrategy &S,
}
#ifndef NDEBUG
Handler.addDebugNoteForVar(
- VD, F->getBaseStmt()->getBeginLoc(),
+ VD, F->getSourceLoc(),
haoNoQ wrote:
This is the
@@ -921,10 +937,55 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget {
}
static Matcher matcher() {
-return
stmt(callExpr(callee(functionDecl(hasAttr(attr::UnsafeBufferUsage
-.bind(OpTag));
+auto HasUnsafeFnDecl =
+callee(
@@ -2295,6 +2292,23 @@ class UnsafeBufferUsageReporter : public
UnsafeBufferUsageHandler {
}
}
+ void handleUnsafeOperationInContainer(const Stmt *Operation,
+bool IsRelatedToDecl,
+ASTCont
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
cfe-commits@lists.ll
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
@@ -1315,9 +1374,9 @@ class DerefSimplePtrArithFixableGadget : public
FixableGadget {
virtual std::optional
getFixits(const FixitStrategy &s) const final;
-
- // TODO remove this method from FixableGadget interface
haoNoQ wrote:
Still relevant tbh.
htt
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets &FixablesForAllVars, const
FixitStrategy &S,
}
#ifndef NDEBUG
Handler.addDebugNoteForVar(
- VD, F->getBaseStmt()->getBeginLoc(),
+ VD, F->getSourceLoc(),
haoNoQ wrote:
Hmm right,
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
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://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
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
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
@@ -1551,6 +1567,58 @@ bool
Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation &StartLoc) {
return InSafeBufferOptOutRegion;
}
+SmallVector
+Preprocessor::serializeSafeBufferOptOutMap() const {
+ assert(!InSafeBufferOptOutRegion &&
haoNoQ wrote:
We
@@ -1551,6 +1567,58 @@ bool
Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation &StartLoc) {
return InSafeBufferOptOutRegion;
}
+SmallVector
+Preprocessor::serializeSafeBufferOptOutMap() const {
+ assert(!InSafeBufferOptOutRegion &&
+ "Attempt to serialize sa
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D,
}
}
}
+
+void clang::checkUnsafeBufferUsage(const Decl *D,
+ UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions) {
+#ifndef
1001 - 1100 of 1254 matches
Mail list logo