https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/128411
As always, call array dtors in reverse order.
>From c8d9fba32d6c97e89d320533fd680f6fa2f80a78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Sun, 23 Feb 2025 10:57:47 +0100
Subject: [PATCH]
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
As always, call array dtors in reverse order.
---
Full diff: https://github.com/llvm/llvm-project/pull/128411.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/Interp.cpp (+4-1)
- (modified) clan
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/128412
None
>From 5bb0213254e070c3c24492d6b7ec6810b13f5455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Sun, 23 Feb 2025 11:10:43 +0100
Subject: [PATCH] [clang][bytecode] Reject calls to pure vi
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/128412.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/Interp.cpp (+13-1)
- (modified) clang/test/AST/ByteCode/cxx2a.cpp (+10)
`
https://github.com/kidq330 closed
https://github.com/llvm/llvm-project/pull/113046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtarditi updated
https://github.com/llvm/llvm-project/pull/126596
>From 06eb6682196249f4cae9801963380d0881d27296 Mon Sep 17 00:00:00 2001
From: David Tarditi
Date: Mon, 10 Feb 2025 11:35:45 -0800
Subject: [PATCH 1/3] [analyzer] Update undefined assignment diagnostics to not
dtarditi wrote:
@haoNoQ I think sticking with uninitialized is good. I've updated the patch
with new error messages using that. Please take a look at it and let me know
what you think. I think the right path is to issue a more precise error
message for out-of-bounds reads. As you point, w
https://github.com/dtarditi updated
https://github.com/llvm/llvm-project/pull/126596
>From 06eb6682196249f4cae9801963380d0881d27296 Mon Sep 17 00:00:00 2001
From: David Tarditi
Date: Mon, 10 Feb 2025 11:35:45 -0800
Subject: [PATCH 1/3] [analyzer] Update undefined assignment diagnostics to not
@@ -0,0 +1,45 @@
+// RUN: %check_clang_tidy -std=c99 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c11 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c17 %s bugprone-true-macro %t
isuckatcs wrote:
That's from `C23-and-later`, but the check
https://github.com/PiotrZSL approved this pull request.
LGTM but put some entry in check documentation.
https://github.com/llvm/llvm-project/pull/128383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
damnskippy wrote:
Been following this thread with much interest albeit selfishly a bit since I
was of the impression this PR will pave the way for supporting LocationLink.
[Ref: clangd/clangd/discussions/2274]
https://github.com/llvm/llvm-project/pull/118102
__
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/127773
>From 2d9c248c70b6d24f277982a32f36e2ef1bde2829 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Feb 2025 17:13:56 +0800
Subject: [PATCH 1/5] [Clang] Implement CWG2918 'Consideration of constraints
for
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/127773
>From 2d9c248c70b6d24f277982a32f36e2ef1bde2829 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Feb 2025 17:13:56 +0800
Subject: [PATCH 1/6] [Clang] Implement CWG2918 'Consideration of constraints
for
@@ -0,0 +1,30 @@
+.. title:: clang-tidy - bugprone-unintended-char-ostream-output
+
+bugprone-unintended-char-ostream-output
+===
+
+Finds unintended character output from ``unsigned char`` and ``signed char``
to an
+``ostream``.
+
+Normally, w
@@ -0,0 +1,69 @@
+//===--- UnintendedCharOstreamOutputCheck.cpp - clang-tidy
===//
+//
+// 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: Apa
https://github.com/fangyi-zhou ready_for_review
https://github.com/llvm/llvm-project/pull/128251
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -91,6 +91,16 @@ Improvements to clang-tidy
New checks
^^
+- New :doc:`bugprone-true-macro
+ ` check.
+
+ In C++, ``true`` is considered a keyword by the preprocessor so an ``#if
true``
+ enters the true branch, while in C, ``true`` is not treated as a special
+
@@ -0,0 +1,38 @@
+//===--- TrueMacroCheck.h - clang-tidy --*- 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: Apa
RiverDave wrote:
Thx @HerrCai0907, your feedback has been addresed.
https://github.com/llvm/llvm-project/pull/128402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-ambiguous-smartptr-reset-call
+
+readability-ambiguous-smartptr-reset-call
+=
+
+Finds potentially erroneous calls to ``reset`` method on smart pointers when
+the pointee type also has a
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/128402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/128402
>From 5eef2a52de7de53b0fb24781f40a7b02b55025b9 Mon Sep 17 00:00:00 2001
From: Riverdave
Date: Sat, 22 Feb 2025 03:57:35 -0500
Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in
ter
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-ambiguous-smartptr-reset-call
+
+readability-ambiguous-smartptr-reset-call
+=
+
+Finds potentially erroneous calls to ``reset`` method on smart pointers when
+the pointee type also has a
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Fangrui Song (MaskRay)
Changes
The latter is simpler and generalizes the OpenEmbedded special case introduced
in https://reviews.llvm.org/D48862
(they have /usr/lib64 but not /usr/lib)
---
Patch is 169.23 KiB, truncated to 20.00 K
https://github.com/PiotrZSL commented:
1. Wrong category, maybe better would be 'portability'
2. To short check name, maybe better would be
portability-undefined-bool-literal or something similar.
3. What about 'false' ?
4. This issue is detected by -Wundef compiler warning in both clang and gcc
@@ -0,0 +1,45 @@
+// RUN: %check_clang_tidy -std=c99 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c11 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c17 %s bugprone-true-macro %t
+
+#define FOO true
+// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: in C 'true'
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/128265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -44,6 +44,12 @@ void MoveConstArgCheck::registerMatchers(MatchFinder
*Finder) {
unless(isInTemplateInstantiation()))
.bind("call-move");
+ // Match ternary expressions where either branch contains std::move
+ auto TernaryWithMoveMatcher =
+
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/128265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-ambiguous-smartptr-reset-call
+
+readability-ambiguous-smartptr-reset-call
+=
+
+Finds potentially erroneous calls to ``reset`` method on smart pointers when
+the pointee type also has a
@@ -0,0 +1,129 @@
+//===--- AmbiguousSmartptrResetCallCheck.cpp - clang-tidy
-===//
+//
+// 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/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,129 @@
+//===--- AmbiguousSmartptrResetCallCheck.cpp - clang-tidy
-===//
+//
+// 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/PiotrZSL approved this pull request.
In general looks fine.
Few nits.
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-ambiguous-smartptr-reset-call
+
+readability-ambiguous-smartptr-reset-call
+=
+
+Finds potentially erroneous calls to ``reset`` method on smart pointers when
+the pointee type also has a
@@ -0,0 +1,68 @@
+// RUN: %check_clang_tidy %s readability-ambiguous-smartptr-reset-call %t \
+// RUN: -config='{CheckOptions: \
+// RUN: {readability-ambiguous-smartptr-reset-call.SmartPointers:
"::std::unique_ptr;::other_ptr"}}' \
+// RUN: --fix-notes --
+
+namespace std {
+
+
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-ambiguous-smartptr-reset-call
+
+readability-ambiguous-smartptr-reset-call
+=
+
+Finds potentially erroneous calls to ``reset`` method on smart pointers when
+the pointee type also has a
https://github.com/MaskRay closed
https://github.com/llvm/llvm-project/pull/128428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,69 @@
+//===--- UnintendedCharOstreamOutputCheck.cpp - clang-tidy
===//
+//
+// 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: Apa
https://github.com/thevinster closed
https://github.com/llvm/llvm-project/pull/128285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Vincent Lee
Date: 2025-02-23T12:03:37-08:00
New Revision: 40b0619a53231eafaa879d085b7a7a10441c7f34
URL:
https://github.com/llvm/llvm-project/commit/40b0619a53231eafaa879d085b7a7a10441c7f34
DIFF:
https://github.com/llvm/llvm-project/commit/40b0619a53231eafaa879d085b7a7a10441c7f34.diff
L
https://github.com/llvm-beanz approved this pull request.
Looks reasonable to me, sorry for the review delay.
https://github.com/llvm/llvm-project/pull/121515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/FantasqueX updated
https://github.com/llvm/llvm-project/pull/124315
>From 576dcfa4a403b95665e98f9ff225ab5353192e23 Mon Sep 17 00:00:00 2001
From: Letu Ren
Date: Sat, 25 Jan 2025 01:23:52 +0800
Subject: [PATCH 1/6] [Sema] Add code completion for if constexpr
C++17 supports `i
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 9d1fbbd2b9a00248eb8ea578c4047af4ec4da990
914e63cbc8ac24c808da647fe9516e1d10866c87 --e
FantasqueX wrote:
Hi @HighCommander4 thanks for your suggestions. I'm happy to add snippets
support for `if constexpr` and `if consteval`. Since `if
constexp` and `if !consteval` is valid, I
decided to add code snippet completion in the specific code completion function
instead of in
https://github.com/FantasqueX updated
https://github.com/llvm/llvm-project/pull/124315
>From 576dcfa4a403b95665e98f9ff225ab5353192e23 Mon Sep 17 00:00:00 2001
From: Letu Ren
Date: Sat, 25 Jan 2025 01:23:52 +0800
Subject: [PATCH 1/7] [Sema] Add code completion for if constexpr
C++17 supports `i
@@ -0,0 +1,68 @@
+// RUN: %check_clang_tidy %s readability-ambiguous-smartptr-reset-call %t \
PiotrZSL wrote:
you could merge this file into main test, just have 2 RUN commands there and
specify custom suffix for this one (you may need to include current default
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ujan-r updated
https://github.com/llvm/llvm-project/pull/121515
>From 5d86f27c5dc04217252c2569edca23cc0d7edc23 Mon Sep 17 00:00:00 2001
From: Ujan RoyBandyopadhyay <116058173+uja...@users.noreply.github.com>
Date: Thu, 2 Jan 2025 00:20:52 -0600
Subject: [PATCH] [clangd] Reduce
MaskRay wrote:
The include and library path code in the driver needs more love. I have cleaned
up some a few years ago but there is still quite a bit tech debt.
In particular, the 2018 commit you mentioned (https://reviews.llvm.org/D48862)
introduced
```
if (Triple.getVendor() == llvm::Tripl
https://github.com/MaskRay approved this pull request.
https://github.com/llvm/llvm-project/pull/128285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/127896
>From 362b64d31e5f70e4a26ea04c99a58fd5f5ca50ca Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Fri, 14 Feb 2025 12:59:56 -0800
Subject: [PATCH 1/2] Allow arrays to be returned by value in HLSL + test
---
clang/
https://github.com/YutongZhuu updated
https://github.com/llvm/llvm-project/pull/126846
>From d7404029e8998c8c8945cfaa34cf99b743ec2b70 Mon Sep 17 00:00:00 2001
From: Yutong Zhu
Date: Sun, 23 Feb 2025 18:16:06 -0500
Subject: [PATCH] Fix no warning for comparison of integers of different signs
--
@@ -10069,6 +10069,17 @@ static std::optional
TryGetExprRange(ASTContext &C, const Expr *E,
case UO_AddrOf: // should be impossible
return IntRange::forValueOfType(C, GetExprType(E));
+case UO_Not: {
+ std::optional SubRange = TryGetExprRange(
+ C,
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -4979,3 +4979,16 @@ def NoTrivialAutoVarInit: InheritableAttr {
let Documentation = [NoTrivialAutoVarInitDocs];
let SimpleHandler = 1;
}
+
+def Atomic : StmtAttr {
+ let Spellings = [Clang<"atomic">];
+ let Args = [VariadicStringArgument<"Options">];
y
https://github.com/qiongsiwu created
https://github.com/llvm/llvm-project/pull/128446
This PR explicitly sets `DebugCompilationDir` to the system's root directory if
it is safe to ignore the current working directory.
This fixes a problem where a PCM file's embedded debug information can lead
qiongsiwu wrote:
Note to reviewers:
This fixes rdar://145249881, but I'd like to get some input on two things.
1. I am not sure if it is a good idea to always set `DebugCompilationDir` to
root. I chose it because I think it is safe and all systems should have the
root directory. I am all ear
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -111,8 +111,13 @@ class SValExplainer : public
FullSValVisitor {
}
std::string VisitSymbolConjured(const SymbolConjured *S) {
-return "symbol of type '" + S->getType().getAsString() +
- "' conjured at statement '" + printStmt(S->getStmt()) + "'";
+std
@@ -113,8 +113,18 @@ class SValExplainer : public
FullSValVisitor {
}
std::string VisitSymbolConjured(const SymbolConjured *S) {
-return "symbol of type '" + S->getType().getAsString() +
- "' conjured at statement '" + printStmt(S->getStmt()) + "'";
+std
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/128251
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -467,7 +467,7 @@ void IteratorModeling::handleComparison(CheckerContext &C,
const Expr *CE,
SymbolRef Sym;
if (!LPos || !RPos) {
auto &SymMgr = C.getSymbolManager();
-Sym = SymMgr.conjureSymbol(CE, C.getLocationContext(),
isuckatcs wrote:
`CE`
@@ -2261,7 +2265,8 @@ void CStringChecker::evalStrcpyCommon(CheckerContext &C,
const CallEvent &Call,
// If this is a stpcpy-style copy, but we were unable to check for a buffer
// overflow, we still need a result. Conjure a return value.
if (ReturnEnd && Result.is
@@ -130,8 +130,9 @@ void
ErrnoTesterChecker::evalSetErrnoIfErrorRange(CheckerContext &C,
ProgramStateRef StateFailure = State->BindExpr(
Call.getOriginExpr(), C.getLocationContext(), SVB.makeIntVal(1, true));
- DefinedOrUnknownSVal ErrnoVal = SVB.conjureSymbolVal(
-
@@ -171,19 +172,11 @@ class SValBuilder {
// Forwarding methods to SymbolManager.
- const SymbolConjured* conjureSymbol(const Stmt *stmt,
- const LocationContext *LCtx,
- QualType type,
-
@@ -1665,8 +1666,9 @@ void CStringChecker::evalMemcmp(CheckerContext &C, const
CallEvent &Call,
State = CheckBufferAccess(C, State, Left, Size, AccessKind::read, CK);
if (State) {
// The return value is the comparison result, which we don't know.
- SVal CmpV
@@ -695,6 +695,18 @@ class CFGBlock {
void dump() const {
dumpToStream(llvm::errs());
}
+
+void Profile(llvm::FoldingSetNodeID &ID) const {
+ ID.AddPointer(Parent);
+ ID.AddInteger(Index);
+}
+
+int64_t getID() const {
+ return Parent->g
@@ -229,7 +230,7 @@ DefinedSVal makeRetVal(CheckerContext &C, const CallExpr
*CE) {
const LocationContext *LCtx = C.getLocationContext();
return C.getSValBuilder()
- .conjureSymbolVal(nullptr, CE, LCtx, C.blockCount())
isuckatcs wrote:
`CE` in unuse
@@ -2469,14 +2475,14 @@ void CStringChecker::evalStrsep(CheckerContext &C,
// further along in the same string, or NULL if there are no more tokens.
State =
State->bindLoc(*SearchStrLoc,
- SVB.conjureSymbolVal(getTag(), Call.getOriginExpr()
@@ -260,7 +260,7 @@ ProgramStateRef setErrnoStdMustBeChecked(ProgramStateRef
State,
const MemRegion *ErrnoR = State->get();
if (!ErrnoR)
return State;
- State = State->invalidateRegions(ErrnoR, InvalE, C.blockCount(),
isuckatcs wrote:
`InvalE` is an
@@ -2520,7 +2526,8 @@ void CStringChecker::evalStdCopyCommon(CheckerContext &C,
SValBuilder &SVB = C.getSValBuilder();
SVal ResultVal =
- SVB.conjureSymbolVal(nullptr, Call.getOriginExpr(), LCtx,
C.blockCount());
+ SVB.conjureSymbolVal(nullptr, Call.getOriginExp
@@ -326,7 +330,7 @@ void ContainerModeling::handleAssignment(CheckerContext &C,
SVal Cont,
auto &SVB = C.getSValBuilder();
// Then generate and assign a new "end" symbol for the new container.
auto NewEndSym =
- SymMgr.conjureSymbol(C
@@ -80,17 +81,18 @@ class SymbolRegionValue : public SymbolData {
/// A symbol representing the result of an expression in the case when we do
/// not know anything about what the expression is.
class SymbolConjured : public SymbolData {
- const Stmt *S;
+ const CFGBlock::Con
@@ -494,7 +494,7 @@ void IteratorModeling::handleComparison(CheckerContext &C,
const Expr *CE,
auto &SymMgr = C.getSymbolManager();
auto *LCtx = C.getLocationContext();
RetVal = nonloc::SymbolVal(SymMgr.conjureSymbol(
-CE, LCtx, C.getASTContext().BoolTy, C.
@@ -113,8 +113,18 @@ class SValExplainer : public
FullSValVisitor {
}
std::string VisitSymbolConjured(const SymbolConjured *S) {
-return "symbol of type '" + S->getType().getAsString() +
- "' conjured at statement '" + printStmt(S->getStmt()) + "'";
+std
@@ -1794,7 +1797,8 @@ void CStringChecker::evalstrLengthCommon(CheckerContext
&C,
// value, so it can be used in constraints, at least.
if (result.isUnknown()) {
result = C.getSValBuilder().conjureSymbolVal(
- nullptr, Call.getOriginExpr(), LCtx, C.block
@@ -2469,14 +2475,14 @@ void CStringChecker::evalStrsep(CheckerContext &C,
// further along in the same string, or NULL if there are no more tokens.
State =
State->bindLoc(*SearchStrLoc,
- SVB.conjureSymbolVal(getTag(), Call.getOriginExpr()
@@ -2361,8 +2366,9 @@ void CStringChecker::evalStrcmpCommon(CheckerContext &C,
const CallEvent &Call,
const StringLiteral *RightStrLiteral =
getCStringLiteral(C, state, Right.Expression, RightVal);
bool canComputeResult = false;
- SVal resultVal = svalBuilder.conjur
@@ -151,6 +151,11 @@ class CheckerContext {
return Pred->getSVal(S);
}
+ /// Get the CFG Element Ref from the ExprEngine
isuckatcs wrote:
I think you can remove this comment. It's obvious what the function does even
without it.
https://github.com/llv
https://github.com/isuckatcs requested changes to this pull request.
I didn't have enough time to check the whole patch, I'll get back to it later.
The general patterns seems to be that when a conjured symbol is created, it's
always the reference to the current CFG element that is passed as the
@@ -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
@@ -533,18 +538,12 @@ class SymbolManager {
template
const SymExprT *acquire(Args &&...args);
- const SymbolConjured *conjureSymbol(const Stmt *E,
- const LocationContext *LCtx, QualType T,
- unsig
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Qiongsi Wu (qiongsiwu)
Changes
This PR explicitly sets `DebugCompilationDir` to the system's root directory if
it is safe to ignore the current working directory.
This fixes a problem where a PCM file's embedded debug information can lea
https://github.com/qiongsiwu converted_to_draft
https://github.com/llvm/llvm-project/pull/128446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3101,6 +3101,11 @@ class Parser : public CodeCompletionHandler {
std::optional ParseAvailabilitySpec();
ExprResult ParseAvailabilityCheckExpr(SourceLocation StartLoc);
+ void ParseAtomicAttribute(IdentifierInfo &AttrName,
yxsamliu wrote:
will use Var
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -198,32 +191,24 @@ class SValBuilder {
/// The advantage of symbols derived/built from other symbols is that we
/// preserve the relation between related(or even equivalent) expressions, so
/// conjured symbols should be used sparingly.
- DefinedOrUnknownSVal conjureS
@@ -171,19 +172,11 @@ class SValBuilder {
// Forwarding methods to SymbolManager.
- const SymbolConjured* conjureSymbol(const Stmt *stmt,
- const LocationContext *LCtx,
- QualType type,
-
@@ -1770,7 +1772,8 @@ void CStringChecker::evalstrLengthCommon(CheckerContext
&C,
// All we know is the return value is the min of the string length
// and the limit. This is better than nothing.
result = C.getSValBuilder().conjureSymbolVal(
- nullpt
@@ -198,32 +191,24 @@ class SValBuilder {
/// The advantage of symbols derived/built from other symbols is that we
/// preserve the relation between related(or even equivalent) expressions, so
/// conjured symbols should be used sparingly.
- DefinedOrUnknownSVal conjureS
@@ -533,18 +538,12 @@ class SymbolManager {
template
const SymExprT *acquire(Args &&...args);
- const SymbolConjured *conjureSymbol(const Stmt *E,
- const LocationContext *LCtx, QualType T,
- unsig
@@ -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
@@ -198,32 +191,24 @@ class SValBuilder {
/// The advantage of symbols derived/built from other symbols is that we
/// preserve the relation between related(or even equivalent) expressions, so
/// conjured symbols should be used sparingly.
- DefinedOrUnknownSVal conjureS
@@ -1376,8 +1379,8 @@ StoreRef RegionStoreManager::invalidateRegions(
}
RegionBindingsRef B = getRegionBindings(store);
- InvalidateRegionsWorker W(*this, StateMgr, B, S, Count, LCtx, IS, ITraits,
-Invalidated, GlobalsFilter);
+ InvalidateRegi
@@ -151,10 +151,10 @@ SValBuilder::getRegionValueSymbolVal(const
TypedValueRegion *region) {
return nonloc::SymbolVal(sym);
}
-DefinedOrUnknownSVal SValBuilder::conjureSymbolVal(const void *SymbolTag,
fangyi-zhou wrote:
This overload would have been remove
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/128103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vitalybuka updated
https://github.com/llvm/llvm-project/pull/121115
>From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001
From: Vitaly Buka
Date: Wed, 25 Dec 2024 14:22:10 -0800
Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?=
=?
vitalybuka wrote:
@AaronBallman @zygoloid
Looks like we agree on
https://discourse.llvm.org/t/rfc-remove-vptr-from-undefined/83830
So I'd like to merge this patch this week.
https://github.com/llvm/llvm-project/pull/121115
___
cfe-commits mailing lis
1 - 100 of 171 matches
Mail list logo