@@ -1383,6 +1394,15 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
<< nextPathEntryRange(Path, I + 1, L);
break;
}
+
+ case IndirectLocalPathEntry::DefaultArg: {
+const auto *DAE = cast(Elem.E);
+SemaRef.Diag(DAE->getParam()->
@@ -107,6 +107,39 @@ namespace std {
using std::operator""s;
using std::operator""sv;
+namespace default_args {
+ using IntArray = int[];
bricknerb wrote:
Is this helpful if this is only used once?
https://github.com/llvm/llvm-project/pull/112047
__
@@ -107,6 +107,39 @@ namespace std {
using std::operator""s;
using std::operator""sv;
+namespace default_args {
+ using IntArray = int[];
+ const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); //
#def1
+ const int &defaultparam_array([[clang::lifetimebou
@@ -107,6 +107,39 @@ namespace std {
using std::operator""s;
using std::operator""sv;
+namespace default_args {
+ using IntArray = int[];
+ const int *defaultparam1(const int &def1 [[clang::lifetimebound]] = 0); //
#def1
+ const int &defaultparam_array([[clang::lifetimebou
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/5] [clang] When checking for covariant return types, make
su
@@ -1370,7 +1381,7 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
break;
}
- case IndirectLocalPathEntry::LambdaCaptureInit:
+ case IndirectLocalPathEntry::LambdaCaptureInit: {
bricknerb wrote:
Revert this change as it seems unrel
https://github.com/bricknerb deleted
https://github.com/llvm/llvm-project/pull/112047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1370,7 +1381,7 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
break;
}
- case IndirectLocalPathEntry::LambdaCaptureInit:
+ case IndirectLocalPathEntry::LambdaCaptureInit: {
bricknerb wrote:
Revert this change as it is unrelate
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted
+
+class AClass {
+public:
+ AClass() {}
+ AClass &f() { return *this; }
+};
+
+#define CALLS1 f
+#define CALLS2 CALLS1().CALLS1
+#define CALLS4 CALLS2().CALLS2
+#define CALLS8 CALLS4().CALLS4
+#define CAL
@@ -0,0 +1,1013 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted -verify
+
+class AClass {
+public:
+ AClass() {}
+ AClass &foo() { return *this; }
+};
+
+void test_bar() {
+ AClass a;
+ // expected-warning@* {{stack nearly exhausted; compilation time may suffer,
a
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted
bricknerb wrote:
Resolving since we decided to remove this test.
https://github.com/llvm/llvm-project/pull/111701
___
cfe-commits mailing list
c
@@ -1596,6 +1597,19 @@ void CodeGenModule::ErrorUnsupported(const Decl *D,
const char *Type) {
getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID) << Msg;
}
+void CodeGenModule::warnStackExhausted(SourceLocation Loc) {
+ // Only warn about this once.
+ if (!Wa
@@ -0,0 +1,1013 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted -verify
+
+class AClass {
+public:
+ AClass() {}
+ AClass &foo() { return *this; }
+};
+
+void test_bar() {
+ AClass a;
+ // expected-warning@* {{stack nearly exhausted; compilation time may suffer,
a
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111799
>From cd82d15940ca3873d57de2e9f12e14c2544138dc Mon Sep 17 00:00:00 2001
From: bricknerb
Date: Thu, 10 Oct 2024 07:44:19 +
Subject: [PATCH] Move Sema::WarnedStackExhausted from public to private.
---
clan
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112371
>From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH 1/2] [clang] Dedupliate the logic that only warns once when
st
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/112371
Zero diff in behavior.
>From b4c0afe1b691ce4e48b74884ac771a7038bd5de2 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH] [clang] Dedupliate the logic that only
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/111701
Done by calling clang::runWithSufficientStackSpace().
Added CodeGenModule::runWithSufficientStackSpace() method similar to the one in
Sema to provide a single warning when this triggers
Fixes: #111699
>From
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/111701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/111518
None
>From ac3936f80c139adcbd9872d1f56ba3b24162dc9e Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 8 Oct 2024 11:44:26 +0200
Subject: [PATCH 1/2] Fix Sema::makeUnavailableInSystemHeader() indentation
bricknerb wrote:
Thanks for the feedback!
This all makes sense.
For context, I was going through some of the code and saw some formatting and
thought it would be more readable to fix those.
I do understand the tradeoff here, so I'll close this pull request.
https://github.com/llvm/llvm-project/
https://github.com/bricknerb closed
https://github.com/llvm/llvm-project/pull/111518
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/2] [clang] When checking for covariant return types, make
su
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/2] [clang] When checking for covariant return types, make
su
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111701
>From 1a63281b6c240352653fd2e4299755c1f32a76f4 Mon Sep 17 00:00:00 2001
From: bricknerb
Date: Wed, 9 Oct 2024 15:05:34 +
Subject: [PATCH 1/2] [clang] Fix segmentation fault caused by stack overflow
on dee
@@ -5817,7 +5817,10 @@ LValue CodeGenFunction::EmitHLSLArrayAssignLValue(const
BinaryOperator *E) {
LValue CodeGenFunction::EmitCallExprLValue(const CallExpr *E,
llvm::CallBase **CallOrInvoke) {
- RValue RV = EmitCallExpr(E, ReturnV
@@ -289,3 +289,13 @@ namespace PR8168 {
static void foo() {} // expected-error{{'static' member function 'foo'
overrides a virtual function}}
};
}
+
+namespace T13 {
+ struct A {
+virtual const int *f() const; // expected-note{{overridden virtual
function is here}}
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/111856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/4] [clang] When checking for covariant return types, make
su
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/3] [clang] When checking for covariant return types, make
su
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/5] [clang] When checking for covariant return types, make
su
@@ -1183,7 +1181,7 @@ class Sema final : public SemaBase {
std::optional> CachedDarwinSDKInfo;
bool WarnedDarwinSDKInfoMissing = false;
- bool WarnedStackExhausted = false;
+ SingleWarningStackAwareExecutor StackAwareExecutor;
bricknerb wrote:
Yes, I co
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/112552
Zero diff in behavior.
>From 8ff7b52319c5525a4ff26c324c283c6b0d249de3 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH 1/3] [clang] Dedupliate the logic that
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112552
>From 8ff7b52319c5525a4ff26c324c283c6b0d249de3 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH 1/4] [clang] Dedupliate the logic that only warns once when
st
bricknerb wrote:
>From what I can tell, buildkite failures seem unrelated.
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bricknerb wrote:
> Can you merge `main` into your branch? I think that should fix the CI
> failures.
Done.
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/bricknerb reopened
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112853
>From b1ffbf6b7a59d1e57dccf8b9fab32c2c7d599058 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Mon, 21 Oct 2024 13:07:37 +0200
Subject: [PATCH] [clang] Add covariance tests that make sure we return an
erro
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112853
>From b1ffbf6b7a59d1e57dccf8b9fab32c2c7d599058 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Mon, 21 Oct 2024 13:07:37 +0200
Subject: [PATCH 1/2] [clang] Add covariance tests that make sure we return an
bricknerb wrote:
> You should write a test in `clang/test/CXX/drs/cwg0xx.cpp`, possibly by
> moving the test you've written there. While doing that, you should follow the
> example of other tests in that file, which includes the way `expected`
> directives are written, and the presence of `//
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112853
>From b1ffbf6b7a59d1e57dccf8b9fab32c2c7d599058 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Mon, 21 Oct 2024 13:07:37 +0200
Subject: [PATCH 1/6] [clang] Add covariance tests that make sure we return an
@@ -93,6 +93,38 @@ struct B : A {
} // namespace example2
} // namespace cwg952
+namespace cwg960 { // cwg960: 2.8
+struct a {};
+class A {
+#if __cplusplus >= 201103L
+ // Check lvalue ref vs rvalue ref vs pointer.
+ virtual a& rvalue_ref();
+ virtual a&& lvalue_ref();
+
@@ -93,6 +93,38 @@ struct B : A {
} // namespace example2
} // namespace cwg952
+namespace cwg960 { // cwg960: 2.8
+struct a {};
+class A {
+#if __cplusplus >= 201103L
+ // Check lvalue ref vs rvalue ref vs pointer.
+ virtual a& rvalue_ref();
+ virtual a&& lvalue_ref();
+
bricknerb wrote:
> > clang/www/make_cxx_dr_status seems to generate a lot of unrelated changes,
> > so perhaps a separate pull request would make sense if we want to update
> > cxx_dr_status.html.
>
> Ignore other changes; just include the one that updates CWG960 status. I'll
> update the res
@@ -93,6 +93,38 @@ struct B : A {
} // namespace example2
} // namespace cwg952
+namespace cwg960 { // cwg960: 2.8
bricknerb wrote:
Thanks!
Done.
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mai
https://github.com/bricknerb closed
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bricknerb wrote:
Reverted.
https://github.com/llvm/llvm-project/pull/112853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/111499
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -45,10 +48,14 @@ enum LifetimeKind {
/// a default member initializer), the program is ill-formed.
LK_MemInitializer,
- /// The lifetime of a temporary bound to this entity probably ends too soon,
+ /// The lifetime of a temporary bound to this entity may end too soon
@@ -1091,21 +1104,22 @@ static bool
isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
}
static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef,
- const AssignedEntity &Entity) {
+
@@ -18,29 +18,42 @@
namespace clang::sema {
-/// Describes an entity that is being assigned.
-struct AssignedEntity {
- // The left-hand side expression of the assignment.
- Expr *LHS = nullptr;
+struct CapturingEntity {
bricknerb wrote:
I think that using
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
}
}
+static bool IsPointerLikeType(QualType QT) {
+ QT = QT.getNonReferenceType();
+ // if (QT->isPointerType())
+ // return true;
+ auto *RD = QT->getAsCXXRecordDecl();
+ if (!RD)
+re
@@ -3223,6 +3225,49 @@ void Sema::CheckArgAlignment(SourceLocation Loc,
NamedDecl *FDecl,
<< ParamName << (FDecl != nullptr) << FDecl;
}
+void Sema::checkLifetimeCaptureBy(FunctionDecl *FD, bool IsMemberFunction,
+ const Expr *ThisArg,
@@ -18,29 +18,42 @@
namespace clang::sema {
-/// Describes an entity that is being assigned.
-struct AssignedEntity {
- // The left-hand side expression of the assignment.
- Expr *LHS = nullptr;
+struct CapturingEntity {
+ // The expression of the entity which captures ano
bricknerb wrote:
This pull request is a replacement for
https://github.com/llvm/llvm-project/pull/112371.
https://github.com/llvm/llvm-project/pull/112552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -1091,21 +1104,22 @@ static bool
isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
}
static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef,
- const AssignedEntity &Entity) {
+
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/112713
This prevents changing cv-qualification from const to volatile or vice versa,
for example.
https://eel.is/c++draft/class.virtual#8.3
Previously, we checked that the new type is the same or more qualified to
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/112552
>From 8ff7b52319c5525a4ff26c324c283c6b0d249de3 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 15 Oct 2024 14:46:59 +
Subject: [PATCH 1/5] [clang] Dedupliate the logic that only warns once when
st
https://github.com/bricknerb closed
https://github.com/llvm/llvm-project/pull/112552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,45 @@
+//===--- SingleWarningStackAwareExecutor.h - A utility for warning once when
+// close to out of stack space ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for lic
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/111856
https://eel.is/c++draft/class.virtual#8.1
This prevents overriding methods with non class return types that have less
cv-qualification.
Fixes: #111742
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/111799
None
>From cd82d15940ca3873d57de2e9f12e14c2544138dc Mon Sep 17 00:00:00 2001
From: bricknerb
Date: Thu, 10 Oct 2024 07:44:19 +
Subject: [PATCH] Move Sema::WarnedStackExhausted from public to private.
---
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/111799
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb converted_to_draft
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/113437
None
>From cdef16a4e359acb7bea578dfab5e44589f8b6e2b Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Wed, 23 Oct 2024 11:44:45 +0200
Subject: [PATCH] [clang] Update the lifetimebound example with up-to-date
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb ready_for_review
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bricknerb wrote:
The Test documentation build failure seems unrelated since it refers to
ClangCommandLineReference.
https://github.com/llvm/llvm-project/pull/113437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/111856
>From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Thu, 10 Oct 2024 15:15:23 +
Subject: [PATCH 1/5] [clang] When checking for covariant return types, make
su
@@ -289,3 +289,13 @@ namespace PR8168 {
static void foo() {} // expected-error{{'static' member function 'foo'
overrides a virtual function}}
};
}
+
+namespace T13 {
+ struct A {
+virtual const int *f() const; // expected-note{{overridden virtual
function is here}}
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/113460
>From 4405d652029081cd63094e9a81dfa31e8611aad4 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Wed, 23 Oct 2024 15:50:43 +0200
Subject: [PATCH 1/4] [clang] Output a warning when [[lifetimebound]] attribute
https://github.com/bricknerb updated
https://github.com/llvm/llvm-project/pull/113460
>From 4405d652029081cd63094e9a81dfa31e8611aad4 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Wed, 23 Oct 2024 15:50:43 +0200
Subject: [PATCH 1/5] [clang] Output a warning when [[lifetimebound]] attribute
@@ -3702,20 +3702,32 @@ user-declared functions. For example:
.. code-block:: c++
+#include
+#include
+
+using namespace std::literals;
+
// Returns m[key] if key is present, or default_value if not.
template
const U &get_or_default(const std::map
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/114203
Fixes: https://github.com/llvm/llvm-project/issues/107556
>From 82d89b8b5d1e5faebefed57f3289eb43ad9f8d65 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Wed, 30 Oct 2024 11:24:07 +0100
Subject: [PATCH 1/2]
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/114198
I believe this has no effect current behavior but would make code safer in case
we forget to initialize this.
>From 647406c00b1b60b23c3fd4314a1e5b4baeb9e574 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date:
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bricknerb edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
bricknerb wrote:
Yes, I think the current state is pretty b
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
bricknerb wrote:
Add a FIXME/TODO ?
https://github.com/llv
@@ -946,6 +955,27 @@ class DiagnosticsEngine : public
RefCountedBase {
return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this);
}
+ /// Diagnostic suppression mappings can be used to suppress specific
+ /// diagnostics in specific files.
+ /// Mapping file is exp
@@ -477,6 +486,118 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -477,6 +486,118 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -70,6 +76,16 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags,
else
Diags.setExtensionHandlingBehavior(diag::Severity::Ignored);
+ if (!Opts.DiagnosticSuppressionMappingsFile.empty()) {
+if (auto Buf =
bricknerb wrote:
[Buf](https:/
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) {
// Make sure an empty warning can round-trip with \c StoredDiagnostic.
Diags.Report(CaptureConsumer.StoredDiags.front());
}
+
+class SuppressionMappingTest : public testing::Test {
brickne
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
bricknerb wrote:
Consider also testing the same warning belonging to multiple groups.
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
bricknerb wrote:
Given that Test documentation build check failed, it's worth clarifying how the
documentation was tested and perhaps add a few screenshots.
https://github.com/llvm/llvm-project/pull/112517
___
cfe-co
bricknerb wrote:
Consider referring to pragmas.
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
https://github.com/bricknerb created
https://github.com/llvm/llvm-project/pull/114999
Instead of writing "12345678B", write "12345678B (12.34MB)".
>From 6f3c9f95f7ad558659bc7d868ab4d5e5f6af05c0 Mon Sep 17 00:00:00 2001
From: Boaz Brickner
Date: Tue, 5 Nov 2024 15:29:10 +0100
Subject: [PATCH] [
bricknerb wrote:
> Do we really care about the exact byte numbers? Maybe we should only show the
> human-friendly version? It's appealing to have less noise if we can.
Yes, I was considering both options.
It might be useful to see the full number in case you want to diff between
logs, and the
1 - 100 of 305 matches
Mail list logo