[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-06-13 Thread Kohei Asano via cfe-commits
@@ -1864,7 +1894,11 @@ FormatStyle getWebKitStyle() { Style.ObjCSpaceAfterProperty = true; Style.PointerAlignment = FormatStyle::PAS_Left; Style.SpaceBeforeCpp11BracedList = true; - Style.SpaceInEmptyBlock = true; + Style.SpaceInEmptyBraces = FormatStyle::SIEBO_Custom;

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech closed https://github.com/llvm/llvm-project/pull/95499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ab37e4 - [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (#95499)

2024-06-13 Thread via cfe-commits
Author: Roland McGrath Date: 2024-06-13T23:40:58-07:00 New Revision: 4ab37e430d960b975bfdaf95516a39ea3468f7a1 URL: https://github.com/llvm/llvm-project/commit/4ab37e430d960b975bfdaf95516a39ea3468f7a1 DIFF: https://github.com/llvm/llvm-project/commit/4ab37e430d960b975bfdaf95516a39ea3468f7a1.diff

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/95499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Define wint_t type as unsigned int (PR #95508)

2024-06-13 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/95508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Define wint_t type as unsigned int (PR #95508)

2024-06-13 Thread Petr Hosek via cfe-commits
petrhosek wrote: Looks like @frobtech already created #95499. https://github.com/llvm/llvm-project/pull/95508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Dump Auto Type Inference (PR #95509)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nisarga V (nisarga3) Changes This pull request introduces the functionality to dump type inferences for variables and function return types using the auto keyword in C++11. When the -fdump-auto-type-inference option is specified, the comp

[clang] [clang] Dump Auto Type Inference (PR #95509)

2024-06-13 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] Dump Auto Type Inference (PR #95509)

2024-06-13 Thread Nisarga V via cfe-commits
https://github.com/nisarga3 created https://github.com/llvm/llvm-project/pull/95509 This pull request introduces the functionality to dump type inferences for variables and function return types using the auto keyword in C++11. When the -fdump-auto-type-inference option is specified, the compi

[clang] [Fuchsia] Define wint_t type as unsigned int (PR #95508)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes This matches the type used by Fuchsia libc. --- Full diff: https://github.com/llvm/llvm-project/pull/95508.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/OSTargets.h (+1) ``diff dif

[clang] [Fuchsia] Define wint_t type as unsigned int (PR #95508)

2024-06-13 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/95508 This matches the type used by Fuchsia libc. >From 05fdc445f601f04560ca4106760257d7531b29e0 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 14 Jun 2024 06:08:16 + Subject: [PATCH] [Fuchsia] Define wint

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-13 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-13 Thread A. Jiang via cfe-commits
@@ -3300,6 +3308,11 @@ static bool HandleLValueComplexElement(EvalInfo &Info, const Expr *E, static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Versio

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-13 Thread A. Jiang via cfe-commits
@@ -1961,7 +1961,8 @@ namespace ConstexprConstructorRecovery { namespace Lifetime { void f() { -constexpr int &n = n; // expected-error {{constant expression}} expected-note {{use of reference outside its lifetime}} expected-warning {{not yet bound to a value}} +co

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/95479 >From d66fdcbe0a56e17dbd25e6d2ed5bdcce1970fdea Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH 1/2] fix(95366): enhance cast operation safety with LValue valid

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/92031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2e7b95e - [Safe Buffers] Serialize unsafe_buffer_usage pragmas (#92031)

2024-06-13 Thread via cfe-commits
Author: Ziqing Luo Date: 2024-06-13T22:44:24-07:00 New Revision: 2e7b95e4c080426e5085c38cec01176b56798534 URL: https://github.com/llvm/llvm-project/commit/2e7b95e4c080426e5085c38cec01176b56798534 DIFF: https://github.com/llvm/llvm-project/commit/2e7b95e4c080426e5085c38cec01176b56798534.diff LO

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c11 + +int x(void) { e: b: ; return &&e - &&b < x; } // expected-warning {{ordered comparison between pointer and integer ('long' and 'int (*)(void)')}} Sirraide wrote: ```suggestion int x(void) {

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM after addressing one issue. Looking at the rest of the constant evaluator (and the comments on the issue as well), everything else seems to use `EvaluateInteger`, which makes sure the result of the evaluation is an integer, so this s

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I sent https://github.com/llvm/llvm-project/pull/95506. It is a independent patch which may mitigate the issue you met. @alexfh you can try this when you have time. https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mai

[clang] [Serialization] Don't read all declaration id eagerly when merge the tables (PR #95506)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes See the post commit message in https://github.com/llvm/llvm-project/pull/92083 for rationale. Previously, when we merge the lookup tables, we will read the tables completely to get the data. But the above p

[clang] [Serialization] Don't read all declaration id eagerly when merge the tables (PR #95506)

2024-06-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/95506 See the post commit message in https://github.com/llvm/llvm-project/pull/92083 for rationale. Previously, when we merge the lookup tables, we will read the tables completely to get the data. But the above pag

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-13 Thread Owen Pan via cfe-commits
@@ -1269,10 +1269,17 @@ class AnnotatingParser { if (CurrentToken && CurrentToken->is(tok::less)) { CurrentToken->setType(TT_TemplateOpener); next(); - if (!parseAngle()) + TemplateDeclarationDepth++; + if (!parseAngle()) { +TemplateDeclar

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM. Please make clang format happy before merging. https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From eb296a4e28e54971f6e90e2fe4543ead4c7c2dbb Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From bdb35190d9873e4413863be1bba842cb202842fc Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-13 Thread Chris Copeland via cfe-commits
chrisnc wrote: While doing some more research and comparing `gcc` and `clang`, I noticed that `clang` doesn't even save the volatile fp registers in an interrupt handler when it uses them directly, so there's no point in just checking for function calls. `gcc` does except for `fpscr`, which it

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95503)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Closes #95094. --- Full diff: https://github.com/llvm/llvm-project/pull/95503.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineFormatter.cpp (+4-1) - (modified) clang/unittests/Format/F

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95503)

2024-06-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/95503 Closes #95094. >From 6684ed759ce118bb28e9da22be51bcfece2a1909 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 13 Jun 2024 21:25:08 -0700 Subject: [PATCH] [clang-format] Handle AttributeMacro before access modi

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-13 Thread Henrik G. Olsson via cfe-commits
@@ -3330,6 +3340,118 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Roland McGrath (frobtech) Changes This aligns Fuchsia targets with other similar OS targets such as Linux. Fuchsia's libc already uses unsigned rather than the compiler-provided __WINT_TYPE__ macro for its wint_t typedef, so this just make

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/95499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/95499 >From c4e8968197c401f03baaed904d07a5ce77c19ace Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2024 20:25:24 -0700 Subject: [PATCH] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targ

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/95499 This aligns Fuchsia targets with other similar OS targets such as Linux. Fuchsia's libc already uses unsigned rather than the compiler-provided __WINT_TYPE__ macro for its wint_t typedef, so this just makes the

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-06-13 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > All the LIT tests failing are due to the latest changes I made. I will edit > them once I know that the latest implementation is correct. Thanks. I may be delayed in reviewing this as the C++ committee meeting is the week after next. https://github.com/llvm/llv

[clang] [InstCombine] Add multi-use tests for shift-of-shift transform (NFC) (PR #95497)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech closed https://github.com/llvm/llvm-project/pull/95497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Add multi-use tests for shift-of-shift transform (NFC) (PR #95497)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/95497 Also drop irrelevant function attributes from tests. >From c4e8968197c401f03baaed904d07a5ce77c19ace Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2024 20:25:24 -0700 Subject: [PATCH] [clang][F

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for the profiling data. It narrows the scope a lot. But it makes me confusing too. Since the scope is pretty narrow, we can do an analysis here: https://github.com/llvm/llvm-project/blob/a7a1195f01037e5019f671c96ef4bca9af9bb9a7/clang/lib/Serialization/MultiOnDiskHashTab

[clang] 43bd7ae - StreamChecker.cpp: Use isa<> (for #93408) [-Wunused-but-set-variable]

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-06-14T12:18:41+09:00 New Revision: 43bd7ae65af40ff3378d5a0395a058ba834ad8dd URL: https://github.com/llvm/llvm-project/commit/43bd7ae65af40ff3378d5a0395a058ba834ad8dd DIFF: https://github.com/llvm/llvm-project/commit/43bd7ae65af40ff3378d5a0395a058ba834ad8dd.dif

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-13 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-13 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Introduce [[clang::coro_structured_concurrency]] (PR #94693)

2024-06-13 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo @llvm/pr-subscribers-llvm-transforms Author: NAKAMURA Takumi (chapuni) Changes 3rd arg of `tvbitmap.update` was made unused. Remove 3rd arg. Sweep `condbitmap.update`, since it is no longer used. --- Full diff: https://github.com/llvm/llvm-project/

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/95496 3rd arg of `tvbitmap.update` was made unused. Remove 3rd arg. Sweep `condbitmap.update`, since it is no longer used. >From 80e4ff0501e6ba4c30bd94faec03ba3dcd2ad4ee Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi

[clang] [clang] SourceLocIdentKind::Function should not be dependent (PR #94942)

2024-06-13 Thread Qizhi Hu via cfe-commits
jcsxky wrote: ```cpp struct BasicPersistent; struct SourceLocation { static constexpr const char* Current(const char * func = __builtin_FUNCTION()) { return func; } }; template BasicPersistent &&__declval(int); template auto declval() -> decltype(__declval<_Tp>(0));

[clang] [compiler-rt] [llvm] [InstrProf] Created Thread local counter instrumentation, compiler-rt runtimes (PR #95494)

2024-06-13 Thread Andrew Wock via cfe-commits
ajwock wrote: https://discourse.llvm.org/t/rfc-profiling-counters-in-thread-local-storage/79596 https://github.com/llvm/llvm-project/pull/95494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [compiler-rt] [llvm] [InstrProf] Created Thread local counter instrumentation, compiler-rt runtimes (PR #95494)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Andrew Wock (ajwock) Changes LLVM can now generate increments to counters in thread local storage. Use a new compiler-rt runtime to atomically add thread local counters to global counters on thread exit. The clang driver will link

[clang] [compiler-rt] [llvm] [InstrProf] Created Thread local counter instrumentation, compiler-rt runtimes (PR #95494)

2024-06-13 Thread Andrew Wock via cfe-commits
https://github.com/ajwock created https://github.com/llvm/llvm-project/pull/95494 LLVM can now generate increments to counters in thread local storage. Use a new compiler-rt runtime to atomically add thread local counters to global counters on thread exit. The clang driver will link the new r

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

2024-06-13 Thread Chuanqi Xu via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) ChuanqiXu9 wrote: Done. I don't mind doing it really. But what I confuse is, it looks there are a lot of codes in Co

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

2024-06-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From cf8be3c418dde67b74d4a5a4ea98a33f0e2fbd72 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/7] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

[clang] [llvm] [Clang] Introduce [[clang::coro_structured_concurrency]] (PR #94693)

2024-06-13 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-13 Thread William Junda Huang via cfe-commits
@@ -5746,6 +5746,57 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder, + llvm::Instruction *Value, QualType Ty) { + // Only when -g2

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-13 Thread William Junda Huang via cfe-commits
@@ -5746,6 +5746,57 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder, + llvm::Instruction *Value, QualType Ty) { + // Only when -g2

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-13 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/95298 >From 0c49ae55b4b05a9c701288f106c138cab4af37f0 Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 12 Jun 2024 03:48:51 -0400 Subject: [PATCH 1/2] (New) Add option to generate additional debug info for expre

[clang] Check whether EvaluatedStmt::Value is valid in VarDecl::hasInit (PR #94515)

2024-06-13 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/94515 >From 22a8fa09e81337f45c2ed94e229f06e9aaa32c0e Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 5 Jun 2024 11:02:31 -0700 Subject: [PATCH 1/2] Check whether EvaluatedStmt::Value is valid in VarDecl::has

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-13 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. Ok LGTM!! Thanks again for figuring this all out! https://github.com/llvm/llvm-project/pull/92031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/92031 >From ac5aeb5c3a134d085320fc7fc5cf3f2c8c41a1f1 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 13 May 2024 13:31:21 -0700 Subject: [PATCH 1/7] fix safe buffer opt-out region serialization --- clang/

[clang] [llvm] [llvm][AArch64] Support -mcpu=apple-m4 (PR #95478)

2024-06-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/95478 >From 1461be872bf26e2e0f2572f688a45af795421432 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 13 Jun 2024 10:27:52 -0700 Subject: [PATCH 1/2] [llvm][AArch64] Support -mcpu=apple-m4 --- .../llvm/TargetPa

[clang] [HLSL] Use hlsl vector template in type printer (PR #95489)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes In HLSL we really want to be using the HLSL vector template and other built-in sugared spellings for some builtin types. This updates the type printer to take an option to use HLSL type spellings. This changes

[clang] [HLSL] Use hlsl vector template in type printer (PR #95489)

2024-06-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/95489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Use hlsl vector template in type printer (PR #95489)

2024-06-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/95489 In HLSL we really want to be using the HLSL vector template and other built-in sugared spellings for some builtin types. This updates the type printer to take an option to use HLSL type spellings. This chang

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From a416e28efabdf812756f452b823c4b1e7388c865 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 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 602634d70cba2c51f6177740c4a98a377d10ab6a f6bcc20d07248069dee1ff19c1aa334152b311a8 --

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From f6bcc20d07248069dee1ff19c1aa334152b311a8 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > From Jan: > > > Maybe we can add the number of external HeaderFileInfos to > > HeaderSearch::PrintStats() and have a test that checks for it. > > The flag to enable that output is -show-stats I think. We tried this, but it seems that by the time the modules compile,

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 011ff5a95a4a5de1dc6ae2d271ae42f28075b2b0 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-13 Thread Artem Dergachev via cfe-commits
@@ -1911,18 +1911,22 @@ SourceManager::getDecomposedIncludedLoc(FileID FID) const { return DecompLoc; } -FileID SourceManager::getFirstFIDOfLoadedAST(SourceLocation Loc) const { +unsigned SourceManager::getUniqueLoadedASTID(SourceLocation Loc) const { assert(isLoadedSour

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/92031 >From ac5aeb5c3a134d085320fc7fc5cf3f2c8c41a1f1 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 13 May 2024 13:31:21 -0700 Subject: [PATCH 1/6] fix safe buffer opt-out region serialization --- clang/

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,69 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py + // REQUIRES: amdgpu-registered-target + // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s + // RUN: %clang_cc1 -triple amdgcn-unkn

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94830 >From 24703e0480835fb2c491b7140c2ab5022218777d Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 13 Jun 2024 18:43:29 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc --- clang

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-13 Thread Artem Dergachev via cfe-commits
@@ -389,6 +389,7 @@ my %CompilerLinkerOptionMap = ( '-target' => 1, '-v' => 0, '-mmacosx-version-min' => 0, # This is really a 1 argument, but always has '=' + '-mmacos-version-min' => 0, # This is really a 1 argument, but always has '=' haoNoQ wrote:

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #95366 --- Full diff: https://github.com/llvm/llvm-project/pull/95479.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/AST/ExprConstant.cpp (+3) - (add

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/95479 Fixes #95366 >From d66fdcbe0a56e17dbd25e6d2ed5bdcce1970fdea Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH] fix(95366): enhance cast operation safety with LVa

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,69 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py + // REQUIRES: amdgpu-registered-target + // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s + // RUN: %clang_cc1 -triple amdgcn-unkn

[clang] [llvm] [AArch64] set AppleA14 architecture version to v8.4-a (PR #92600)

2024-06-13 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > @jroelofs on a slight tangent, when do we get to add information on the M4 > chip? https://github.com/llvm/llvm-project/pull/95478 https://github.com/llvm/llvm-project/pull/92600 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-13 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: Follow-up PR #95455 https://github.com/llvm/llvm-project/pull/94216 ___ 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-06-13 Thread Eli Friedman via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) efriedma-quic wrote: The way I see it, Sema should have the exact right answer for whether the vtable is required.

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes P2280R4 allows the use of references in pointers of unknown origins in a constant expression context but only in specific cases that could be constant expressions. We track whether a variable is a constex

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/95474 P2280R4 allows the use of references in pointers of unknown origins in a constant expression context but only in specific cases that could be constant expressions. We track whether a variable is a constexpr unkn

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-06-13 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 6152bd26438a32711589424f705281291475d548 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH] implement wraps attribute Signed-off-by: Justin Stitt --- cl

[clang] added regcall struct by reg support (PR #95257)

2024-06-13 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Right, the specification requires splitting the whole structure into chunks; if we add a special-case for 8-byte structs, we'll just have to throw it away when we implement the right algorithm. Also, I'm not sure what the isBuiltinType() check is supposed to handle. It s

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [lld] [lldb] [llvm] [mlir] [openmp] [llvm-project] Fix typo "seperate" (PR #95373)

2024-06-13 Thread Arjun P via cfe-commits
https://github.com/Superty approved this pull request. https://github.com/llvm/llvm-project/pull/95373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Require base element type of `__has_unique_object_representations` to be complete (PR #95432)

2024-06-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-13 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Relanded in 8f57f6895724f858c9db924200524fad86cc4f11 https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-13 Thread Eli Friedman via cfe-commits
@@ -325,14 +325,19 @@ Address SparcV9ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, break; case ABIArgInfo::Ignore: -return Address(llvm::UndefValue::get(ArgPtrTy), ArgTy, TypeInfo.Align); +return CGF.EmitLoadOfAnyValue( +CGF.MakeAddrLValue

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-13 Thread Eli Friedman via cfe-commits
@@ -834,5 +834,4 @@ typedef struct {} empty; empty empty_record_test(void) { // CHECK-LABEL: define{{.*}} void @empty_record_test() return va_arg(the_list, empty); -// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load ptr, ptr @the_list efriedma-quic wrote: Maybe should

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. A couple minor comments; otherwise LGTM https://github.com/llvm/llvm-project/pull/94635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/94635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Krzysztof Drewniak via cfe-commits
@@ -0,0 +1,9 @@ + +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn -emit-llvm -o - %s -debug-info-kind=limited 2>&1 | FileCheck %s + +// CHECK: name: "__amdgcn_buffer_rsrc_t",{{.*}}baseType: ![[BT:[0-9]+]] +// CHECK: [[BT]] = !DICompositeType(tag: DW_TAG_

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94830 >From 2eb6b3a58692ae3b8a6250e87516450a5085fa0f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 13 Jun 2024 17:02:11 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc --- clang

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-13 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -x hip -aux-triple amdgcn-amd-amdhsa %s -fsyntax-only -verify + +#define __device__ __attribute__((device)) + +__device__ __amdgcn_buffer_rsrc_t test_buffer_rsrc_t_device() {} // expected-warning {{non-void fun

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-13 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Yes, I think it's just a historical mistake; sin/cos/log/exp were added a very long time ago, and we weren't as careful about that sort of thing. And nobody has taken the time to try to cleanup the current defaults. https://github.com/llvm/llvm-project/pull/94559

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-13 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/94508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-06-13 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: LGTM now, for what it's worth. https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #90274 --- Full diff: https://github.com/llvm/llvm-project/pull/95434.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/Retu

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-13 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d4a0154 - [llvm-project] Fix typo "seperate" (#95373)

2024-06-13 Thread via cfe-commits
Author: Jay Foad Date: 2024-06-13T20:20:27+01:00 New Revision: d4a0154902fb9b0611ed857134b26a64a1d5ad1e URL: https://github.com/llvm/llvm-project/commit/d4a0154902fb9b0611ed857134b26a64a1d5ad1e DIFF: https://github.com/llvm/llvm-project/commit/d4a0154902fb9b0611ed857134b26a64a1d5ad1e.diff LOG:

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-13 Thread Matheus Izvekov via cfe-commits
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase { /// \returns true if an error occurred, false otherwise. bool CheckTemplateArgumentList( TemplateDecl *Template, SourceLocation TemplateLoc, - TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateA

  1   2   3   4   5   >