[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-08 Thread Erich Keane via cfe-commits
erichkeane added a comment. Quick point i meant to post earlier Couldn't change ExtInfo size. Comment at: include/clang/AST/Type.h:1381 /// regparm and the calling convention. -unsigned ExtInfo : 9; +unsigned ExtInfo : 10; ABataev wrote: > Erich

[PATCH] D25373: Fix for Bug 30639: CGDebugInfo Null dereference with OpenMP array access

2016-10-10 Thread Erich Keane via cfe-commits
erichkeane added a comment. Andrey- It seems that getVariableArrayDecayedType and getCanonicalParamType return the same type in this case (at least in the reproduction). I could definitely change the call, though the changes to CGDebugInfo.cpp are apparently also necessary even in that case.

[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-10 Thread Erich Keane via cfe-commits
erichkeane added a comment. I'm going to need to pump-the-brakes on this for a little bit. The name-decoration work I did here highlighted a number of issues with that section of the spec. We're currently considering rev'ing the spec to properly name mangle/decorate when C++ and Microsoft is

[PATCH] D25373: Fix for Bug 30639: CGDebugInfo Null dereference with OpenMP array access

2016-10-11 Thread Erich Keane via cfe-commits
erichkeane updated the summary for this revision. erichkeane removed a reviewer: gbenyei. erichkeane removed rL LLVM as the repository for this revision. erichkeane updated this revision to Diff 74310. erichkeane added a comment. Emailed with Alexey who identified the problem in the OpenMP impleme

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A quick few things I noticed, not nearly a thorough review. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/86682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -583,11 +583,14 @@ class alignas(void *) Stmt { unsigned IsArrow : 1; /// True if this member expression used a nested-name-specifier to -/// refer to the member, e.g., "x->Base::f", or found its member via -/// a using declaration. When true, a MemberExprN

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 2 nits, else LGTM. https://github.com/llvm/llvm-project/pull/86682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1735,48 +1757,21 @@ MemberExpr *MemberExpr::Create( ValueDecl *MemberDecl, DeclAccessPair FoundDecl, DeclarationNameInfo NameInfo, const TemplateArgumentListInfo *TemplateArgs, QualType T, ExprValueKind VK, ExprObjectKind OK, NonOdrUseReason NOUR) { - bool HasQ

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourc

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -2545,10 +2545,12 @@ ASTDeclReader::VisitClassTemplateSpecializationDeclImpl( } // Explicit info. - if (TypeSourceInfo *TyInfo = readTypeSourceInfo()) { -auto *ExplicitInfo = -new (C) ClassTemplateSpecializationDecl::ExplicitSpecializationInfo; -Explici

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few more suggestions, also I like Shafik's suggestion on the variable name. https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1455,21 +1455,17 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream &OS) { // If this is a class template specialization, print the template // arguments. - if (const auto *Spec = dyn_cast(D)) { -ArrayRef Args; -TypeSourceInfo *TAW = Spec->getTypeAsWritten

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1455,21 +1455,17 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream &OS) { // If this is a class template specialization, print the template // arguments. - if (const auto *Spec = dyn_cast(D)) { -ArrayRef Args; -TypeSourceInfo *TAW = Spec->getTypeAsWritten

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-04-01 Thread Erich Keane via cfe-commits
erichkeane wrote: I'd be OK with Clang providing some level of metadata to clarify which is an FMV, and what our target features are. But this sort of analysis still needs to happen in LLVM. https://github.com/llvm/llvm-project/pull/80093 ___ cfe-

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-01 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane Regarding "Still waiting on this?", I pushed a commit that > addresses the fixme. I'll be addressing the rest of your review comments in a > subsequent commit.. > > Also, if we are renaming `ExplicitInstantiationInfo::ExternLoc` to > `ExternKeywordLoc`, should

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-04-01 Thread Erich Keane via cfe-commits
erichkeane wrote: > I'm not sure llvm needs to know the priorities. I haven't had time to work on > this, but my plan was to have something that attempts to step through the > resolver instruction by instruction with known bits for the value loaded from > `__aarch64_cpu_features.features` acco

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Quite a bit of cleanup level stuff, plus wanting 1 minor refactor here (re the lookup function), but otherwise is pretty good. https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-co

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -990,6 +970,18 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, const Scope *S, bool SuppressQualifierCheck, ActOnMemberAccessExtraArgs *ExtraArgs) { + asse

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -131,7 +131,9 @@ struct BuiltinTypeDeclBuilder { DeclarationNameInfo NameInfo = DeclarationNameInfo(DeclarationName(&II), SourceLocation()); LookupResult R(S, NameInfo, Sema::LookupOrdinaryName); -S.LookupParsedName(R, S.getCurScope(), &SS, false); +S

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1055,9 +1045,19 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, } } -Diag(R.getNameLoc(), diag::err_no_member) - << MemberName << DC - << (BaseExpr ? BaseExpr->getSourceRange() : SourceRange()); +if (SS.isNotEmpty() &&

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -825,7 +825,10 @@ void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, IdentifierInfo *Name = IdTok.getIdentifierInfo(); LookupResult Lookup(*this, Name, IdTok.getLocation(), LookupOrdinaryName); - LookupParsedName(Lookup, curScope, nullptr, true); + Loo

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -5789,7 +5789,10 @@ static ImplicitConversionSequence TryObjectArgumentInitialization( return ICS; } +// FIXME: Should this check getAsRecordDecl instead? erichkeane wrote: again. https://github.com/llvm/llvm-project/pull/84050

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1287,7 +1287,10 @@ static ExprResult LookupMemberExpr(Sema &S, LookupResult &R, return ExprError(); QualType BaseType = BaseExpr.get()->getType(); + +#if 0 erichkeane wrote: Hmm? https://github.com/llvm/llvm-project/pull/84050

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -131,7 +131,9 @@ struct BuiltinTypeDeclBuilder { DeclarationNameInfo NameInfo = DeclarationNameInfo(DeclarationName(&II), SourceLocation()); LookupResult R(S, NameInfo, Sema::LookupOrdinaryName); -S.LookupParsedName(R, S.getCurScope(), &SS, false); +S

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-01 Thread Erich Keane via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10318,6 +10318,8 @@ def err_shufflevector_nonconstant_argument : Error< def err_shufflevector_argument_too_large : Error< "index for __builtin_shufflevect

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-01 Thread Erich Keane via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/76615 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-01 Thread Erich Keane via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= , Pol Marcet =?utf-8?q?Sard=C3=A0?= , Pol Marcet =?utf-8?q?Sard=C3=A0?= Message-ID: In-Reply-To: https://github.com/erichkeane commented: I would love it if @sethp can do another review, but only 1 nit from me. https://github.com/llvm/llvm-project/pull/76615

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [clang-tools-extra] [Clang][Sema] Fix explicit specializations of member function templates with a deduced return type (PR #86817)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/86817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 1 thought, else I don't see anything. @cor3ntin is coming back in a few days, so I'd like him to do a final once over. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -80,6 +80,81 @@ struct Response { return R; } }; + +// Retrieve the primary template for a lambda call operator. It's +// unfortunate that we only have the mappings of call operators rather +// than lambda classes. +const FunctionDecl * +getPrimaryTemplateOfGenericLamb

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefi

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/83855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -5052,6 +5052,21 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, Function->setInnerLocStart(PatternDecl->getInnerLocStart()); Function->setRangeEnd(PatternDecl->getEndLoc()); + // Propagate '__restrict' properly. + if (auto MD = dyn_c

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I did a review, but didn't stop to decide whether we SHOULD :) Aaron should be around 'sometime' to make that judgement, my restrict knowledge/reasoning is slim/none. https://github.com/llvm/llvm-project/pull/83855 _

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
erichkeane wrote: OpenCL is "C" based, not C++. However, C23 DID add namespacing to attributes, so if OpenCL can use C23, we should be able to make the spelling `[[omp::assume]]`. That said, I DO see value for an `__attribute__` spelling, so I think `omp_assume` is probably an unfortunate ne

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1,14 +0,0 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s erichkeane wrote: Same here, can we just rename this to attr-omp-assume.c and change the name in the test? https://github.com/llvm/llvm-project/pull/84934 _

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1,58 +0,0 @@ -// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu %s -o - | FileCheck %s erichkeane wrote: would be great if we could just rename/update this test rather than deleting it? https://github.com/llvm/llvm-project/pull/84934 ___

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems sensible to me. Please give @cor3ntin a few days to review, after which, feel free to commit. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commit

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -80,7 +80,8 @@ class NumericLiteralParser { bool isFloat128 : 1; // 1.0q bool isFract : 1; // 1.0hr/r/lr/uhr/ur/ulr bool isAccum : 1; // 1.0hk/k/lk/uhk/uk/ulk - bool isBitInt : 1;// 1wb, 1uwb (C23) + bool isBitInt : 1; // 1wb, 1uwb (C23)

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1117,6 +1118,26 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -974,6 +974,7 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, bool isFixedPointConstant = isFixedPointLiteral(); bool isFPConstant = isFloatingLiteral(); bool HasSize = false; + bool PossibleBitInt = false; erichkeane wrote: I'd

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane Requested changes applied... should I wait for other reviews on > the other PR (#86678), or do you think I should go ahead and merge #86678 and > then this one? #86678 is entirely 'contained' in this review, right? Seems like it is 'reviewed', so you can proba

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include "clang/Basic/AttrLeftSideMus

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -129,11 +118,13 @@ namespace { const TemplateParameterList *Params); void printTemplateArguments(llvm::ArrayRef Args, const TemplateParameterList *Params); - -inline void prettyPrintAttributes(Decl *D) {

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include "clang/Basic/AttrLeftSideMus

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -250,87 +241,43 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) { return Out; } -// For CLANG_ATTR_LIST_CanPrintOnLeft macro. -#include "clang/Basic/AttrLeftSideCanPrintList.inc" - -// For CLANG_ATTR_LIST_PrintOnLeft macro. -#include "clang/Basic/AttrLeftSideMus

[clang] Rework the printing of attributes (PR #87281)

2024-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Since this adds so much logic, we definitely need tests that handle when the attribute is defined in a macro, when there are multiples on each side, when there are multiples in macros/etc. https://github.com/llvm/llvm-project/pull/87281 ___

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Clang][AST][NFC] Move template argument dependence computations for MemberExpr to computeDependence (PR #86682)

2024-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: Ah, i see... yeah, i think there is value to submitting them separately, feel free to do so. https://github.com/llvm/llvm-project/pull/86682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-04 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the eri

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-04 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the + /// most convieni

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the + /// most convieni

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return OpenA

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return OpenA

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87675 >From 2e05458175478002a14c9316a7fde66f7301dd94 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 4 Apr 2024 10:59:34 -0700 Subject: [PATCH 1/2] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure A

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -2792,6 +2811,24 @@ void DeclareImplicitDeductionGuidesForTypeAlias( } else { assert(false && "unhandled RHS type of the alias"); } + return {Template, AliasRhsTemplateArgs}; +} + +// Build deduction guides for a type alias template. +void DeclareImplicitDeductionGu

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -126,12 +126,15 @@ struct BuiltinTypeDeclBuilder { static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, StringRef Name) { -CXXScopeSpec SS; IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identi

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -1055,9 +1045,19 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, } } -Diag(R.getNameLoc(), diag::err_no_member) - << MemberName << DC - << (BaseExpr ? BaseExpr->getSourceRange() : SourceRange()); +if (SS.isNotEmpty() &&

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/87675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Erich Keane via cfe-commits
erichkeane wrote: > I really appreciate the suggestions. `alias-unused.cpp` and > `alias-unused-win.cpp` contain test improvement that should be pre-commited > once they look good enough. Then this PR can be changed to show the > difference. > > On a separate note, I wanted to clarify that `-

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/86426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. erichkeane wrote: Should this be double-brackets? ```sugg

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This has enough to do with parsing that i think Aaron should take a look too. Also, this needs a parser test, not just the plugin test. The plugins/examples aren't built often enough, so this needs to be a full lit test. https://github.com/llvm/llvm-pr

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/87821 Now that we have AST nodes for OpenACC Clauses, this patch adds their creation to Sema and makes the Parser call all the required functions. This also redoes TreeTransform to work with the clauses/make sure t

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO OpenAC

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that we

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. erichkeane wrote: > Microsoft attributes use single brack

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane PR updated. > > When we encounter a class member access expression with a > nested-name-specifier that is invalid, should we simply ignore it and instead > use the type of the object expression as the lookup context? This is the > current behavior, but it leads

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -268,17 +268,34 @@ class alignas(8) Decl { /// } /// void A::f(); // SemanticDC == namespace 'A' ///// LexicalDC == global namespace - llvm::PointerUnion DeclCtx; + llvm::PointerIntPair< erichkeane wrote: I don't think it ends up

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that we

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add CodeGen tests for CWG 6xx issues (PR #87876)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexcept

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update __cpp_concepts macro (PR #87998)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/87998 After discussion with a few others, and seeing the state of our concepts support, I believe it is worth trying to see if we can update this for Clang19. The forcing function is that libstdc++'s header is gu

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -11077,16 +11077,65 @@ OMPClause *TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) { //===--===// // OpenACC transformation //===--

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -82,22 +119,22 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K, return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true); } -StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, -

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC &S, OpenACCDirectiveKind K, } return false; } + +bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, +OpenACCClauseKind ClauseKind) { + switch (ClauseKind) {

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/3] [OpenACC] Implement Sema work for OpenACC Clauses Now that we

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-08 Thread Erich Keane via cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC &S, OpenACCDirectiveKind K, } return false; } + +bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, +OpenACCClauseKind ClauseKind) { + switch (ClauseKind) {

<    1   2   3   4   5   6   7   8   9   10   >