[clang] [llvm] [llvm] properly guard dump methods in Support lib classes (PR #139938)

2025-05-14 Thread Andrew Rogers via cfe-commits
https://github.com/andrurogerz created https://github.com/llvm/llvm-project/pull/139938 ## Purpose Add proper preprocessor guards for all `dump()` methods in the LLVM support library. This change ensures these methods are not part of the public ABI for release builds. ## Overview * Annotates

[clang] baf2cfa - Revert "[clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used" (#139936)

2025-05-14 Thread via cfe-commits
Author: Fangyi Zhou Date: 2025-05-14T13:45:05-04:00 New Revision: baf2cfa299ea62f3bdb717c8f464f824257527ff URL: https://github.com/llvm/llvm-project/commit/baf2cfa299ea62f3bdb717c8f464f824257527ff DIFF: https://github.com/llvm/llvm-project/commit/baf2cfa299ea62f3bdb717c8f464f824257527ff.diff L

[clang] Revert "[clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used" (PR #139936)

2025-05-14 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao closed https://github.com/llvm/llvm-project/pull/139936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[lit][clang] Avoid realpath on Windows due to MAX_PATH limitations" (PR #139739)

2025-05-14 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: The patch is meant to support the following pattern (which IMO is actually the proper way to deal with the path canonicalisation): ```cmd subst X: %UserProfile%\SourceCache X: cmake -B X:\b -G Ninja -S llvm-project\llvm ninja -C \b ``` Everything is being built in `S:`, there i

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/139939 ...because its implementation was using a complicated two-pass graph traversal while in fact one pass is sufficient for performing that trimming operation. Note that this commit changes the interface of `trim

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: This is the cleanup of `ExplodedGraph::trim()` that I promised at https://github.com/llvm/llvm-project/commit/31e981ca1dc323c8a32012cb60a0a8fe3985db1a. This significantly simplifies the algorithm and should be equivalent in a theoretical sense, but unfortunately it changes the

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-05-14 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez edited https://github.com/llvm/llvm-project/pull/137665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -0,0 +1,155 @@ +// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wconversion %s + +void c8(char8_t); +void c16(char16_t); +void c32(char32_t); + +void test(char8_t u8, char16_t u16, char32_t u32) { +c8(u8); +c8(u16); // expected-warning {{implicit conversion from 'c

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-14 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/139772 >From 99dfb74ada8922218afcca173c1fc3b69315fc4f Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Tue, 13 May 2025 17:16:53 + Subject: [PATCH] Implement src:*=sanitize for UBSan --- clang/lib/Basic/NoSaniti

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Ilya Biryukov via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2025-05-14 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/119001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/139614 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Devon Loehr via cfe-commits
@@ -710,4 +710,17 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_PREFERRED_TYPE(T) #endif +/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION +/// This macro is used to adhere to LLVM's policy that each class with a vtable +/// must have at least one out-of-lin

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/139584 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-14 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/139772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-14 Thread via cfe-commits
apple-fcloutier wrote: @AaronBallman, @cor3ntin, what do you think? Split this in two, [like Oliver suggests](https://github.com/llvm/llvm-project/pull/135864#issuecomment-2879466843)? https://github.com/llvm/llvm-project/pull/135864 ___ cfe-commits m

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2025-05-14 Thread Vladislav Dzhidzhoev via cfe-commits
@@ -3901,6 +3903,57 @@ CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty) { return Res; } +llvm::DIScope *CGDebugInfo::PickCompositeTypeScope(llvm::DIScope *S, + StringRef Identifier) { + using llvm::DISubprogram; +

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2025-05-14 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/119001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Matheus Izvekov via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-05-14 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 updated https://github.com/llvm/llvm-project/pull/132489 >From 778502b697d7fe547e827f7d7394a7013a1c9ffb Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Fri, 21 Mar 2025 23:15:23 + Subject: [PATCH 1/3] [clang][IR] Overload @llvm.thread.pointer to support non-AS

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-14 Thread via cfe-commits
https://github.com/Mr-Anyone updated https://github.com/llvm/llvm-project/pull/139479 >From 86029ca424ddee771b95182b53d5bbdfd7fd049d Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 11 May 2025 19:01:34 -0400 Subject: [PATCH 1/3] [clang] Compound Literal Statement Constant Expression Assertio

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-05-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Please update LangRef with the new overload and verifier rule. https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-05-14 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 updated https://github.com/llvm/llvm-project/pull/132489 >From 778502b697d7fe547e827f7d7394a7013a1c9ffb Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Fri, 21 Mar 2025 23:15:23 + Subject: [PATCH 1/2] [clang][IR] Overload @llvm.thread.pointer to support non-AS

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-05-14 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > I'm mostly concerned about the case where the lowered node has the wrong > type. For example, AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN always > creates a value with the pointer width of addrspace 0, but address spaces > exist which don't have the native pointer width (arm

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-14 Thread via cfe-commits
@@ -7241,10 +7241,21 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, ? VK_PRValue : VK_LValue; + // C99 6.5.2.5 + // "If the compound literal occurs outside the body of a function, the + // initializer list shall con

[clang] [llvm] [llvm][DebugInfo][clang] Finalize all declaration subprograms in DIBuilder::finalize() (PR #139914)

2025-05-14 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/139914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][DebugInfo][clang] Finalize all declaration subprograms in DIBuilder::finalize() (PR #139914)

2025-05-14 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/139914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-14 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 HEAD~1 HEAD --extensions cpp -- clang/lib/StaticAnalyzer/Core/BugReporter.cpp clang/

[clang] [sanitizer][NFCI] Add 'SanitizerAnnotateDebugInfo' (PR #139965)

2025-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Thurston Dang (thurstond) Changes This generalizes the debug info annotation code from https://github.com/llvm/llvm-project/pull/139149 and moves it into a helper function, SanitizerAnnotateDebugInfo().

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/138976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-14 Thread Justin Bogner via cfe-commits
@@ -3296,27 +3312,42 @@ static bool initVarDeclWithCtor(Sema &S, VarDecl *VD, return true; } -static bool initGlobalResourceDecl(Sema &S, VarDecl *VD) { +bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) { + std::optional RegisterSlot; + uint32_t SpaceNo = 0; HLSLResou

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
@@ -127,11 +127,7 @@ template constexpr vector lit_impl(T NDotL, T NDotH, T M) { } template constexpr T faceforward_impl(T N, T I, T Ng) { -#if (__has_builtin(__builtin_spirv_faceforward)) - return __builtin_spirv_faceforward(N, I, Ng); -#else return select(dot(I, Ng) <

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Description mentions instcombine but this has nothing to do with instcombine https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [sanitizer][NFCI] Add 'SanitizerAnnotateDebugInfo' (PR #139965)

2025-05-14 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/139965 This generalizes the debug info annotation code from https://github.com/llvm/llvm-project/pull/139149 and moves it into a helper function, SanitizerAnnotateDebugInfo(). Future work can use 'ApplyDebugLocatio

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-14 Thread Thurston Dang via cfe-commits
@@ -1217,6 +1217,35 @@ void CodeGenFunction::EmitBoundsCheck(const Expr *E, const Expr *Base, EmitBoundsCheckImpl(E, Bound, Index, IndexType, IndexedType, Accessed); } +llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( thurstond wrote: Spun of

[clang] [sanitizer][NFCI] Add 'SanitizerAnnotateDebugInfo' (PR #139965)

2025-05-14 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/139965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 960afcc - [clang][modules] Timestamp-less validation API (#138983)

2025-05-14 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-05-14T14:31:23-07:00 New Revision: 960afcc90e8fb75b725ed331f4bc60eb2398d6e5 URL: https://github.com/llvm/llvm-project/commit/960afcc90e8fb75b725ed331f4bc60eb2398d6e5 DIFF: https://github.com/llvm/llvm-project/commit/960afcc90e8fb75b725ed331f4bc60eb2398d6e5.diff L

[clang] [clang-tools-extra] [clang][modules] Timestamp-less validation API (PR #138983)

2025-05-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/138983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/138429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/138708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -34,6 +34,6 @@ int main(int, char**) { assert(from_next - from == 9); assert(to_next - to == 9); for (unsigned i = 0; i < 9; ++i) -assert(to[i] == from[i]); +assert(static_cast(to[i]) == static_cast(from[i])); EricWF wrote: Why are we casting

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -618,7 +618,7 @@ template void utf8_to_utf16_in_error(const std::codecvt& cvt) { // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP, 4-byte CP const unsigned char input[] = "b\u0448\uD700\U0010"; - const char16_t expected[] = {'b', 0x0448, 0xD700, 0xDBEA, 0xDEAA

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -618,7 +618,7 @@ template void utf8_to_utf16_in_error(const std::codecvt& cvt) { // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP, 4-byte CP const unsigned char input[] = "b\u0448\uD700\U0010"; - const char16_t expected[] = {'b', 0x0448, 0xD700, 0xDBEA, 0xDEAA

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -484,7 +484,7 @@ template void utf8_to_utf16_in_ok(const std::codecvt& cvt) { // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP const unsigned char input[] = "b\u0448\u\U0010"; - const char16_t expected[] = {'b', 0x0448, 0x, 0xDBEA, 0xDEAA

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -123,7 +123,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __encode(_OutIt& __out_it, char32_t __value _LIBCPP_ASSERT_UNCATEGORIZED(__is_scalar_value(__value), "an invalid unicode scalar value results in invalid UTF-16"); if (__value < 0x1) { -*__out_it++ = __value

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
@@ -123,7 +123,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __encode(_OutIt& __out_it, char32_t __value _LIBCPP_ASSERT_UNCATEGORIZED(__is_scalar_value(__value), "an invalid unicode scalar value results in invalid UTF-16"); if (__value < 0x1) { -*__out_it++ = __value

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-14 Thread via cfe-commits
https://github.com/EricWF commented: I don't mean to be difficult, but I'm always weary about removing test coverage, and I'm not yet convinced that the tests didn't intend to test these sketchy conversions. The way it uses the typedefs elsewhere in the same tests, while pinning some of the t

[clang] [Cygwin] Export global symbols, template instantiations, RTTI and VTable are exported correctly (PR #138773)

2025-05-14 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya closed https://github.com/llvm/llvm-project/pull/138773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)

2025-05-14 Thread Brad Smith via cfe-commits
brad0 wrote: @rorth Can you please check this on Solaris? https://github.com/llvm/llvm-project/pull/79539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 86ba681 - [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (#139560)

2025-05-14 Thread via cfe-commits
Author: Yanzuo Liu Date: 2025-05-14T10:25:01+02:00 New Revision: 86ba681e286d0a377830d2cbbc5e58bb5fad442c URL: https://github.com/llvm/llvm-project/commit/86ba681e286d0a377830d2cbbc5e58bb5fad442c DIFF: https://github.com/llvm/llvm-project/commit/86ba681e286d0a377830d2cbbc5e58bb5fad442c.diff LO

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-14 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/139560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Younan Zhang via cfe-commits
@@ -5054,95 +5089,128 @@ bool TreeTransform::TransformTemplateArguments( } if (In.getArgument().isPackExpansion()) { - // We have a pack expansion, for which we will be substituting into - // the pattern. - SourceLocation Ellipsis; - UnsignedOrNone

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 deleted https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-14 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/139859 Resolves #138939 When enabling `--fno-exceptions` flag, discarded statements containing `try/catch/throw` in an independent context can be avoided from being rejected. >From 552e394608f8c8d70ddef70a32dd9bd4

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rajveer Singh Bharadwaj (Rajveer100) Changes Resolves #138939 When enabling `--fno-exceptions` flag, discarded statements containing `try/catch/throw` in an independent context can be avoided from being rejected. --- Full diff: https://g

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-14 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @erichkeane As expected the following case is being accepted, which shouldn't happen, let me know what you recommend to diagnose this: ```c++ template void foo() { try { } catch (...) { } throw 1; } void bar2() { foo(); } ``` https://github.com/llvm/llvm-project/pul

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Needs header test https://github.com/llvm/llvm-project/pull/139697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress errors from well-formed-testing type traits in SFINAE contexts (PR #135390)

2025-05-14 Thread via cfe-commits
cor3ntin wrote: @aaronpuchert Bug Fixes to C++ Support would be the correct place, yes. You can put the entry somewhere other than the end of the list to minimize the risk of conflicts, but it should be in the same commit. https://github.com/llvm/llvm-project/pull/135390 __

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir Author: MingYan (NexMing) Changes This patch split `-emit-fir` and `-emit-mlir` option in Flang's frontend driver. A new parent class for code-gen frontend actions is introduced:`CodeGenAction`. For the `-emit-mlir` option, we aim to ge

[clang] Suppress errors from well-formed-testing type traits in SFINAE contexts (PR #135390)

2025-05-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo missing release note https://github.com/llvm/llvm-project/pull/135390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Add managarm support (PR #139271)

2025-05-14 Thread Brad Smith via cfe-commits
brad0 wrote: Managarm has to be added to clang/lib/Lex/InitHeaderSearch.cpp ShouldAddDefaultIncludePaths(). https://github.com/llvm/llvm-project/pull/139271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. The clang parts look like a nice improvement, thanks! Please wait for a few other people to review it though. https://github.com/llvm/llvm-project/pull/139584 ___ cfe-commits mailing list cfe-com

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Oliver Hunt via cfe-commits
@@ -2032,6 +2032,7 @@ class SourceManagerForFile { // as they are created in `createSourceManagerForFile` so that they can be // deleted in the reverse order as they are created. std::unique_ptr FileMgr; + std::unique_ptr DiagOpts; ojhunt wrote: I don't

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread via cfe-commits
@@ -107,6 +107,7 @@ class ASTUnit { private: std::unique_ptr LangOpts; + std::shared_ptr DiagOpts; cor3ntin wrote: Can that be unique_ptr ? https://github.com/llvm/llvm-project/pull/139584 ___ cfe-commits mailin

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-05-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/122423 >From 56bacf47c53aca276ae4fa6aa2972b7eda152ddd Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 10 Jan 2025 09:46:24 +0800 Subject: [PATCH 01/14] Reapply "[Clang] Implement CWG2369 "Ordering between const

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah requested changes to this pull request. The code changes look okay here but I think the naming should reflect that the lowering to upstream MLIR dialects will be considered experimental (and may remain so forever, if it cannot be made to fully conform to Fortran semanti

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread via cfe-commits
@@ -837,6 +838,7 @@ class ASTUnit { static std::unique_ptr LoadFromCommandLine( const char **ArgBegin, const char **ArgEnd, std::shared_ptr PCHContainerOps, + std::shared_ptr DiagOpts, cor3ntin wrote: We probably can pass by reference here

[clang] 47c892a - [OpenCL] Add cl_ext_image_unsigned_10x6_12x4_14x2 extension (#134216)

2025-05-14 Thread via cfe-commits
Author: Sven van Haastregt Date: 2025-05-14T07:59:44+01:00 New Revision: 47c892a49136c68425e7ade08553598e63ef4e70 URL: https://github.com/llvm/llvm-project/commit/47c892a49136c68425e7ade08553598e63ef4e70 DIFF: https://github.com/llvm/llvm-project/commit/47c892a49136c68425e7ade08553598e63ef4e70.

[clang] [OpenCL] Add cl_ext_image_unsigned_10x6_12x4_14x2 extension (PR #134216)

2025-05-14 Thread Kévin Petit via cfe-commits
https://github.com/kpet closed https://github.com/llvm/llvm-project/pull/134216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Global symbols should be external by default (PR #139797)

2025-05-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM (will merge later today, to give some grace time for others to comment, even if it is unlikely that there's anything to object to here). https://github.com/llvm/llvm-project/pull/139797 ___

[clang] [Cygwin] Global symbols should be external by default (PR #139797)

2025-05-14 Thread Martin Storsjö via cfe-commits
@@ -2,6 +2,8 @@ // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple i686-windows-gnu-fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-window

[clang] [Cygwin] Global symbols should be external by default (PR #139797)

2025-05-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo edited https://github.com/llvm/llvm-project/pull/139797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-14 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-14 Thread via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] 4554c85 - [clang][bytecode] Use IsNonNull op in visitBool() (#139846)

2025-05-14 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-14T09:14:03+02:00 New Revision: 4554c852398d0f6e46950e9bc51f74aa1b11b29a URL: https://github.com/llvm/llvm-project/commit/4554c852398d0f6e46950e9bc51f74aa1b11b29a DIFF: https://github.com/llvm/llvm-project/commit/4554c852398d0f6e46950e9bc51f74aa1b11b29a.diff L

[clang] [clang][bytecode] Use IsNonNull op in visitBool() (PR #139846)

2025-05-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/139846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] RTTI and VTable should be dllexport-ed (PR #139798)

2025-05-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a6ae223 - [clang][bytecode][NFC] Avoid an implicit integer conversion (#139845)

2025-05-14 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-14T09:16:20+02:00 New Revision: a6ae2237aad763c2abf90f28c247a084216a48b2 URL: https://github.com/llvm/llvm-project/commit/a6ae2237aad763c2abf90f28c247a084216a48b2 DIFF: https://github.com/llvm/llvm-project/commit/a6ae2237aad763c2abf90f28c247a084216a48b2.diff L

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-05-14 Thread via cfe-commits
cor3ntin wrote: @zyn0217 is that ready for review? https://github.com/llvm/llvm-project/pull/122423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d441d28 - [clang][NFC] Fix indentation in a comment

2025-05-14 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-14T11:43:21+03:00 New Revision: d441d28083e2f9de5170f5a96a8e44a38d306c62 URL: https://github.com/llvm/llvm-project/commit/d441d28083e2f9de5170f5a96a8e44a38d306c62 DIFF: https://github.com/llvm/llvm-project/commit/d441d28083e2f9de5170f5a96a8e44a38d306c62.

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-05-14 Thread via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: cor3ntin wrote: This seems reasonable. Can you update the description to explain the motivation for the change, though? Is it a bug you are trying to fix, or a specific scenario you th

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139709 >From d90661aac34ae311f2d550ca0391e9e5232eb585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 13 May 2025 11:59:56 +0200 Subject: [PAT

[clang] 155e188 - [NVPTX] Add intrinsics and clang builtins for conversions of f4x2 type (#139244)

2025-05-14 Thread via cfe-commits
Author: Srinivasa Ravi Date: 2025-05-14T14:39:59+05:30 New Revision: 155e188d94c95b9f389912db2fb180ac8dd75a28 URL: https://github.com/llvm/llvm-project/commit/155e188d94c95b9f389912db2fb180ac8dd75a28 DIFF: https://github.com/llvm/llvm-project/commit/155e188d94c95b9f389912db2fb180ac8dd75a28.diff

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-14 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: We're facing a regression after this one. We can't build https://github.com/dslarm/Financial-Services-Workload-Samples/tree/main/MonteCarloEuropeanOptions with `-g` for AArch64 with -fopenmp now: ``` Stack dump: 0. Program arguments: /usr/bin/clang-21 -cc1 -triple aarch

[clang] [llvm] [Mips] Implement MipsInstrInfo::getNop() operation (PR #135524)

2025-05-14 Thread via cfe-commits
@@ -87,6 +87,14 @@ MipsInstrInfo::GetMemOperand(MachineBasicBlock &MBB, int FI, MFI.getObjectAlign(FI)); } +MCInst MipsInstrInfo::getNop() const { + MCInst Nop; + // using Mips::NOP gives + // "fatal error: error in backend: Not supported in

[clang] Fix missing initializer for inline static template member with auto caused by delayed template instantiation. (PR #138122)

2025-05-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks for working on this @dty2 Can you fix the merge conflict? Will you need us to merge that for you? https://github.com/llvm/llvm-project/pull/138122 ___ cfe-commits mailing list cfe-co

[clang] a31d7d1 - [NFC] Typo in __clang_hip_cmath.h (#139892)

2025-05-14 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-05-14T15:19:06+02:00 New Revision: a31d7d1a2480708e665bd8556a5f0013f6350322 URL: https://github.com/llvm/llvm-project/commit/a31d7d1a2480708e665bd8556a5f0013f6350322 DIFF: https://github.com/llvm/llvm-project/commit/a31d7d1a2480708e665bd8556a5f001

[clang] [NFC] Typo in __clang_hip_cmath.h (PR #139892)

2025-05-14 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/139892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed vec_pack_to_short_fp32 in Clang altivec.h (PR #129923)

2025-05-14 Thread John Platts via cfe-commits
johnplatts wrote: @lei137 What is the status of merging this pull request? https://github.com/llvm/llvm-project/pull/129923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Generally LGTM but a suggestion for a perhaps more clear way to do it https://github.com/llvm/llvm-project/pull/139820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/139820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-14 Thread Aaron Ballman via cfe-commits
@@ -103,6 +103,8 @@ class SymbolConjured : public SymbolData { const Stmt *getStmt() const { switch (Elem->getKind()) { case CFGElement::Initializer: + if (Elem->castAs().getInitializer() == nullptr) AaronBallman wrote: How about ``` if (const a

[clang] [llvm] [RISCV][MC] Add Q support for Zfa (PR #139508)

2025-05-14 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/139508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in ASTConcept (PR #139974)

2025-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Use non-templated form of `getTrailingObjects` when using a single trailing type in `TrailingObjects`. --- Full diff: https://github.com/llvm/llvm-project/pull/139974.diff 2 Files Affected: - (modified) cl

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in ASTConcept (PR #139974)

2025-05-14 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/DeclTemplate (PR #139977)

2025-05-14 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/DeclTemplate (PR #139977)

2025-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Adopt simplied `getTrailingObjects` variants that are not templated and/or return ArrayRef in Decl/DeclTemplate .h/.cpp files. --- Full diff: https://github.com/llvm/llvm-project/pull/139977.diff 4 Files Af

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-14 Thread ALBIN BABU VARGHESE via cfe-commits
https://github.com/albus-droid created https://github.com/llvm/llvm-project/pull/139986 This fixes #139268 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-14 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

  1   2   3   4   5   >