@@ -4433,8 +4433,12 @@ Sema::InstantiateClassMembers(SourceLocation
PointOfInstantiation,
// No need to instantiate in-class initializers during explicit
// instantiation.
if (Field->hasInClassInitializer() && TSK == TSK_ImplicitInstantiation) {
+// H
@@ -0,0 +1,585 @@
+//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- 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: Ap
https://github.com/mizvekov approved this pull request.
LGTM
For reference, this takes this change out of
https://github.com/llvm/llvm-project/pull/147835, which reduces the size of
that PR a little bit.
https://github.com/llvm/llvm-project/pull/148195
mizvekov wrote:
> These files test demangling `RecordDecl::isInjectedClassName`, which will be
> out-of-date (I think) after merging this PR.
This file uses these symbols as test cases, but they are just examples and
aren't coupled to the clang implementation at all, the tests are still valid,
https://github.com/mizvekov approved this pull request.
LGTM, but it would be good leaving a FIXME.
https://github.com/llvm/llvm-project/pull/147675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
SmallVector DeduceResults(
F->getTemplateParameters()->size());
+ // We don't have to deduce against the alias template specialization,
+ // if the source template is a synthesized alias deduction
@@ -2068,7 +2080,9 @@ class ASTContext : public RefCountedBase {
/// if it hasn't yet been built.
QualType getRawCFConstantStringType() const {
if (CFConstantStringTypeDecl)
- return getTypedefType(CFConstantStringTypeDecl);
+ return getTypedefType(ElaboratedT
@@ -0,0 +1,585 @@
+//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- 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: Ap
@@ -6,534 +6,266 @@
//
//===--===//
//
-// This file defines the NestedNameSpecifier class, which represents
-// a C++ nested-name-specifier.
+// This file completes the definition of the NestedNameSpecifie
@@ -0,0 +1,585 @@
+//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- 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: Ap
@@ -4433,8 +4433,12 @@ Sema::InstantiateClassMembers(SourceLocation
PointOfInstantiation,
// No need to instantiate in-class initializers during explicit
// instantiation.
if (Field->hasInClassInitializer() && TSK == TSK_ImplicitInstantiation) {
+// H
mizvekov wrote:
> For obvious reasons, I wasn't able to make even a reasonably thorough review
> here, but I came across a few things that seemed like good ideas. All 4 of
> the patches are STILL huge.
>
> IMO, unless this can be more bite-sized changes, I don't know how to proceed
> here.
Y
@@ -0,0 +1,585 @@
+//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- 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: Ap
mizvekov wrote:
> You should at minimum be able to layer the `NestedNameSpecifier` change on
> top of the `TagType` change. I can't see why that wouldn't work.
>
> 1. Add the structure for sugary `TagType`s.
> 2. Replace `ElaboratedType` with sugary `TagType`s.
> 3. Change the representation of
mizvekov wrote:
> I'm definitely OK with accepting all of that, and would very much appreciate
> it.
Done.
https://github.com/llvm/llvm-project/pull/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/147835
___
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/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Is there ANYTHING we can do to split this up? This is so huge that github is
> refusing to load half the changes.
I broke the commit down into others, now the first commit only has the AST and
TreeTransform changes.
https://github.com/llvm/llvm-project/pull/147835
__
@@ -1088,6 +1088,9 @@ void CXXNameMangler::mangleNameWithAbiTags(GlobalDecl GD,
return;
}
+ while (DC->isRequiresExprBody())
+DC = DC->getParent();
mizvekov wrote:
With a compound expression you can introduce lots of other kinds of
DeclContexts he
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
SmallVector DeduceResults(
F->getTemplateParameters()->size());
+ // We don't have to deduce against the alias template specialization,
+ // if the source template is a synthesized alias deduction
@@ -4111,7 +4111,10 @@ static ActionResult
getPatternForClassTemplateSpecialization(
if (Ambiguous) {
// Partial ordering did not produce a clear winner. Complain.
Inst.Clear();
- ClassTemplateSpec->setInvalidDecl();
+
+ if (!S.isS
@@ -4111,7 +4111,10 @@ static ActionResult
getPatternForClassTemplateSpecialization(
if (Ambiguous) {
// Partial ordering did not produce a clear winner. Complain.
Inst.Clear();
- ClassTemplateSpec->setInvalidDecl();
+
+ if (!S.isS
https://github.com/mizvekov commented:
I think marking declarations as invalid even in non-immediate context errors
should not be an issue, as the declaration should not end up being used anyway.
I think this is a pretty common pattern in other places. Why do we end up
crashing only with this
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/147275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7248,6 +7248,12 @@ QualType
TreeTransform::TransformDependentBitIntType(
return Result;
}
+template
+QualType TreeTransform::TransformPredefinedSugarType(
+TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+ llvm_unreachable("This type does not need to be transfor
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
unsigned NumExpansions;
};
+ enum class PredefinedSugarKind {
+/// The "size_t" type.
+SizeT,
+
+/// The signed integer type corresponding to "size_t".
+SignedSiz
@@ -3454,9 +3454,11 @@ void
Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
if (Func->getNumParams() == Params.size()) {
llvm::SmallVector FuncParams;
for (auto *P : Func->parameters())
- FuncParams.push_back(
- Context.g
@@ -3454,9 +3454,11 @@ void
Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
if (Func->getNumParams() == Params.size()) {
llvm::SmallVector FuncParams;
for (auto *P : Func->parameters())
- FuncParams.push_back(
- Context.g
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3455,9 +3454,12 @@ void
Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
if (Func->getNumParams() == Params.size()) {
llvm::SmallVector FuncParams;
for (auto *P : Func->parameters())
- FuncParams.push_back(
- Context.g
@@ -3455,9 +3454,12 @@ void
Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
if (Func->getNumParams() == Params.size()) {
llvm::SmallVector FuncParams;
for (auto *P : Func->parameters())
- FuncParams.push_back(
- Context.g
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3397,7 +3397,8 @@ void Sema::DeclareGlobalNewDelete() {
GlobalNewDeleteDeclared = true;
QualType VoidPtr = Context.getPointerType(Context.VoidTy);
- QualType SizeT = Context.getSizeType();
+ // FIXME: Why is 'Canonical'SizeType needed here?
+ QualType SizeT = Contex
mizvekov wrote:
I have a work in progress patch which fixes this issue, and doesn't need to
take this approach of storing diagnosed entities.
It's a big patch that doesn't target this issue specifically, but I remember I
encountered this problem while refactoring things, and I removed the dupl
https://github.com/mizvekov approved this pull request.
I think this looks good, sans a single nit, thanks!
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
unsigned NumExpansions;
};
+ enum class PredefinedSugarKind {
+/// The "size_t" type.
+SizeT,
+
+/// The signed integer type corresponding to "size_t".
+SignedSiz
@@ -3397,7 +3397,8 @@ void Sema::DeclareGlobalNewDelete() {
GlobalNewDeleteDeclared = true;
QualType VoidPtr = Context.getPointerType(Context.VoidTy);
- QualType SizeT = Context.getSizeType();
+ // FIXME: Why is 'Canonical'SizeType needed here?
+ QualType SizeT = Contex
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/146153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
> Thanks! I don't know if similar problems (ODR confused by the
> canonicalization merging decltypes with different names of template
> parameters) can show up in other cases, but as the PR fixes this particular
> case LGTM.
Sure, please file bug reports for any other similar
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final
: public InheritingConcreteTypeLoc {};
+class PredefinedSugarTypeLoc final
+: public InheritingConcreteTypeLoc {};
mizvekov wrote:
One thing is having to define a class, another thing is if that
@@ -5216,6 +5230,38 @@ QualType ASTContext::getDependentBitIntType(bool
IsUnsigned,
return QualType(New, 0);
}
+QualType
+ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const {
+ llvm::FoldingSetNodeID ID;
+ PredefinedSugarType::Profile(ID, llvm::to_unde
@@ -7248,6 +7250,22 @@ QualType
TreeTransform::TransformDependentBitIntType(
return Result;
}
+template
+QualType TreeTransform::TransformPredefinedSugarType(
+TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+ const PredefinedSugarType *EIT = TL.getTypePtr();
+ Qua
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final
: public InheritingConcreteTypeLoc {};
+class PredefinedSugarTypeLoc final
+: public InheritingConcreteTypeLoc {};
mizvekov wrote:
Yeah, but for the current uses of PredefinedSugarType in this p
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo
&Target,
MSGuidTagDecl = buildImplicitRecord("_GUID");
getTranslationUnitDecl()->addDecl(MSGuidTagDecl);
}
+
+ // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and
+ // ptrdiff_t (C99
@@ -2258,6 +2258,27 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
unsigned NumExpansions;
};
+ enum class PredefinedSugarKind {
+/// The "size_t" type.
+SizeT,
+
+/// The "signed size_t" type.
mizvekov wrote:
Well
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl
*Decl) const {
/// getSizeType - Return the unique type for "size_t" (C99 7.17), the result
/// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and
/// needs to agree with the defin
@@ -1567,6 +1567,8 @@ class ASTContext : public RefCountedBase {
/// and bit count.
QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const;
+ QualType getPredefinedSugarType(uint32_t KD) const;
mizvekov wrote:
You can use enums in TypePrope
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2258,6 +2258,27 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
unsigned NumExpansions;
};
+ enum class PredefinedSugarKind {
+/// The "size_t" type.
+SizeT,
+
+/// The "signed size_t" type.
mizvekov wrote:
```su
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final
: public InheritingConcreteTypeLoc {};
+class PredefinedSugarTypeLoc final
+: public InheritingConcreteTypeLoc {};
mizvekov wrote:
These should ideally never be used in practice, as a Predefined
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool
IsUnsigned,
return QualType(New, 0);
}
+QualType ASTContext::getPredefinedSugarType(uint32_t KD) const {
+ using Kind = PredefinedSugarType::Kind;
+ auto getUnderlyingType = [](const ASTContext &Ctx,
@@ -1480,6 +1480,16 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
return false;
break;
}
+ case Type::PredefinedSugar: {
+const auto *TP1 = cast(T1);
+const auto *TP2 = cast(T2);
+if (TP1->getKind() != TP2->getKind())
+
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl
*Decl) const {
/// getSizeType - Return the unique type for "size_t" (C99 7.17), the result
/// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and
/// needs to agree with the defin
@@ -5622,3 +5622,15 @@
HLSLAttributedResourceType::findHandleTypeOnResource(const Type *RT) {
}
return nullptr;
}
+
+StringRef PredefinedSugarType::getName() const {
+ switch (getKind()) {
+ case Kind::SizeT:
+return "__size_t";
+ case Kind::SignedSizeT:
+return
@@ -8038,6 +8060,32 @@ class DependentBitIntType final : public Type, public
llvm::FoldingSetNode {
}
};
+class PredefinedSugarType final : public Type {
+public:
+ friend class ASTContext;
+ using Kind = PredefinedSugarKind;
+
+private:
+ PredefinedSugarType(Kind KD, Qu
@@ -1567,6 +1567,8 @@ class ASTContext : public RefCountedBase {
/// and bit count.
QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const;
+ QualType getPredefinedSugarType(uint32_t KD) const;
mizvekov wrote:
It would be more helpful and l
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo
&Target,
MSGuidTagDecl = buildImplicitRecord("_GUID");
getTranslationUnitDecl()->addDecl(MSGuidTagDecl);
}
+
+ // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and
+ // ptrdiff_t (C99
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool
IsUnsigned,
return QualType(New, 0);
}
+QualType ASTContext::getPredefinedSugarType(uint32_t KD) const {
+ using Kind = PredefinedSugarType::Kind;
+ auto getUnderlyingType = [](const ASTContext &Ctx,
@@ -8038,6 +8060,32 @@ class DependentBitIntType final : public Type, public
llvm::FoldingSetNode {
}
};
+class PredefinedSugarType final : public Type {
+public:
+ friend class ASTContext;
+ using Kind = PredefinedSugarKind;
+
+private:
+ PredefinedSugarType(Kind KD, Qu
https://github.com/mizvekov commented:
Thanks, this looks good!
It would be awesome to use these in existing cases which we handle with a
builtin typedef, as this would be helpful to validate the design, but this is
not required and doesn't need to be part of this PR.
https://github.com/llvm/
@@ -7248,6 +7250,22 @@ QualType
TreeTransform::TransformDependentBitIntType(
return Result;
}
+template
+QualType TreeTransform::TransformPredefinedSugarType(
+TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+ const PredefinedSugarType *EIT = TL.getTypePtr();
+ Qua
@@ -14526,6 +14564,9 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx,
const Type *X,
DX->isCountInBytes(), DX->isOrNull(),
CDX);
}
+ case Type::PredefinedSugar:
+// FIXME: Should this
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
Thanks! This should be fixed by https://github.com/llvm/llvm-project/pull/146153
https://github.com/llvm/llvm-project/pull/144796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/146153
This fixes an issue with the ODR checker not using the as-written type of
conversion operators.
The odr-checker in general should not have to deal with canonical types, as its
purpose is to compare same defin
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/145958
___
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/145958
Lock down the inheritance model for member pointers even when converting from
nullptr.
This fixes a regression introduced in
https://github.com/llvm/llvm-project/pull/131966
There are no release notes, since
https://github.com/mizvekov requested changes to this pull request.
The fix doesn't look quite right. It's not correct to say that canonicalization
changes the declaration name. We don't canonicalize declarations after all.
It's just that a canonical template parameter type doesn't refer to a
mizvekov wrote:
> Just noticed that this is not using `std::optional`. If this is
> good, why don't we put this to `llvm/ADT`? I feel that is a better place.
I don't disagree in principle, we just don't need to preempt making this
available for all of llvm, if no one has the time to make a pat
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/144737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov commented:
Thanks for this!
I have left a small review, but since I am traveling to the WG21 meeting, I
can't look much into it for the next couple of weeks.
Also, please try this on the llvm compile time tracker, and take a look at any
changes to the amount of AST
@@ -117,3 +117,4 @@ def PipeType : TypeNode;
def AtomicType : TypeNode;
def BitIntType : TypeNode;
def DependentBitIntType : TypeNode, AlwaysDependent;
+def PredefinedSugarType : TypeNode, NeverCanonical;
mizvekov wrote:
Missing newline at the end of the file.
@@ -7246,6 +7250,24 @@ QualType
TreeTransform::TransformDependentBitIntType(
return Result;
}
+template
+QualType TreeTransform::TransformPredefinedSugarType(
+TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+ const PredefinedSugarType *EIT = TL.getTypePtr();
+ Qua
@@ -1480,6 +1480,14 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
return false;
break;
}
+ case Type::PredefinedSugar: {
+const auto *TP1 = cast(T1);
+const auto *TP2 = cast(T2);
+
+if (TP1->getKind() != TP2->getKind())
@@ -5148,6 +5153,14 @@ QualType ASTContext::getDependentBitIntType(bool
IsUnsigned,
return QualType(New, 0);
}
+QualType ASTContext::getPredefinedSugarType(uint32_t KD,
+QualType UnderlyingType) const {
+ auto *New = new (*this,
@@ -2528,8 +2528,13 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T)
const {
Align = static_cast(Width);
}
}
+
break;
+ case Type::PredefinedSugar:
+return getTypeInfo(cast(T)->desugar().getTypePtr());
+break;
mizvekov wrote:
`
@@ -8054,6 +8054,41 @@ class DependentBitIntType final : public Type, public
llvm::FoldingSetNode {
}
};
+class PredefinedSugarType final : public Type {
+public:
+ enum Kind { SizeT, SignedSizeT, PtrdiffT };
+ friend class ASTContext;
+
+private:
+ Kind K;
+ QualType U
@@ -1894,6 +1894,12 @@ ExpectedType
clang::ASTNodeImporter::VisitDependentBitIntType(
*ToNumBitsExprOrErr);
}
+ExpectedType clang::ASTNodeImporter::VisitPredefinedSugarType(
+const clang::PredefinedSugarType *T) {
+
@@ -8054,6 +8054,41 @@ class DependentBitIntType final : public Type, public
llvm::FoldingSetNode {
}
};
+class PredefinedSugarType final : public Type {
+public:
+ enum Kind { SizeT, SignedSizeT, PtrdiffT };
+ friend class ASTContext;
+
+private:
+ Kind K;
+ QualType U
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14536,6 +14589,9 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx,
const Type *X,
DX->isCountInBytes(), DX->isOrNull(),
CDX);
}
+ case Type::PredefinedSugar: {
+return QualType();
+
@@ -220,6 +220,14 @@ static ExprResult EvaluateAtomicConstraint(
if (Inst.isInvalid())
return ExprError();
+if (const TemplateTypeParmType *TTPT =
+
dyn_cast(AtomicExpr->getType().getDesugaredType(S.Context)))
{
+ TemplateTypeParmDecl *TTPD = TTPT->
@@ -0,0 +1,180 @@
+// RUN: %check_clang_tidy %s misc-const-correctness %t -- \
+// RUN: -config="{CheckOptions: {\
+// RUN: misc-const-correctness.AllowedTypes:
'[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType;ConstTemplate',
\
+// RUN: misc
@@ -320,6 +321,69 @@ bool
clang::analyze_format_string::ParseUTF8InvalidSpecifier(
// Methods on ArgType.
//===--===//
+static bool namedTypeToLengthModifierKind(QualType QT,
+
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6726,17 +6726,63 @@ QualType ASTContext::getTagDeclType(const TagDecl
*Decl) const {
return getTypeDeclType(const_cast(Decl));
}
+// Inject __size_t, __signed_size_t, and __ptrdiff_t to provide portable hints
+// and diagnostics. In C and C++, expressions of type size_t
@@ -1961,11 +1969,20 @@ class ASTContext : public RefCountedBase {
/// .
///
/// The sizeof operator requires this (C99 6.5.3.4p4).
- CanQualType getSizeType() const;
+ QualType getSizeType() const;
mizvekov wrote:
Can you provide `CanQualType getCanon
@@ -320,6 +321,69 @@ bool
clang::analyze_format_string::ParseUTF8InvalidSpecifier(
// Methods on ArgType.
//===--===//
+static bool namedTypeToLengthModifierKind(QualType QT,
+
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143614
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
LGTM.
So what changed since the last commit is that preprocessing-only mode doesn't
imply the semantics of this flag anymore.
I think It's good practice to mention what changed since original landing.
https://github.com/llvm/llvm-project
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/143614
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
No strong objections, but I'd prefer to wait as well.
This was one thing I looked into adding when I initially implemented it, but
all potential uses turned out better without it.
https://github.com/llvm/llvm-project/pull/143516
___
c
Author: Matheus Izvekov
Date: 2025-06-09T19:08:15-03:00
New Revision: add6acc333740542705eedd185f45f69e3d25f30
URL:
https://github.com/llvm/llvm-project/commit/add6acc333740542705eedd185f45f69e3d25f30
DIFF:
https://github.com/llvm/llvm-project/commit/add6acc333740542705eedd185f45f69e3d25f30.dif
@@ -324,6 +324,8 @@ New Compiler Flags
- New option ``-Wnrvo`` added and disabled by default to warn about missed
NRVO opportunities.
+- New option ``-ignore-pch`` added to disable precompiled headers, override
``-emit-pch`` and ``-include-pch`` (#GH142409, `PCHDocs
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/142409
___
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/143168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6781,7 +6781,7 @@ static bool HandleConstructorCall(const Expr *E, const
LValue &This,
// and make sure we've initialized every step along it.
auto IndirectFieldChain = IFD->chain();
for (auto *C : IndirectFieldChain) {
-FD = cast(C);
+FD
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/143291
___
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/143291
>From d623054729e75adc5299ecd426b19863962cafbc Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Sat, 7 Jun 2025 21:33:07 -0300
Subject: [PATCH] [clang] AST: fix dependency calculation for TypedefTypes
The
1 - 100 of 1558 matches
Mail list logo