[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] Fix incorrect line numbers with -E and raw string (#47577) (PR #77021)

2024-04-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/77021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix incorrect line numbers with -E and raw string (#47577) (PR #77021)

2024-04-01 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -E %s | FileCheck %s +// CHECK: AAA +// CHECK-NEXT: BBB +R"( +AAA)" +BBB AaronBallman wrote: Thanks for the explanation! Perhaps a better name for the test file is `raw_string_print.cpp` or something along those lines, so nobo

[clang] [clang] Fix incorrect line numbers with -E and raw string (#47577) (PR #77021)

2024-04-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! The functional changes look good to me, but it might make sense to rename the test (or add comments) to make it more clear what's being tested and why, and we should have a release note so users know about the fix. https://github.

[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] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-04-01 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Thanks for the link back to the Phab review, that was helpful. I didn't offhand recall the previous round of this. I'll trust the comments I made on that review. :) s/members/methods/ in the option name to avoid the incorrect implication of suppressing data members? I suggest _

[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 Krystian Stasiowski via cfe-commits
@@ -1287,7 +1287,10 @@ static ExprResult LookupMemberExpr(Sema &S, LookupResult &R, return ExprError(); QualType BaseType = BaseExpr.get()->getType(); + +#if 0 sdkrystian wrote: This assertion should be deleted since the lookup context could be the cur

[clang] [M68k][clang] Enable frame pointer optimization by default (PR #87264)

2024-04-01 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/87264 Enable frame pointer optimization by default to match it with gcc. Fixes: https://github.com/llvm/llvm-project/issues/75013 >From 4eeb31d4ad8503db9a1cc079eeb9aa4186136719 Mon Sep 17 00:00:00 2001 From: Jim Lin

[clang] [M68k][clang] Enable frame pointer optimization by default (PR #87264)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jim Lin (tclin914) Changes Enable frame pointer optimization by default to match it with gcc. Fixes: https://github.com/llvm/llvm-project/issues/75013 --- Full diff: https://github.com/llvm/llvm-project/pull/87264.diff 2 Files Af

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

2024-04-01 Thread Nick Desaulniers 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 Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers 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][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 Krystian Stasiowski via cfe-commits
@@ -990,6 +970,18 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, const Scope *S, bool SuppressQualifierCheck, ActOnMemberAccessExtraArgs *ExtraArgs) { + asse

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

2024-04-01 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane 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] 9434c08 - [HLSL] Implement array temporary support (#79382)

2024-04-01 Thread via cfe-commits
Author: Chris B Date: 2024-04-01T12:10:10-05:00 New Revision: 9434c083475e42f47383f3067fe2a155db5c6a30 URL: https://github.com/llvm/llvm-project/commit/9434c083475e42f47383f3067fe2a155db5c6a30 DIFF: https://github.com/llvm/llvm-project/commit/9434c083475e42f47383f3067fe2a155db5c6a30.diff LOG:

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-04-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/79382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: FWIW, I did verify that it's very unlikely the changes in this PR will break existing code: https://sourcegraph.com/search?q=context:global+__need_unreachable+-file:.*clang.*&patternType=keyword&sm=0, so that's a good thing. > I do wonder if we could have the broader built

[clang] [clang] Fix bitfield access unit for vbase corner case (PR #87238)

2024-04-01 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Doing in in one commit this time seems fine. https://github.com/llvm/llvm-project/pull/87238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang] Fix bitfield access unit for vbase corner case (PR #87238)

2024-04-01 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/87238 ___ 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-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-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread via cfe-commits
https://github.com/komalverma04 created https://github.com/llvm/llvm-project/pull/87268 # Maintaining Consistency in ``hasAnyArgument()`` and ``hasArgument()`` Matchers in Clang AST Matchers The ``hasArgument()`` matcher already ignores implicit casts and parentheses, but the ``hasAnyArgument

[clang] 4746877 - [C99] Claim conformance to WG14 N570

2024-04-01 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-04-01T13:53:14-04:00 New Revision: 4746877c2716224dc87c69750bdd0df95b6d5b16 URL: https://github.com/llvm/llvm-project/commit/4746877c2716224dc87c69750bdd0df95b6d5b16 DIFF: https://github.com/llvm/llvm-project/commit/4746877c2716224dc87c69750bdd0df95b6d5b16.diff

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (komalverma04) Changes # Maintaining Consistency in ``hasAnyArgument()`` and ``hasArgument()`` Matchers in Clang AST Matchers The ``hasArgument()`` matcher already ignores implicit casts and parentheses, but the ``hasAny

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9434c083475e42f47383f3067fe2a155db5c6a30 c6035510cd330e99d9c2bfc60de6d76e84c79a37 --

[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-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, run clang-format before commit. https://github.com/llvm/llvm-project/pull/87268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/87268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Fix tests & clang-format https://github.com/llvm/llvm-project/pull/87268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] XFAIL clang/Driver/compress.c on AIX (PR #87269)

2024-04-01 Thread via cfe-commits
https://github.com/azhan92 created https://github.com/llvm/llvm-project/pull/87269 This PR XFAIL's `clang/Driver/compress.c` on AIX since it requires the LLVM integrated assembler / assembly parser support, which is not available on AIX. >From cae3e372cba764854ced4d09bc975ab9614dfad0 Mon Sep

[clang] XFAIL clang/Driver/compress.c on AIX (PR #87269)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (azhan92) Changes This PR XFAIL's `clang/Driver/compress.c` on AIX since it requires the LLVM integrated assembler / assembly parser support, which is not available on AIX. --- Full diff: https://github.com/llvm/llvm-project/pull/87

[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] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Jon Roelofs 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] [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] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-04-01 Thread Reid Kleckner via cfe-commits
rnk wrote: That's interesting! I wonder how long the /F flags have accepted trailing colons. That form seems a lot more readable. I went looking for examples of how to do this with fewer aliases, but it looks like this is what is done currently: https://github.com/llvm/llvm-project/blob/main/c

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-04-01 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/87209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] 5ff2773 - [clang-cl] Allow a colon after /Fo option (#87209)

2024-04-01 Thread via cfe-commits
Author: Russell Greene Date: 2024-04-01T11:15:24-07:00 New Revision: 5ff2773d4e606ac57750f1fc2aa4dc49b8dbede1 URL: https://github.com/llvm/llvm-project/commit/5ff2773d4e606ac57750f1fc2aa4dc49b8dbede1 DIFF: https://github.com/llvm/llvm-project/commit/5ff2773d4e606ac57750f1fc2aa4dc49b8dbede1.diff

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-04-01 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/87209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread David Blaikie via cfe-commits
@@ -193,6 +193,20 @@ DwarfFissionKind getDebugFissionKind(const Driver &D, const llvm::opt::ArgList &Args, llvm::opt::Arg *&Arg); +// Calculate the output path of the module file when compiling a module

[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] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread David Blaikie via cfe-commits
@@ -3017,6 +3017,7 @@ defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, + MarshallingInfoString>, dwblaikie wrot

[clang] XFAIL clang/Driver/compress.c on AIX (PR #87269)

2024-04-01 Thread David Tenty via cfe-commits
@@ -1,5 +1,9 @@ +// XFAIL: system-aix + // REQUIRES: zlib +; XFAIL: target={{.*}}-aix{{.*}} daltenty wrote: You should use the C++ comment format here: ```suggestion // XFAIL: target={{.*}}-aix{{.*}} ``` https://github.com/llvm/llvm-project/pull/87269 ___

[clang] XFAIL clang/Driver/compress.c on AIX (PR #87269)

2024-04-01 Thread David Tenty via cfe-commits
https://github.com/daltenty edited https://github.com/llvm/llvm-project/pull/87269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread David Blaikie via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE: @_ZTIW3M

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread David Blaikie via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can c

[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 Nick Desaulniers 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] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/87270 This change implements the HLSL floating literal suffixes for half and double literals. The PR for the HLSL language specification for this behavior is https://github.com/microsoft/hlsl-specs/pull/175. The T

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes This change implements the HLSL floating literal suffixes for half and double literals. The PR for the HLSL language specification for this behavior is https://github.com/microsoft/hlsl-specs/pull/175. The TL;

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread via cfe-commits
komalverma04 wrote: > LGTM, run clang-format before commit, and fix rest of tests Okay, will do that. Thank you. https://github.com/llvm/llvm-project/pull/87268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] e45f6e5 - [clang] Factor out OpenACC part of `Sema` (#84184)

2024-04-01 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-01T22:37:37+04:00 New Revision: e45f6e569dafd4033f86d276065d77799b5f6226 URL: https://github.com/llvm/llvm-project/commit/e45f6e569dafd4033f86d276065d77799b5f6226 DIFF: https://github.com/llvm/llvm-project/commit/e45f6e569dafd4033f86d276065d77799b5f6226.

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-04-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/84184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Use loaded offloading toolchains to add libraries (PR #87108)

2024-04-01 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. https://github.com/llvm/llvm-project/pull/87108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cppcheck: pass NodeKinds by const reference (PR #87273)

2024-04-01 Thread Amila Senadheera via cfe-commits
https://github.com/Amila-Rukshan created https://github.com/llvm/llvm-project/pull/87273 Fix the cppcheck identified performance issue: https://github.com/llvm/llvm-project/issues/87248 I ran the following to check the possible perf issue in `clang/lib/ASTMatchers/Dynamic` directory: ``` cppc

[clang] cppcheck: pass NodeKinds by const reference (PR #87273)

2024-04-01 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] cbd48b1 - [C99] Claim conformance to "conversion of array to pointer not limited to lvalues"

2024-04-01 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-04-01T14:54:03-04:00 New Revision: cbd48b184eca1ca73e6f20575501d94ad30fbd58 URL: https://github.com/llvm/llvm-project/commit/cbd48b184eca1ca73e6f20575501d94ad30fbd58 DIFF: https://github.com/llvm/llvm-project/commit/cbd48b184eca1ca73e6f20575501d94ad30fbd58.diff

[clang] cppcheck: pass NodeKinds by const reference (PR #87273)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amila Senadheera (Amila-Rukshan) Changes Fix the cppcheck identified performance issue: https://github.com/llvm/llvm-project/issues/87248 I ran the following to check the possible perf issue in `clang/lib/ASTMatchers/Dynamic` directory:

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

2024-04-01 Thread via cfe-commits
https://github.com/apache-hb updated https://github.com/llvm/llvm-project/pull/86426 >From 245a21512d8658225b17b91b8af4764f54084e01 Mon Sep 17 00:00:00 2001 From: Elliot <35050275+apache...@users.noreply.github.com> Date: Sun, 24 Mar 2024 03:03:47 -0400 Subject: [PATCH 1/6] Match against all plu

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
@@ -4117,14 +4117,17 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { } else if (Literal.isFloatingLiteral()) { QualType Ty; if (Literal.isHalf){ - if (getOpenCLOptions().isAvailableOption("cl_khr_fp16", getLangOpts())) + if (ge

[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-04-01 Thread Eli Friedman via cfe-commits
@@ -1105,19 +1105,24 @@ void CodeGenFunction::EmitNewArrayInitializer( } // Enter a partial-destruction Cleanup if necessary. -if (needsEHCleanup(DtorKind)) { +if (DtorKind) { + AllocaTrackerRAII AllocaTracker(*this); efriedma-quic wrote:

[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-04-01 Thread Eli Friedman via cfe-commits
@@ -266,6 +269,54 @@ class alignas(8) EHCleanupScope : public EHScope { }; mutable struct ExtInfo *ExtInfo; + /// Erases auxillary allocas and their usages for an unused cleanup. + /// Cleanups should mark these allocas as 'used' if the cleanup is + /// emitted, otherwi

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread Yuri Istomin via cfe-commits
https://github.com/NekoCdr created https://github.com/llvm/llvm-project/pull/87274 https://cplusplus.github.io/CWG/issues/1606.html >From 1dfb9414a28f99024a8abe36b0b10a4d91eae573 Mon Sep 17 00:00:00 2001 From: Yuri Istomin Date: Mon, 1 Apr 2024 22:02:42 +0300 Subject: [PATCH 1/2] [clang] Add t

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yuri Istomin (NekoCdr) Changes https://cplusplus.github.io/CWG/issues/1606.html --- Full diff: https://github.com/llvm/llvm-project/pull/87274.diff 2 Files Affected: - (modified) clang/test/CXX/drs/dr16xx.cpp (+11) - (modified) clang/w

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-04-01 Thread Eli Friedman via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -emit-llvm -o - | FileCheck %s efriedma-quic wrote: Not sure we need the new RUN line? There shouldn't be any

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM! Disclosure: me and author extensively reviewed this offline before publishing. https://github.com/llvm/llvm-project/pull/87274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang]SveEmitter:Update isVoid() to address #87271 (PR #87276)

2024-04-01 Thread via cfe-commits
https://github.com/aniplcc created https://github.com/llvm/llvm-project/pull/87276 Fixes #87271 >From f12399dc808ff46b129e0644f68d840bd0519a55 Mon Sep 17 00:00:00 2001 From: aniplcc Date: Tue, 2 Apr 2024 00:39:43 +0530 Subject: [PATCH] [clang]SveEmitter:Update isVoid() to address #87271 ---

[clang] [clang]SveEmitter:Update isVoid() to address #87271 (PR #87276)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: aniplcc (aniplcc) Changes Fixes #87271 --- Full diff: https://github.com/llvm/llvm-project/pull/87276.diff 1 Files Affected: - (modified) clang/utils/TableGen/SveEmitter.cpp (+1-1) ``diff diff --git a/clang/utils/TableGen/Sv

[clang] [X86_64] fix arg pass error in struct. (PR #86902)

2024-04-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Try rebasing your patch? If you're unlucky, you might have based your patch on a bad revision of main (and the buildbot just uses your branch as-is). https://github.com/llvm/llvm-project/pull/86902 ___ cfe-commits mailing list cf

[clang] [clang] Better bitfield access units (PR #65742)

2024-04-01 Thread Nathan Sidwell via cfe-commits
urnathan wrote: Be aware of bug #87227 and PR #87238 to address that https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-04-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] MIPS/Clang: Set HasUnalignedAccess false if +strict-align (PR #87257)

2024-04-01 Thread Nathan Sidwell via cfe-commits
@@ -330,6 +331,8 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo { IsMicromips = true; else if (Feature == "+mips32r6" || Feature == "+mips64r6") HasUnalignedAccess = true; + else if (Feature == "+strict-align") +StrictAli

[clang] [clang] Fix bitfield access unit for vbase corner case (PR #87238)

2024-04-01 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan ready_for_review https://github.com/llvm/llvm-project/pull/87238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-04-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: (Please fix the formatting issue before merging) https://github.com/llvm/llvm-project/pull/86075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix bitfield access unit for vbase corner case (PR #87238)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Sidwell (urnathan) Changes This fixes #87227 My change to bitfield access unit allocation (#65742) causes an ICE for a corner case of vbase allocation: a class where an unshared (i.e. not the nearly-empty base optimization) vbase is

[clang] [clang]SveEmitter:Update isVoid() to address #87271 (PR #87276)

2024-04-01 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/87276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. Functionality-wise, this looks good to me, I only have some comments regarding cleanup. Please also add tests for min and max calls that are true-negatives, i.e.: `std::max(1, 2);`, `std::max({1, 2, 3});` and `std::max({1, 2,

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

<    1   2   3   4   >