[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,20 @@ +.. title:: clang-tidy - readability-avoid-nested-conditional-operator + +readability-avoid-nested-conditional-operator += + +Finds nested conditional operator. + +Nested conditional operators lead code hard to under

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-13 Thread via cfe-commits
https://github.com/BinVerse created https://github.com/llvm/llvm-project/pull/78085 Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and Sel

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

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

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: BinVerse (BinVerse) Changes Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and Se

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: Thank you for the review! https://github.com/llvm/llvm-project/pull/77967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/77967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78088 Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext,` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`, Construc

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext,` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`, Construc

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/77206 >From 66e4026ff568fbd805ddd777596102381e4e0066 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 6 Jan 2024 18:04:57 + Subject: [PATCH 1/2] [clang-tidy] Add support for in-class initializers in readabil

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager &SM, +const LangOptions &LangOpts) { + const Token Prev

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -487,6 +487,10 @@ Changes in existing checks ` check to ignore false-positives in initializer list of record. +- Improved :doc:`readability-redundant-member-init + ` check to support PiotrZSL wrote: Done https://github.com/llvm/llvm-project/pull/7720

[clang] [lldb] [clang-tools-extra] [llvm] [compiler-rt] [libc] [libcxx] [mlir] [flang] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM with some nits. https://github.com/llvm/llvm-project/pull/77886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libc] [clang-tools-extra] [mlir] [clang] [compiler-rt] [lldb] [libcxx] [llvm] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/77886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [flang] [llvm] [lldb] [compiler-rt] [libc] [libcxx] [clang] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -1418,6 +1418,14 @@ bool X86TargetInfo::validateAsmConstraint( case 'O': Info.setRequiresImmediate(0, 127); return true; + case 'W': +switch (*++Name) { +default: + return false; +case 's': + Info.setAllowsRegister(); phoebew

[llvm] [clang] [lldb] [libcxx] [compiler-rt] [libc] [mlir] [flang] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -130,3 +130,7 @@ void pr40890(void) { __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeef)); #endif } + +void test_W(int i) { + asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}} phoebewang wrote:

[libc] [mlir] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [flang] [llvm] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -130,3 +130,7 @@ void pr40890(void) { __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeef)); #endif } + +void test_W(int i) { + asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}} phoebewang wrote:

[mlir] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [flang] [llvm] [lld] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

<    1   2   3   4