[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -26,16 +50,12 @@ void top(char *dst) { void *mempcpy(void *restrict s1, const void *restrict s2, size_t n); -void mempcpy14() { +void mempcpy13() { int src[] = {1, 2, 3, 4}; int dst[5] = {0}; int *p; - p = mempcpy(dst, src, 4 * sizeof(int)); // expected-warning

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Overall I'm satisfied with this commit, but I have some minor remarks. I'm publishing some review comments now, but I'll continue the review tomorrow. https://github.com/llvm/llvm-project/pull/95408 ___ cfe-comm

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -413,38 +588,18 @@ ProgramStateRef CStringChecker::CheckLocation(CheckerContext &C, if (!ER) return state; - SValBuilder &svalBuilder = C.getSValBuilder(); - ASTContext &Ctx = svalBuilder.getContext(); - // Get the index of the accessed element. - NonLoc Idx =

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Thomas Raoux via cfe-commits
@@ -6907,6 +7028,42 @@ TEST(APFloatTest, ConvertE2M3FToE3M2F) { EXPECT_EQ(status, APFloat::opInexact); } +TEST(APFloatTest, ConvertDoubleToE2M1F) { + bool losesInfo; ThomasRaoux wrote: right, not sure why we re-initialize it in the other cases, it's not ve

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

2024-06-13 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Looks good in principle, with a couple of nits. https://github.com/llvm/llvm-project/pull/95298 ___ 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 Jeremy Morse 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-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-13 Thread Kefu Chai via cfe-commits
tchaikov wrote: @PiotrZSL @SimplyDanny and @HerrCai0907 Hello, gentlemen. Would you be available to take a look at this at your earliest convenience? https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] Fix silent truncation of inline ASM `srcloc` cookie when going through a `DiagnosticInfoSrcMgr` (PR #84559)

2024-06-13 Thread via cfe-commits
https://github.com/beetrees updated https://github.com/llvm/llvm-project/pull/84559 >From fa68bd6294b9cc138a30a57d0b1bb563c3471592 Mon Sep 17 00:00:00 2001 From: beetrees Date: Fri, 8 Mar 2024 17:20:14 + Subject: [PATCH 1/2] Fix silent truncation of inline ASM `srcloc` cookie when going th

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Jakub Kuderski via cfe-commits
@@ -6907,6 +7028,42 @@ TEST(APFloatTest, ConvertE2M3FToE3M2F) { EXPECT_EQ(status, APFloat::opInexact); } +TEST(APFloatTest, ConvertDoubleToE2M1F) { + bool losesInfo; kuhar wrote: It's an output parameter in `.convert`, so shouldn't matter either way? http

[clang] [llvm] [LLVM] Add InsertPosition union-type to remove overloads of Instruction-creation (PR #94226)

2024-06-13 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/94226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add InsertPosition union-type to remove overloads of Instruction-creation (PR #94226)

2024-06-13 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer reopened https://github.com/llvm/llvm-project/pull/94226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Please have a second look at the llvm-related changes. Z3 has a really > dangerous C API. I shot myself in the foot literally 3 times while working on > this PR. > And btw notice that I removed the proof=false configuration as that is the > default AFAIK, so that's why that

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: The intention of the patch makes sense to me. However, I believe that the bug is inside the Store. It should not say it's `Undefined` if actually an existing binding overlaps (actually completely covers) the requested region. So, that said, the checker doe

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #95320)

2024-06-13 Thread via cfe-commits
https://github.com/zmodem approved this pull request. lgtm A test would be nice, but I see the other flags added in f1440bf6fd22ca0a5fc3594000e966201989fd48 don't have tests either, so maybe it's okay. https://github.com/llvm/llvm-project/pull/95320 ___

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/95381 >From a3da142b0db6581581ccb135800d77b09476f385 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 13 Jun 2024 10:43:52 +0100 Subject: [PATCH 1/2] [libclang/python] Fix bugs in custom enum implementatio

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Thorsten Schütt via cfe-commits
@@ -69,8 +69,8 @@ enum class fltNonfiniteBehavior { // encodings do not distinguish between signalling and quiet NaN. NanOnly, - // This behavior is present in Float6E3M2FN and Float6E2M3FN types, - // which do not support Inf or NaN values. + // This behavior is presen

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

2024-06-13 Thread Stephen Tozer 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 Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/95298 ___ 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 Nikolas Klauser via cfe-commits
philnik777 wrote: gentle ping 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] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

2024-06-13 Thread Akira Hatanaka via cfe-commits
@@ -201,14 +211,26 @@ template <> struct DominatingValue { class saved_type { enum Kind { ScalarLiteral, ScalarAddress, AggregateLiteral, AggregateAddress, ComplexAddress }; - -llvm::Value *Value; -llvm::Type *ElementType; +union { + struc

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

2024-06-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: @alexey-bataev https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f53a59 - Fix typos in comment

2024-06-13 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-06-13T09:52:39-07:00 New Revision: 0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a URL: https://github.com/llvm/llvm-project/commit/0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a DIFF: https://github.com/llvm/llvm-project/commit/0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a.diff

[clang] [llvm] [RISCV] Add scheduling model for Syntacore SCR3 (PR #95427)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Anton Sidorenko (asi-sc) Changes Syntacore SCR3 is a microcontroller-class processor core. Overview: https://syntacore.com/products/scr3 This PR introduces two CPUs: * 'syntacore-scr3-rv32' which is rv

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -413,38 +588,18 @@ ProgramStateRef CStringChecker::CheckLocation(CheckerContext &C, if (!ER) return state; - SValBuilder &svalBuilder = C.getSValBuilder(); - ASTContext &Ctx = svalBuilder.getContext(); - // Get the index of the accessed element. - NonLoc Idx =

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/95187 >From 753c6d43e44911cc7478738f1fc5d95d5780dbda Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 12 Jun 2024 01:05:59 + Subject: [PATCH 1/2] [clang-doc][cmake] Copy assets to build directory While we copy

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/95187 >From 753c6d43e44911cc7478738f1fc5d95d5780dbda Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 12 Jun 2024 01:05:59 + Subject: [PATCH 1/3] [clang-doc][cmake] Copy assets to build directory While we copy

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-13 Thread Paul Kirth via cfe-commits
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css install(FILES ../assets/index.js DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" COMPONENT clang-doc) + +add_custom_target(copy-clang-doc-assets ilovepi wrote: I think this is address

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Aaron Ballman via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -17,10 +17,6 @@ // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno" // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|}}foo/bar.gcno" -/// GCC allows PWD to change the paths. -// RUN: %if system-l

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css install(FILES ../assets/index.js DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" COMPONENT clang-doc) + +add_custom_target(copy-clang-doc-assets +COMMAND ${CMAKE_COMMAND} -E copy_directory "${

[clang] [llvm] [RISCV] Add scheduling model for Syntacore SCR3 (PR #95427)

2024-06-13 Thread Anton Sidorenko via cfe-commits
https://github.com/asi-sc created https://github.com/llvm/llvm-project/pull/95427 Syntacore SCR3 is a microcontroller-class processor core. Overview: https://syntacore.com/products/scr3 This PR introduces two CPUs: * 'syntacore-scr3-rv32' which is rv32imc * 'syntacore-scr3-rv64' which is rv

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: The files in the `Input` folder don't need a `clang-doc` prefix. They're already under `test/clang-doc` I'd also suggest renaming the folder from `project1` to something like `basic-project`. https://github.com/llvm/llvm-project/pull/93928 ___

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

2024-06-13 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I only managed to confirm that the problem is that merging of individual PCMs into a merged hash table has become much slower with this change. I tried with #95348 too, but it didn't help. I will continue my investigations and reductions tomorrow. https://github.com/llvm/l

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Let's wait for CI to pass. https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

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

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #95320)

2024-06-13 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/95320 ___ 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 Jeremy Morse 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-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

2024-06-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95434 Fixes: #90274 >From ecbd726bb937361b243ea4433e8c597c8d30f857 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 14 Jun 2024 00:50:04 +0800 Subject: [PATCH] [clang-tidy] avoid false positive when overloa

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

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

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-13 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. https://github.com/llvm/llvm-project/pull/81442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Durgadoss R via cfe-commits
@@ -69,8 +69,8 @@ enum class fltNonfiniteBehavior { // encodings do not distinguish between signalling and quiet NaN. NanOnly, - // This behavior is present in Float6E3M2FN and Float6E2M3FN types, - // which do not support Inf or NaN values. + // This behavior is presen

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Durgadoss R via cfe-commits
@@ -6907,6 +7028,42 @@ TEST(APFloatTest, ConvertE2M3FToE3M2F) { EXPECT_EQ(status, APFloat::opInexact); } +TEST(APFloatTest, ConvertDoubleToE2M1F) { + bool losesInfo; durga4github wrote: Updated this also to be consistent. https://github.com/llvm/llvm-proj

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll I merged the Python 3.8 CI into this PR and the CI run was successful (though it only ran on 3.8 for some reason), so can this be merged? https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-com

[clang] [llvm] Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (PR #95231)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: @labrinea @tmatheson-arm Is this the expected error? zlib uses similar code. ``` % cat neon.c #include __attribute__((target("armv8-a,crc"))) uint64x2_t foo(uint64x2_t a, uint64x2_t b) { return veorq_u64(a, b); } % newclang --target=aarch64-linux-gnu -c neon.c neon.c:5:10: er

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Also, I'm not sure I understand the need for empty files. If we don't need them, then lets remove them. If you need to use an empty file for some test, you can create those w/ `touch` in the test itself, but I don't see those referenced at all in `basic-pr

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Could you please drop the format only changes so that I could focus on the actual change set? https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/93623 ___ 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 Mital Ashok via cfe-commits
@@ -2791,6 +2791,12 @@ bool ASTContext::hasUniqueObjectRepresentations( return hasUniqueObjectRepresentations(getBaseElementType(Ty), CheckIfTriviallyCopyable); + if (Ty->isVoidType()) MitalAshok wrote: For the n

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

2024-06-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/95432 Fixes #95311 Previous behaviour was that `false` was silently returned, templated classes were not instantiated and incomplete classes did not issue an error. >From 3874b20e44c67e8ac0d2eb2665fb0ea9f09c6f5d M

[clang] 2146fd0 - Revert "Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (#95231)"

2024-06-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-13T11:49:22-07:00 New Revision: 2146fd0d8d0ede4657354594c012e7543534cd87 URL: https://github.com/llvm/llvm-project/commit/2146fd0d8d0ede4657354594c012e7543534cd87 DIFF: https://github.com/llvm/llvm-project/commit/2146fd0d8d0ede4657354594c012e7543534cd87.diff

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #95320)

2024-06-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: @zmodem - they are aliases after all. I think that core logic being tested is sufficient. I can see the value in testing that the flags are honoured, but the tests would be of low value IMO. They just test the flags are listed. https://github.com/llvm/llvm-project/pull/95320 __

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Kerry McLaughlin via cfe-commits
@@ -214,7 +232,8 @@ declare double @za_shared_callee(double) "aarch64_inout_za" define double @za_new_caller_to_za_shared_callee(double %x) nounwind noinline optnone "aarch64_new_za"{ ; CHECK-COMMON-LABEL: za_new_caller_to_za_shared_callee: ; CHECK-COMMON: // %bb.0: //

[clang] [llvm] [LLVM] Add InsertPosition union-type to remove overloads of Instruction-creation (PR #94226)

2024-06-13 Thread Stephen Tozer via cfe-commits
SLTozer wrote: Abandoned in favour of https://github.com/llvm/llvm-project/pull/94226. https://github.com/llvm/llvm-project/pull/94226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-13 Thread via cfe-commits
T-Gruber wrote: > Could you please drop the format only changes so that I could focus on the > actual change set? I just reverted the format changes. Thanks for letting me know. https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-06-13 Thread Nico Weber via cfe-commits
nico wrote: This causes #95451. https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (PR #95231)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: Probably unexpected. With older Clang versions, the `"target-features"` attribute contains `,+outline-atomics,+v8a,-fmv`, which is now missing. The lack of `v8a` and `outline-atomics` causes `veorq_u64` rejection. https://github.com/llvm/llvm-project/pull/95231 __

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/83301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (PR #95337)

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

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

2024-06-13 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont created https://github.com/llvm/llvm-project/pull/95455 This fixes #20777. This replaces #94216 which was reverted after being merged. Previously the `guarded_by`, `pt_guarded_by`, `acquired_after`, and `acquired_before` attributes were only supported inside C++

[clang-tools-extra] 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] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pierre d'Herbemont (pdherbemont) Changes This fixes #20777. This replaces #94216 which was reverted after being merged. Previously the `guarded_by`, `pt_guarded_by`, `acquired_after`, and `acquired_before` attributes were only supported

[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 bbe2a055c2448d8caf020d33c7e96a3e3bd75165 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 13 Jun 2024 15:39:02 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc --- clang

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-13 Thread Paul Kirth via cfe-commits
ilovepi wrote: Petr and I spoke offline. https://github.com/llvm/llvm-project/pull/95187, is still independently useful, since it matches our normal conventions about the build directory matching the install directory. I think we agree on it not being a fatal error, though if it can generate

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

2024-06-13 Thread Shilei Tian via cfe-commits
shiltian wrote: Now `__amdgcn_buffer_rsrc_t` is a 128-bit wide builtin opaque type. https://github.com/llvm/llvm-project/pull/94830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (PR #94346)

2024-06-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94346 ___ 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 Shilei Tian 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] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/95392 >From af17388ffd5096a0c50b62dbd8073f957c052bb1 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 12 Jun 2024 23:55:04 +0530 Subject: [PATCH] [APFloat] Add APFloat support for FP4 data type This patch ad

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

2024-06-13 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-06-13T09:52:11-07:00 New Revision: 8f57f6895724f858c9db924200524fad86cc4f11 URL: https://github.com/llvm/llvm-project/commit/8f57f6895724f858c9db924200524fad86cc4f11 DIFF: https://github.com/llvm/llvm-project/commit/8f57f6895724f858c9db924200524fad86cc4f11.diff

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-13 Thread Haopeng Liu via cfe-commits
@@ -0,0 +1,110 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s -check-prefix=UNINIT +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN +// RUN: %clang

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-13 Thread Haopeng Liu via cfe-commits
haopliu wrote: LGTM, thanks! https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Arthur Eubanks via cfe-commits
@@ -907,6 +945,76 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

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

2024-06-13 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w approved this pull request. 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][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 Farzon Lotfi via cfe-commits
farzonl wrote: > Usually when new ISD nodes are added they are expanded for all types, so that > every backend will get at least working code even if it is not optimal. The > targets can then come along and override the defaults for the types they are > interested in, to get better results. >

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

2024-06-13 Thread Shafik Yaghmour via cfe-commits
@@ -2791,6 +2791,12 @@ bool ASTContext::hasUniqueObjectRepresentations( return hasUniqueObjectRepresentations(getBaseElementType(Ty), CheckIfTriviallyCopyable); + if (Ty->isVoidType()) shafik wrote: It is not cle

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

2024-06-13 Thread David Green via cfe-commits
davemgreen wrote: I believe they were added so long ago that the default Expanding wasn't done at the time. @efriedma-quic do you have more of an idea than that? https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread Nico Weber via cfe-commits
nico wrote: Can you add something like "use /O2 /clang:-O2 to restore the previous behavior" to the commit message, on case someone prefers that? Otherwise LG. https://github.com/llvm/llvm-project/pull/95406 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread Nico Weber via cfe-commits
nico wrote: Oh, you have that in the release notes already, even better. https://github.com/llvm/llvm-project/pull/95406 ___ 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 Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95432 >From 3874b20e44c67e8ac0d2eb2665fb0ea9f09c6f5d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Thu, 13 Jun 2024 17:26:50 +0100 Subject: [PATCH 1/2] [Clang] Require base element type of __has_unique_object_re

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread Nico Weber via cfe-commits
https://github.com/nico approved this pull request. https://github.com/llvm/llvm-project/pull/95406 ___ 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
@@ -2791,6 +2791,12 @@ bool ASTContext::hasUniqueObjectRepresentations( return hasUniqueObjectRepresentations(getBaseElementType(Ty), CheckIfTriviallyCopyable); + if (Ty->isVoidType()) cor3ntin wrote: I'd prefer

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

2024-06-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/95470 Never opening `namespace std` avoids even the possibility of introducing new symbols as well as making the code a bit shorter by removing unnecessary boiler plate. >From f5fc162cd1a6fdef3dcdc3e4c73aedcf67b

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

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang-static-analyzer-1 Author: Nikolas Klauser (philnik777) Changes Never opening `namespace std` avoids even the possibility of introducing new symbols as well as making the code a b

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

2024-06-13 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed 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
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Fixes #95311 Previous behaviour was that `false` was silently returned, templated classes were not instantiated and incomplete classes did not issue an error. --- Full diff: https://github.com/llvm/llvm-p

[clang] 3dd73dc - [Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (#95337)

2024-06-13 Thread via cfe-commits
Author: Haowei Date: 2024-06-13T10:24:24-07:00 New Revision: 3dd73dc1996940645620fd191110b57c49183531 URL: https://github.com/llvm/llvm-project/commit/3dd73dc1996940645620fd191110b57c49183531 DIFF: https://github.com/llvm/llvm-project/commit/3dd73dc1996940645620fd191110b57c49183531.diff LOG: [

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

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 45964eb9b88c46045e4e84beb4e2135cdeed6855 f5fc162cd1a6fdef3dcdc3e4c73aedcf67b603df --

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -9182,6 +9182,9 @@ def warn_unused_constructor : Warning< def warn_unused_constructor_msg : Warning< "ignoring temporary created by a constructor declared with %0 attribute: %1">, InGroup; +def warn_discarded_class_member_access : Warning< + "left operand of dot in thi

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -387,9 +388,16 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { // Do not diagnose use of a comma operator in a SFINAE context because the // type of the left operand could be used for SFINAE, so technically it is // *used*. - if (DiagID != di

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -1140,26 +1131,68 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, BaseExpr = BuildCXXThisExpr(Loc, BaseExprType, /*IsImplicit=*/true); } + // C++17 [expr.ref]p2, per CWG2813: + // For the first option (dot), if the id-expression names a s

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -1140,26 +1131,68 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, BaseExpr = BuildCXXThisExpr(Loc, BaseExprType, /*IsImplicit=*/true); } + // C++17 [expr.ref]p2, per CWG2813: + // For the first option (dot), if the id-expression names a s

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -1140,26 +1131,68 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, BaseExpr = BuildCXXThisExpr(Loc, BaseExprType, /*IsImplicit=*/true); } + // C++17 [expr.ref]p2, per CWG2813: + // For the first option (dot), if the id-expression names a s

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -1174,6 +1207,9 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, valueKind = VK_PRValue; type = Context.BoundMemberTy; Sirraide wrote: Don’t we need a call to `MakeGLValue()` somewhere in here? https://github.com/llvm/ll

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-13 Thread via cfe-commits
@@ -9182,6 +9182,9 @@ def warn_unused_constructor : Warning< def warn_unused_constructor_msg : Warning< "ignoring temporary created by a constructor declared with %0 attribute: %1">, InGroup; +def warn_discarded_class_member_access : Warning< + "left operand of dot in thi

<    1   2   3   4   5   >