[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

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

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic-errors AaronBallman wrote: ```suggestion // RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-unused -pedantic-errors ``` because the point of the test is the error about internal linkage, not ab

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -554,6 +554,9 @@ Attribute Changes in Clang Improvements to Clang's diagnostics --- +- Clang now emits an error instead of a warning for `undefined_internal` AaronBallman wrote: ```suggestion - Clang now emits an error inste

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic-errors + +static void *f(void); // expected-error {{function 'f' has internal linkage but is not defined}} + +int main(void) +{ +int j = _Generic(&f, void *(*)(void): 10, default: 20); +// expected-no

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic-errors AaronBallman wrote: ```suggestion // RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-pointer-arith -pedantic-errors ``` https://github.com/llvm/llvm-project/pull/98016 _

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c23 -pedantic-errors + +// expected-no-diagnostics + +static int f(void); + +int main(void) +{ +typeof(f()) x; AaronBallman wrote: ```suggestion typeof(&f) x; ``` https://github.com/llvm/

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic-errors + +// expected-no-diagnostics + +static int f(void); + +int main(void) +{ +int x = sizeof f(); AaronBallman wrote: ```suggestion int x = sizeof(f); ``` https://github.com/llvm

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic-errors AaronBallman wrote: ```suggestion // RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-pointer-arith -pedantic-errors ``` https://github.com/llvm/llvm-project/pull/98016 _

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Oh that makes sense so > > ``` > static void f(); > void *k = _Generic(&f, void (*)(void) : 0, default : f); > ``` > > should be ok since it is not in the result expression? Correct, that's a good test case to add! Similarly, it would be good to add one like: ``` void *k

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-11 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This is generally looking great, and I think it's ready to go as soon as you > can finish the tests. (You said you weren't able to update all the tests — > did you have questions about the remaining tests?) > > I did have a thought, though. Are we confident that the in-me

[clang] Add __builtin_fma16. (PR #97424)

2024-07-11 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @AaronBallman ping? https://github.com/llvm/llvm-project/pull/97424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add __builtin_fma16. (PR #97424)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -203,6 +203,12 @@ def FmaF16F128 : Builtin, F16F128MathTemplate { let Prototype = "T(T, T, T)"; } +def Fmaf16 : Builtin, F16F128MathTemplate { AaronBallman wrote: Why is this needed when we have: https://github.com/llvm/llvm-project/blob/a3913a19185e351

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/98267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: Ok, that's done with the FIXME comment for now. Maybe it is only because this is my first time contributing and I am not too familiar with the codebase but I couldn't see a trivial fix for the issue. For now I think it's best to land these changes first. I would just add an iss

[clang] 81cdf94 - [clang][OpenMP] Fix region nesting check for `scan` directive (#98386)

2024-07-11 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-07-11T08:07:58-05:00 New Revision: 81cdf9472c347adeee91f39f661e06da77902c93 URL: https://github.com/llvm/llvm-project/commit/81cdf9472c347adeee91f39f661e06da77902c93 DIFF: https://github.com/llvm/llvm-project/commit/81cdf9472c347adeee91f39f661e06da77902c93

[clang] [clang][OpenMP] Fix region nesting check for `scan` directive (PR #98386)

2024-07-11 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/98386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Remove compound directives from `checkNestingOfRegions` (PR #98387)

2024-07-11 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/98387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Add -att suffix https://github.com/llvm/llvm-project/pull/96860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3a14ffb - [AArch64] Implement GCS ACLE intrinsics (#96903)

2024-07-11 Thread via cfe-commits
Author: John Brawn Date: 2024-07-11T14:09:36+01:00 New Revision: 3a14ffbae39b0308fe57a278b5d29703a4d98211 URL: https://github.com/llvm/llvm-project/commit/3a14ffbae39b0308fe57a278b5d29703a4d98211 DIFF: https://github.com/llvm/llvm-project/commit/3a14ffbae39b0308fe57a278b5d29703a4d98211.diff LO

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-11 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm closed https://github.com/llvm/llvm-project/pull/96903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread Shengchen Kan via cfe-commits
@@ -335,6 +337,31 @@ void X86InstrMappingEmitter::emitND2NonNDTable( printTable(Table, "X86ND2NonNDTable", "GET_X86_ND2NONND_TABLE", OS); } +void X86InstrMappingEmitter::emitSSE2AVXTable( +ArrayRef Insts, raw_ostream &OS) { + std::vector Table; + for (const CodeGenInst

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Nikita Popov via cfe-commits
@@ -133,7 +133,7 @@ class AArch64TargetCodeGenInfo : public TargetCodeGenInfo { } } auto *Fn = cast(GV); -BPI.setFnAttributes(*Fn); +CGM.getTargetCodeGenInfo().setFnAttributes(BPI, *Fn); nikic wrote: ```suggestion setFnAttributes(BPI,

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Nikita Popov via cfe-commits
@@ -413,6 +414,12 @@ class TargetCodeGenInfo { return nullptr; } + void setFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, nikic wrote: ```suggestion void setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, ``` Or

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread Shengchen Kan via cfe-commits
@@ -5201,6 +5201,10 @@ def mrelax_all : Flag<["-"], "mrelax-all">, Group, Visibility<[ClangOption, CC1Option, CC1AsOption]>, HelpText<"(integrated-as) Relax all machine instructions">, MarshallingInfoFlag>; +def msse2avx : Flag<["-"], "msse2avx">, Group, + Visibility<[C

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/98478 This can cause breakage with user code that does "#define A ...". From dccf2ca991822c467225541a631cc41a8761a122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 11 Jul 2024 16:15:59 +

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Martin Storsjö (mstorsjo) Changes This can cause breakage with user code that does "#define A ...". --- Full diff: https://github.com/llvm/llvm-project/pull/98478.diff 1 Files Affected: - (modified) clang/lib/Headers/avx512fp16intrin.h

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Hmm, what's your usage? #define A before #include ? https://github.com/llvm/llvm-project/pull/98478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Hmm, what's your usage? > > #define A > > before > > #include > > ? Yes, exactly https://github.com/llvm/llvm-project/pull/98478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. ldionne wrote: Ack. I think it's reasonable not to try to fix everything in one go since it seems really involved. However, my thinking is more that the Darwin driver is the odd one out

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Louis Dionne via cfe-commits
ldionne wrote: The patch LGTM, but I'd like actual Clang folks to stamp this. https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-11 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/97342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread via cfe-commits
https://github.com/JaydeepChauhan14 updated https://github.com/llvm/llvm-project/pull/96860 >From b4a534ad6f811cf0868b7fd1ee641fae8502e171 Mon Sep 17 00:00:00 2001 From: Chauhan Jaydeep Ashwinbhai Date: Thu, 27 Jun 2024 15:17:50 +0800 Subject: [PATCH 01/12] [X86][MC] Added support for -msse2avx

[clang] [Clang][C++26] Implement "Ordering of constraints involving fold expressions (PR #98160)

2024-07-11 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/98160 >From ba2b6ab4fd0aa5a79a849d71f2857256f8fc1c73 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 16:08:44 +0200 Subject: [PATCH 1/8] [Clang][C++26] Implement "Ordering of constraints involving

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The only other unreserved name I could find in the file is: https://github.com/llvm/llvm-project/blob/d9c26b9d560f4362503b8f0ec97a52a0a36a57ce/clang/lib/Headers/avx512fp16intrin.h#L99 (uses `h`) so we might as well fix this at the same time. We should

[clang] 8b7263b - [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (#98013)

2024-07-11 Thread via cfe-commits
Author: Haojian Wu Date: 2024-07-11T16:03:38+02:00 New Revision: 8b7263ba3051125ab2bb9df514bdaadaca1b637d URL: https://github.com/llvm/llvm-project/commit/8b7263ba3051125ab2bb9df514bdaadaca1b637d DIFF: https://github.com/llvm/llvm-project/commit/8b7263ba3051125ab2bb9df514bdaadaca1b637d.diff LO

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/98013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll do you think this can be merged now? After CI passes. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread via cfe-commits
@@ -335,6 +337,31 @@ void X86InstrMappingEmitter::emitND2NonNDTable( printTable(Table, "X86ND2NonNDTable", "GET_X86_ND2NONND_TABLE", OS); } +void X86InstrMappingEmitter::emitSSE2AVXTable( +ArrayRef Insts, raw_ostream &OS) { + std::vector Table; + for (const CodeGenInst

[clang] [llvm] Build release binaries for multiple targets (PR #98431)

2024-07-11 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/98431 >From 5417784c025128eaffc09981ee72c7cc2ba487b3 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 22 May 2024 15:30:53 -0700 Subject: [PATCH 1/2] Build release binaries for multiple targets This adds releas

[clang] [Clang][C++26] Implement "Ordering of constraints involving fold expressions (PR #98160)

2024-07-11 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/98160 >From ba2b6ab4fd0aa5a79a849d71f2857256f8fc1c73 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 16:08:44 +0200 Subject: [PATCH 1/9] [Clang][C++26] Implement "Ordering of constraints involving

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @DeinAlptraum This is also worth a release note, I think. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Fix false in unnecessary-value-param inside templates (PR #98488)

2024-07-11 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin created https://github.com/llvm/llvm-project/pull/98488 Summary: If callExpr is type dependent, there is no way to analyze individual arguments until template specialization. Before this diff only calls with dependent callees were skipped so unnecessary-value-para

[clang] [clang-tools-extra] [clang-tidy] Fix false in unnecessary-value-param inside templates (PR #98488)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Dmitry Polukhin (dmpolukhin) Changes Summary: If callExpr is type dependent, there is no way to analyze individual arguments until template specialization. Before this diff only calls with dependent callees were skipped so unnece

[clang] [clang-tools-extra] [clang-tidy] Fix false in unnecessary-value-param inside templates (PR #98488)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Dmitry Polukhin (dmpolukhin) Changes Summary: If callExpr is type dependent, there is no way to analyze individual arguments until template specialization. Before this

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Hmm what do you think should be mentioned in a release note @Endilll ? Since this is just refactoring, if I did everything correctly, users of the bindings should not notice any difference (except for different error messages). So just mention refactoring of enums in the bin

[clang] [clang-tools-extra] [clang-tidy] Fix false in unnecessary-value-param inside templates (PR #98488)

2024-07-11 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 ce92b2f594809c39c37bf3ef3d881f2b33bd6730 a05c4ca2c2e61653e7bd8d3a2f5faa6b86daa615 --e

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM We might want a release note for that. Also, do we not have tests for -ftime-trace? https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -3165,7 +3165,17 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { // C99 5.1.1.2p2: If the file is non-empty and didn't end in a newline, issue // a pedwarn. - if (CurPtr != BufferStart && (CurPtr[-1] != '\n' && CurPtr[-1] != '\r')) { + if (CurPtr !=

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Alex Crichton via cfe-commits
alexcrichton wrote: Ah yeah unfortunately I think it still comes back to how to do all this in the test harness. If there are examples of this elsewhere I'd be happy to investigate and copy. I'm also not sure if shell scripts would work for Windows... @sbc100 if you're ok with this without a

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Alex Crichton via cfe-commits
alexcrichton wrote: > would it be relevant to open an issue in the binaryen repo for the support of > Wasm components? Oh sorry forgot to respond to this as well. I'm not personally part of the binaryen repo but I suspect they would not object to having an issue to track this. https://github

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The refactoring itself is worth mentioning in potentially breaking changes, because this covers a significant surface of our Python API. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-11 Thread Shengchen Kan via cfe-commits
@@ -335,6 +337,31 @@ void X86InstrMappingEmitter::emitND2NonNDTable( printTable(Table, "X86ND2NonNDTable", "GET_X86_ND2NONND_TABLE", OS); } +void X86InstrMappingEmitter::emitSSE2AVXTable( +ArrayRef Insts, raw_ostream &OS) { + std::vector Table; + for (const CodeGenInst

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,21 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/Support/Mutex.h" namespace clang { namespace doc { +static llvm::

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -53,30 +80,34 @@ template bool MapASTVisitor::mapDecl(const T *D) { } bool MapASTVisitor::VisitNamespaceDecl(const NamespaceDecl *D) { - return mapDecl(D); + return mapDecl(D, true); ilovepi wrote: for constant params you should have a comment, per our

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Are we worried about the increase in the output file sizes? https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread Ilya Biryukov via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(), /*Qualified=*/true); +OS << ", file:" << Source

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread Ilya Biryukov via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); ilya-biryukov wrote: Should we do this for other things? Most of the nodes are likely to have a source location they can be attributed to.

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-11 Thread Ilya Biryukov via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(), /*Qualified=*/true); +OS << ", file:" << Source

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/96809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Seems like there's a few clang-format errors, so lets address those, too. https://github.com/llvm/llvm-project/pull/96809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -12,16 +12,31 @@ #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Error.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/Support/Mutex.h" namespace clang { namespace doc { +static llvm::

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -53,30 +80,34 @@ template bool MapASTVisitor::mapDecl(const T *D) { } bool MapASTVisitor::VisitNamespaceDecl(const NamespaceDecl *D) { - return mapDecl(D); + return mapDecl(D, true); } -bool MapASTVisitor::VisitRecordDecl(const RecordDecl *D) { return mapDecl(D); } +

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 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] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (thomaswucher) Changes This is a rework of patch [D10833](https://reviews.llvm.org/D10833) previously posted on LLVM Phabricator by arthurp in 2015. It allows to retrieve the type of binary operator via libclangs python bindings. I

[clang] [clang-tools-extra] [clang-tidy] Fix false in unnecessary-value-param inside templates (PR #98488)

2024-07-11 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/98488 >From a05c4ca2c2e61653e7bd8d3a2f5faa6b86daa615 Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 11 Jul 2024 07:01:49 -0700 Subject: [PATCH 1/2] [clang-tidy] Fix false in unnecessary-value-param inside

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Ok nevermind, disregard the above comment I was wrong about the mechanism of > the bug. the source of this bug comes from the way clang-doc handles C code, > particularly anonymous typedef in C. When clang-doc encounters an anonymous > typedef in C it incorrectly serializes it

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Jon Roelofs via cfe-commits
@@ -161,14 +161,10 @@ struct CpuInfo { StringRef Name; // Name, as written for -mcpu. const ArchInfo &Arch; AArch64::ExtensionBitset - DefaultExtensions; // Default extensions for this CPU. These will be - // ORd with the architecture defaults

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/98478 From dccf2ca991822c467225541a631cc41a8761a122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 11 Jul 2024 16:15:59 +0300 Subject: [PATCH 1/2] =?UTF-8?q?[clang]=20[Headers]=C2=A0Don't=

[clang] Propagate the result object location for CXXDefaultInitExpr. (PR #98490)

2024-07-11 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/98490 These are not "original initializers"; the single node underneath represents the initializing node. >From 8f51730d1f4bbca740a01b89780b6ed9bee3c3d7 Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Thu, 11 Jul 2

[clang] c66e1d6 - [llvm][AArch64] apple-m4 is armv9.2-a (#98267)

2024-07-11 Thread via cfe-commits
Author: Jon Roelofs Date: 2024-07-11T07:46:51-07:00 New Revision: c66e1d6f3429cb596ceb58daa5184bc3bbb28750 URL: https://github.com/llvm/llvm-project/commit/c66e1d6f3429cb596ceb58daa5184bc3bbb28750 DIFF: https://github.com/llvm/llvm-project/commit/c66e1d6f3429cb596ceb58daa5184bc3bbb28750.diff L

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/98267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-07-11 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From 569ecf2818c47b355fc1130fccb611e0d40f21a2 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribut

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Shengchen Kan via cfe-commits
Martin =?utf-8?q?Storsj=C3=B6?= Message-ID: In-Reply-To: https://github.com/KanRobert commented: LGTM https://github.com/llvm/llvm-project/pull/98478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] [Headers] Don't use unreserved name in avx512fp16intrin.h (PR #98478)

2024-07-11 Thread Aaron Ballman via cfe-commits
Martin =?utf-8?q?Storsj=C3=B6?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/98478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang] Catch missing format attributes (PR #70024)

2024-07-11 Thread Budimir Aranđelović via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; + +__attribute__((__for

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Piotr Zegar via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Sam Clegg via cfe-commits
sbc100 wrote: I think the problem with creating a dummy shell script is that it would need to work on windows too.. I guess it would be better to have test that run on some platforms that no test at all. In any case, I'm OK with having this land as-is for now, since this is feature that is al

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/98373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for picking this back up! Hopefully @Endilll can comment on the python bits, but the changes generally LGTM aside from some very minor nits. One thing that should be added is a release note (in `clang/docs/ReleaseNotes.rst` so users know abo

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

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

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -2181,6 +2193,60 @@ def from_cursor_result(res, fn, args): res._tu = args[0]._tu return res +class BinaryOperator(BaseEnumeration): +""" +Describes the BinaryOperator of a declaration +""" + +# The unique kind objects, index by id. +_kind

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -8955,6 +8960,36 @@ unsigned clang_Cursor_isExternalSymbol(CXCursor C, CXString *language, return 0; } +enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode(CXCursor C) { + if (C.kind != CXCursor_BinaryOperator && + C.kind != CXCursor_CompoundAssignOperator) { +

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -8955,6 +8960,36 @@ unsigned clang_Cursor_isExternalSymbol(CXCursor C, CXString *language, return 0; } +enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode(CXCursor C) { + if (C.kind != CXCursor_BinaryOperator && + C.kind != CXCursor_CompoundAssignOperator) { +

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-07-11 Thread Aaron Ballman via cfe-commits
@@ -8955,6 +8960,36 @@ unsigned clang_Cursor_isExternalSymbol(CXCursor C, CXString *language, return 0; } +enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode(CXCursor C) { + if (C.kind != CXCursor_BinaryOperator && + C.kind != CXCursor_CompoundAssignOperator) { +

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang] [clang][OpenMP] Remove compound directives from `checkNestingOfRegions` (PR #98387)

2024-07-11 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/98387 >From bc7e6962de9e1e44773eee89d0f552342b40 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 10 Jul 2024 14:38:57 -0500 Subject: [PATCH 1/3] [clang][OpenMP] Fix region nesting check for `scan` d

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98424)

2024-07-11 Thread Paul Kirth via cfe-commits
@@ -30,20 +30,35 @@ void ImplementationInNamespaceCheck::check( const auto *MatchedDecl = Result.Nodes.getNodeAs("child_of_translation_unit"); const auto *NS = dyn_cast(MatchedDecl); + + // LLVM libc declarations should be inside of a non-anonymous namespace. if (

[clang] [Clang] Correctly recognize unexpanded packs in lambda template params (PR #98496)

2024-07-11 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/98496 Fixes #48937 >From 27c49b8c204202bf8928e1b2c6fe4c33c012c049 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 11 Jul 2024 17:12:35 +0200 Subject: [PATCH] [Clang] Correctly recognize unexpanded packs in l

[clang] [Clang] Correctly recognize unexpanded packs in lambda template params (PR #98496)

2024-07-11 Thread via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/98496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly recognize unexpanded packs in lambda template params (PR #98496)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Fixes #48937 --- Full diff: https://github.com/llvm/llvm-project/pull/98496.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3-1) - (modified) clang/lib/Sema/SemaLambda.cpp (+1) - (modified

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/95608 >From 35bfcfbc69ee812c59350440b7b15c5e23ad1307 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 14 Jun 2024 22:12:09 +0100 Subject: [PATCH 1/5] [libclang/python] Refactor enum usage Use Python's bui

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-11 Thread Michael Buch via cfe-commits
Michael137 wrote: > Some of the libc++ tests seem to be crashing on the x86_64 bot (can repro > locally, on aarch64 too). Looks like they're segfaulting trying to access the > member of an empty class. E.g., in > > ``` > Process 1370440 stopped > * thread #1, name = 't.tmp.exe', stop reason =

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I added a release note to the `Clang Python Bindings Potentially Breaking Changes` section https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang] Correctly recognize unexpanded packs in lambda template params (PR #98496)

2024-07-11 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 c0261351136e4a826be697e5ebb5fa638abe7485 27c49b8c204202bf8928e1b2c6fe4c33c012c049 --e

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Quentin Michaud via cfe-commits
mh4ck-Thales wrote: Seems like bash is present on the GitHub Windows runners. I shouldn't be too hard to create a simple bash script that work both on Windows and Linux. It would add a new dependency for the test suite on Windows however (if bash is not already a dependency for Windows) https

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98451 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200 Subject: [PATCH 1/2] [NFC][Clang] Move setfunctions of BranchProtectionInf

<    1   2   3   4   >