mizvekov wrote:
> Additionally, just for some namespace sanity (especially from the perspective
> of Linux's use of OBTs), can we have the type specifier named
> "__ob_$behavior": __ob_wrap, __ob_trap ? That would make things a bit cleaner
> for Linux's resulting macros for OBT usage to de-con
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/160230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Matheus Izvekov
Date: 2025-09-21T20:06:20-03:00
New Revision: cafc064fc7a96b3979a023ddae1da2b499d6c954
URL:
https://github.com/llvm/llvm-project/commit/cafc064fc7a96b3979a023ddae1da2b499d6c954
DIFF:
https://github.com/llvm/llvm-project/commit/cafc064fc7a96b3979a023ddae1da2b499d6c954.dif
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/160018
This fixes a bunch of bugs with how non-type template parameters are
transformed and used in template argument deduction.
>From a0db4a10c306786d3ab689c4094a2676c18f2c53 Mon Sep 17 00:00:00 2001
From: Matheus I
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/159996
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
@bgra8 thanks, this will be fixed here:
https://github.com/llvm/llvm-project/pull/159996
https://github.com/llvm/llvm-project/pull/155313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/mizvekov auto_merge_enabled
https://github.com/llvm/llvm-project/pull/159996
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/159996
This fixes a regression reported here:
https://github.com/llvm/llvm-project/pull/155313#issuecomment-3315883183
Since this regression was never released, there are no release notes.
>From ba72adf11519440ceffe
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/159952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Sensible? Or presumably we can have an always-inline function wrapper for
> that, and the inliner will just take care of it.
Yeah, I think the inline helper is cleaner, we can just discard ID before
calling anything not inline.
https://github.com/llvm/llvm-project/pull/15769
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/158541
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/158541
>From 61ae9330db770dca8f8f9796c741699894154192 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 15 Sep 2025 01:58:01 -0300
Subject: [PATCH] [clang] remove workaround for SubstNonTypeTemplateParmExpr
t
@@ -339,6 +389,8 @@ ConvertTypeToDiagnosticString(ASTContext &Context, QualType
Ty,
<< "' " << Values << ")";
return DecoratedString;
}
+
+TryConvertOverflowBehaviorTypeToDiagnosticString(Context, Ty, S);
mizvekov wrote:
If you feel the
@@ -339,6 +389,8 @@ ConvertTypeToDiagnosticString(ASTContext &Context, QualType
Ty,
<< "' " << Values << ")";
return DecoratedString;
}
+
+TryConvertOverflowBehaviorTypeToDiagnosticString(Context, Ty, S);
mizvekov wrote:
> I suppose I e
@@ -339,6 +389,8 @@ ConvertTypeToDiagnosticString(ASTContext &Context, QualType
Ty,
<< "' " << Values << ")";
return DecoratedString;
}
+
+TryConvertOverflowBehaviorTypeToDiagnosticString(Context, Ty, S);
mizvekov wrote:
If you would li
@@ -339,6 +389,8 @@ ConvertTypeToDiagnosticString(ASTContext &Context, QualType
Ty,
<< "' " << Values << ")";
return DecoratedString;
}
+
+TryConvertOverflowBehaviorTypeToDiagnosticString(Context, Ty, S);
mizvekov wrote:
These names sta
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/159677
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -foverflow-behavior-types -std=c++11 -ast-print %s -o - |
FileCheck %s
+
+extern int __attribute__((overflow_behavior(no_wrap))) a;
+extern int __attribute__((overflow_behavior(wrap))) b;
+
+// CHECK: extern __no_wrap int a;
+// CHECK: extern _
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -foverflow-behavior-types -std=c++11 -ast-print %s -o - |
FileCheck %s
+
+extern int __attribute__((overflow_behavior(no_wrap))) a;
+extern int __attribute__((overflow_behavior(wrap))) b;
+
+// CHECK: extern __no_wrap int a;
+// CHECK: extern _
@@ -1222,6 +1222,16 @@ static IsTupleLike isTupleLike(Sema &S, SourceLocation
Loc, QualType T,
if (E.isInvalid())
return IsTupleLike::Error;
+ if (Size < 0 || Size >= UINT_MAX) {
mizvekov wrote:
The host compiler uintmax is the right thing, because we
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/159677
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/159677
>From 97daa1ef4603eec3c7cf9551db188c000849e907 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Thu, 18 Sep 2025 20:22:40 -0300
Subject: [PATCH] [clang] diagnose invalid std::tuple_size sizes
Fixes #159563
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/159819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/159819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/159677
>From 2b8e0e637ee7f1ab4d55b3926f2d694d05d168bb Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Thu, 18 Sep 2025 20:22:40 -0300
Subject: [PATCH] [clang] diagnose invalid std::tuple_size sizes
Fixes #159563
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/159819
This fixes a regression reported here:
https://github.com/llvm/llvm-project/pull/159463#issuecomment-3312157416 Since
this regression was never released, there are no release notes.
>From 21d07e400ab154a298cd
@@ -282,6 +287,11 @@ class TypeConstraint {
}
};
+/// Insertion operator for diagnostics. This allows sending TemplateName's
mizvekov wrote:
```suggestion
/// Insertion operator for diagnostics. This allows sending ConceptReferences
```
https://github.co
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/159463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
Alright, I just thought of a new test case, which my patch doesn't actually
change anything.
I'll try to get that one covered in another patch.
https://github.com/llvm/llvm-project/pull/159463
___
cfe-commits mailing list
cfe-commits@l
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/159463
>From f0e35786d31bb99f31a625a67c89c211cbe6dac1 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Wed, 17 Sep 2025 18:12:36 -0300
Subject: [PATCH] [clang] check constant template parameters in dependent
cont
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/159566
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -145,8 +145,11 @@ std::string getQualification(ASTContext &Context,
for (const auto *CurD : llvm::reverse(Parents)) {
if (auto *TD = llvm::dyn_cast(CurD)) {
QualType T;
- if (const auto *RD = dyn_cast(TD);
mizvekov wrote:
This should be pos
@@ -145,8 +145,11 @@ std::string getQualification(ASTContext &Context,
for (const auto *CurD : llvm::reverse(Parents)) {
if (auto *TD = llvm::dyn_cast(CurD)) {
QualType T;
- if (const auto *RD = dyn_cast(TD);
- ClassTemplateDecl *CTD = RD->getDescribed
mizvekov wrote:
> I think this makes sense, it seems to do as described at least. I'm not sure
> WHAT, but it feels like we could/should do a better job with some
> demonstrative tests though.
I am open to suggestions, I can't think of anything which would demonstrate
this better or show some
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -foverflow-behavior-types -std=c++11 -ast-print %s -o - |
FileCheck %s
+
+extern int __attribute__((overflow_behavior(no_wrap))) a;
+extern int __attribute__((overflow_behavior(wrap))) b;
+
+// CHECK: extern __no_wrap int a;
+// CHECK: extern _
@@ -112,6 +112,25 @@ class LangOptionsBase {
SOB_Trapping
};
+ // Used by __attribute__((overflow_behavior())) to describe overflow behavior
+ // on a per-type basis.
+ enum OverflowBehaviorKind {
+// Default C standard behavior (type dependent).
+OB_Unset,
+
@@ -9002,6 +9057,10 @@ inline bool Type::isIntegralOrEnumerationType() const {
if (const auto *ET = dyn_cast(CanonicalType))
return IsEnumDeclComplete(ET->getOriginalDecl());
+ if (const OverflowBehaviorType *OBT =
+ dyn_cast(CanonicalType))
mi
https://github.com/mizvekov approved this pull request.
Yeah, that's the intent. Thanks!
https://github.com/llvm/llvm-project/pull/159154
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/158541
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
FYI the test change here is not really correct (and so it is not in
https://github.com/llvm/llvm-project/pull/141776, where I have taken it from).
I have figured out since that calling the semantic action is necessary here,
this is just not modeled correctly in clang.
https://
@@ -2446,40 +2446,14 @@
TemplateInstantiator::TransformSubstNonTypeTemplateParmExpr(
SubstReplacement = TransformExpr(E->getReplacement());
if (SubstReplacement.isInvalid())
return true;
- QualType SubstType = TransformType(E->getParameterType(getSema().Context));
-
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/158541
>From 65d24f0b573f2250bf4f99759ecc33f5d6d9ac3a Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 15 Sep 2025 01:58:01 -0300
Subject: [PATCH] [clang] remove workaround for SubstNonTypeTemplateParmExpr
t
@@ -9,20 +9,24 @@ concept C2 = C1;
// sizeof(U) >= 4 [U = V (decltype(Y{}))]
template
-constexpr int foo() requires C2 { return 1; }
+constexpr int foo() requires C2 { return 1; } // #cand1
// sizeof(U) >= 4 [U = W (decltype(int{}))]
template
// expected-note@+1{{candidat
https://github.com/mizvekov ready_for_review
https://github.com/llvm/llvm-project/pull/158541
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/158541
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/158515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1379,216 +1890,327 @@ static void
diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S,
S.DiagnoseTypeTraitDetails(SubstExpr);
}
-template
static void diagnoseUnsatisfiedConstraintExpr(
-Sema &S, const llvm::PointerUnion
&Record,
-bool First = true) {
- if (a
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/158541
None
>From 297953bedf93135420d86e8289b4a9d59598f4a2 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 15 Sep 2025 01:58:01 -0300
Subject: [PATCH] [clang] WIP: remove workaround for
SubstNonTypeTemplat
@@ -1257,4 +1256,35 @@ template concept PerfectSquare = [](){} //
expected-note 2{{here}}
([](auto) { return true; }) < PerfectSquare ;
// expected-error@-1 {{declaration of 'T' shadows template parameter}} \
// expected-error@-1 {{a concept definition cannot refer to itself}
@@ -1379,216 +1890,327 @@ static void
diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S,
S.DiagnoseTypeTraitDetails(SubstExpr);
}
-template
static void diagnoseUnsatisfiedConstraintExpr(
-Sema &S, const llvm::PointerUnion
&Record,
-bool First = true) {
- if (a
@@ -1257,4 +1256,35 @@ template concept PerfectSquare = [](){} //
expected-note 2{{here}}
([](auto) { return true; }) < PerfectSquare ;
// expected-error@-1 {{declaration of 'T' shadows template parameter}} \
// expected-error@-1 {{a concept definition cannot refer to itself}
@@ -7085,18 +7102,24 @@ ExprResult
Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
? Context.getIntWidth(IntegerType)
: Context.getTypeSize(IntegerType));
- SugaredConverted = TemplateArgum
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/158515
This is a follow-up to #134461, reverting some unnecessary changes.
This cleans up some checks around the assumption that a pack expansion on the
argument side could appear when checking non-type template argu
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/158109
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Could this information help you pin-point the issue, or a reproducer is
> necessary?
@bgra8 Thanks for the heads-up, a reproducer is always helpful, as we can
include it in the test suite and make sure it never happens again. Since this
involves modules, it probably wouldn'
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/157925
This fixes an assumption that the ExtInfo for two same function types would
have referential equality.
This should compare these ExtInfos by value instead.
The bug is pre-existing to https://github.com/llvm/l
@@ -16,130 +16,385 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
+#include "clang/AST/ExprConcepts.h"
#include "clang/Basic/SourceLocation.h"
+#include "clang/Sema/Ownership.h"
#include "llvm/ADT/FoldingSet.h"
-#include "
https://github.com/mizvekov commented:
Just a first pass, I'll try to get some time to fully review later.
https://github.com/llvm/llvm-project/pull/141776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -606,8 +606,11 @@ TemplateArgumentLoc::TemplateArgumentLoc(ASTContext &Ctx,
LocInfo(Ctx, TemplateKWLoc, QualifierLoc, TemplateNameLoc, EllipsisLoc) {
assert(Argument.getKind() == TemplateArgument::Template ||
Argument.getKind() == TemplateArgument::TemplateE
https://github.com/mizvekov commented:
Can you test this on https://llvm-compile-time-tracker.com to spot any
regressions?
https://github.com/llvm/llvm-project/pull/158120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
@@ -16,130 +16,385 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
+#include "clang/AST/ExprConcepts.h"
#include "clang/Basic/SourceLocation.h"
+#include "clang/Sema/Ownership.h"
#include "llvm/ADT/FoldingSet.h"
-#include "
mizvekov wrote:
> I've tweaked `ValueOrSentinel` to allow passing an "adjustment" which allows
> it to handle use cases like `UnsignedOrNone`.
It seems like UnsignedOrNone is the only use case where we care about what the
internal representation looks like.
And it seems like the other users a
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/141776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/158109
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -222,7 +222,6 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(declRefExpr);
REGISTER_MATCHER(dependentNameType);
REGISTER_MATCHER(dependentScopeDeclRefExpr);
- REGISTER_MATCHER(dependentTemplateSpecializationType);
mizvekov wrote:
The matcher is h
mizvekov wrote:
@joanahalili @alexfh that's fixed in
https://github.com/llvm/llvm-project/pull/157925
https://github.com/llvm/llvm-project/pull/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/157925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
I think having to call a separate thing at every use site is a bit prone to
error. Can't we just check this at `InsertNode` instead?
https://github.com/llvm/llvm-project/pull/157692
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
mizvekov wrote:
> I noticed that some tests are dropped in the PR, esp. eg. in the AST
> unittests. Did you check the test coverage if that wouldn't shrink due to
> those removals? In the ASTImporter I remember a few years ago we added some
> tests to exercise the uncovered ctors and getters o
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/157019
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
ping, I need feedback from the DebugInfo experts, do the test changes look good?
https://github.com/llvm/llvm-project/pull/155120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -2107,6 +2107,8 @@ void ASTDeclMerger::MergeDefinitionData(
auto *Def = DD.Definition;
DD = std::move(MergeDD);
DD.Definition = Def;
+for (auto *TD : Def->redecls())
mizvekov wrote:
There's no such a thing as `noload_redecls`, you may be con
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/157019
>From c086682815e47b4fb863bb475eb5b02156aa6172 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 1 Sep 2025 17:14:19 -0300
Subject: [PATCH] [clang] fix definition data not being propagated to all
redec
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/157019
This fixes the workaround added in 8a63989, so that when a fake definition data
is corrected, all redeclarations are also updated to point to it.
Since this regression was never released, there are no release
https://github.com/mizvekov approved this pull request.
LGTM.
I don't love the new bool parameter, but I don't see a simple way to avoid it,
and this change is too simple to be worth asking for such a change.
https://github.com/llvm/llvm-project/pull/156329
mizvekov wrote:
I'd suggest wait for the other reviewers, or until next week if no response.
https://github.com/llvm/llvm-project/pull/156329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/156329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov deleted
https://github.com/llvm/llvm-project/pull/156329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
mizvekov wrote:
> OK, I understand. Could you point me to where that pattern selection happens?
> I will not be able to work on that PR for two weeks but I can go back on it
> afterward.
In `Sema::InstantiateClass`, which is implemented in
SemaTemplateInstantiate.cpp.
https://github.com/llvm
mizvekov wrote:
The problem is not whether the template instantiation is a definition or not,
if the type is required to be complete, then it needs to be a definition. If
it's not required to be complete, then it doesn't need to be.
What happens here is that when the instantiation is needed, b
mizvekov wrote:
> @mizvekov The ast-dump test I added passes locally, but the CI is failing to
> match the string. How do I resolve this?
I would guess that kind of problem is due to line ending differences.
But in any case, I was thinking more about doing text-mode ast-dump tests.
If you wan
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/156127
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov auto_merge_enabled
https://github.com/llvm/llvm-project/pull/156127
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/156127
Use the castAs acessor for the type for a UsingEnumDecl, as it can be sugar for
an EnumType.
Fixes a regression reported here:
https://github.com/llvm/llvm-project/pull/155313#issuecomment-3238482327
Since t
mizvekov wrote:
> The most important part for me, is that if
> `TagDecl::isThisDeclarationADefinition()` returns true, then I need
> `getSourceRange()` to return the content of the definition.
That's a more interesting limited part of the problem.
It seems strange to me that we produce a temp
mizvekov wrote:
> Thanks for the feedback @mizvekov. I propose this change for the following
> reasons:
>
> * Class template implicit instantiations have technically no source range
> anywhere, which is why I think having the same behavior as function template
> implicit instantiations or var
mizvekov wrote:
> Which file is appropriate to add it to? Or should I create a new file?
For common-type concerns, you can add it to `Sema/sugar-common-types.c` for C
code, or `clang/test/SemaCXX/sugar-common-types.cpp` for C++.
For AST dumps, I don't see a great fit anywhere, so if you create
mizvekov wrote:
You could include your opening snippet as a test case within the patch. Or even
a simple AST dump test case showing these types contain __size_t et al as
bottom-level sugar.
https://github.com/llvm/llvm-project/pull/155979
___
cfe-com
https://github.com/mizvekov commented:
Why is this the correct behavior, rather than the other way around?
The patch seems to leave no way to query the source range of this declaration,
rather than the definition.
On the other hand, querying the source range of the definition is currently
pos
mizvekov wrote:
> If they are including `Type.h` in files that only exist downstream that will
> force them to deal with this both times around, unless I am missing something.
No, they would only have had to do that if they had rebased in between this
commit landing and the next one, but that
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/155965
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov auto_merge_disabled
https://github.com/llvm/llvm-project/pull/155965
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov auto_merge_enabled
https://github.com/llvm/llvm-project/pull/155965
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/155965
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/155965
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/155965
…context
Fix an error in the logic meant to handle a redeclaration such as:
```C++
struct A {
struct __attribute__((foo)) A *ptr;
};
```
In the declaration of ptr, we must introduce a new redeclaration of A i
1 - 100 of 1782 matches
Mail list logo