[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` erichkeane wrote: ^^ Line above but github wont let me: Don't use 'umbrella', its probably not a famil

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -216,51 +198,56 @@ We explain the options in the following sections. How to enable standard C++ modules ~~ -Currently, standard C++ modules are enabled automatically -if the language standard is ``-std=c++20`` or newer. +Standard C++ modules

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -216,51 +198,56 @@ We explain the options in the following sections. How to enable standard C++ modules ~~ -Currently, standard C++ modules are enabled automatically -if the language standard is ``-std=c++20`` or newer. +Standard C++ modules

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -1753,17 +1740,18 @@ Possible Questions How modules speed up compilation -A classic theory for the reason why modules speed up the compilation is: -if there are ``n`` headers and ``m`` source files and each header is included by each source

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -138,7 +120,7 @@ Let's see a "hello world" example that uses modules. return 0; } -Then we type: +From the command line, enter: erichkeane wrote: Then, on the command line, invoke clang like: https://github.com/llvm/llvm-project/pull/90237 _

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -289,20 +277,20 @@ we can't compile them by the original command lines. But we are still able to do $ ./Hello.out Hello World! -Module name requirement -~~~ +Module name requirements + -[module.unit]p1 says: +.. -.. code-

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -216,51 +198,56 @@ We explain the options in the following sections. How to enable standard C++ modules ~~ -Currently, standard C++ modules are enabled automatically -if the language standard is ``-std=c++20`` or newer. +Standard C++ modules

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -875,11 +872,11 @@ The pattern for ABI breaking style is similar with export extern-C++ style. } #endif -(And add `EXPORT` and conditional include to the headers as suggested in the export -extern-C++ style section) +(And add `EXPORT` and conditional include to the he

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -577,15 +574,16 @@ the generated BMI specified by ``-o`` will be full BMI and the BMI specified by -> ... -> consumer_n.cpp -We don't emit diagnostics if ``-fexperimental-modules-

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module implemen

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -1222,33 +1214,31 @@ One often reported example is: export module repro; export import :part; -Currently the compiler complains about the inconsistent definition of `fun()` in -2 module units. This is incorrect. Since both definitions of `fun()` has the same -spelling

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -998,25 +992,23 @@ headers to: ... #endif -If the modules imported by your library provides such headers too, remember to add them to -your ``your_library_imported.h`` too. +If the modules imported by the library provide such headers, remember to add +them to ``your_li

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -1753,17 +1740,18 @@ Possible Questions How modules speed up compilation -A classic theory for the reason why modules speed up the compilation is: -if there are ``n`` headers and ``m`` source files and each header is included by each source

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Erich Keane via cfe-commits
erichkeane wrote: Please also identify the changes you made vs the previous patch. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp ---> sr

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -577,15 +574,16 @@ the generated BMI specified by ``-o`` will be full BMI and the BMI specified by -> ... -> consumer_n.cpp -We don't emit diagnostics if ``-fexperimental-modules-

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -577,15 +574,16 @@ the generated BMI specified by ``-o`` will be full BMI and the BMI specified by -> ... -> consumer_n.cpp -We don't emit diagnostics if ``-fexperimental-modules-

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I placed all the new changes into a [single commit](https://github.com/llvm/llvm-project/pull/90152/commits/b8fda8106405eed0c234802fff8eecde53f2562e) https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Code changes LGTM, please add the tests, and I'll do another run at this. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/90237 >From a75aa14fcad6f346a3073ae88e91fa890e803422 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 26 Apr 2024 13:12:51 -0400 Subject: [PATCH 1/2] Revise the modules document for clarity The intention i

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Tests have already been added :) @erichkeane https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to `Sema.h` and DR tests look good to me. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-26 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: I'll merge this in a day or two if there are no objections. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-26 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Fix MS ABI detection of user-provided constructors. (PR #90151)

2024-04-26 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/90151 >From 9adeffc9ee780c84a525ce0535a84508105e05ae Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 25 Apr 2024 17:06:40 -0700 Subject: [PATCH 1/2] [clang codegen] Fix MS ABI detection of user-provided c

[clang] Implementation of '#pragma STDC FENV_ROUND' (PR #89617)

2024-04-26 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel requested changes to this pull request. I haven't fully tested the changes yet, so right now I'm looking at the test to figure out how much is supported. Nevertheless, I can already tell that this is not complete support. 7.6.2p4 does clearly state that floati

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-26 Thread Sam Clegg via cfe-commits
sbc100 wrote: This change seems to have caused a test in emscripten to starting failing with `argument unused during compilation: '-O2'`: https://github.com/emscripten-core/emscripten/pull/21841. Is that an intended side effect of this change? The fix on our end seems reasonable but posting

[clang] [clang codegen] Fix MS ABI detection of user-provided constructors. (PR #90151)

2024-04-26 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Added release note. https://github.com/llvm/llvm-project/pull/90151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/90248 >From 85e5e1660ad1e6fda8ecf8984aab0cba96130b4f Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Fri, 26 Apr 2024 18:30:48 + Subject: [PATCH] [WebAssembly] Add half-precision feature This currently only

[clang] [driver] Do not warn about unused plugin flags. (PR #88948)

2024-04-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/88948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [driver] Do not warn about unused plugin flags. (PR #88948)

2024-04-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/88948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [driver] Do not warn about unused plugin flags. (PR #88948)

2024-04-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang -### -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Werror %s 2>&1 | FileCheck %s MaskRay wrote: This can be moved to `Driver/plugin-driver-args.cpp` with `%clang -### -c -x assembler` https://github.com/llvm/l

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

2024-04-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @ldionne looks like a bug in std::string ``` --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1123,7 +1123,7 @@ public: inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() { __annotate_delete(); if (__is_long()) - __alloc_traits::deallocate(__alloc

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-V

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -98,9 +103,47 @@ std::optional tryParseProfile(StringRef Profile) { else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor)) return std::nullopt; - // dxil-unknown-shadermodel-hull + // Determine DXIL version number using the minor version number of Shader + // Mo

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-V

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread Thomas Lively via cfe-commits
https://github.com/tlively closed https://github.com/llvm/llvm-project/pull/90248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d9fd0dd - [WebAssembly] Add half-precision feature (#90248)

2024-04-26 Thread via cfe-commits
Author: Brendan Dahl Date: 2024-04-26T14:03:21-07:00 New Revision: d9fd0ddef38bb9d5cce7300ff820272183c09fcd URL: https://github.com/llvm/llvm-project/commit/d9fd0ddef38bb9d5cce7300ff820272183c09fcd DIFF: https://github.com/llvm/llvm-project/commit/d9fd0ddef38bb9d5cce7300ff820272183c09fcd.diff

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

2024-04-26 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/90273 In the AST for function templates, the return will be a DeclRefExpr, even if the return type differs from that of the returned variable. Protect against false-positives by constraining the canonical return type t

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Julian Schmidt (5chmidti) Changes In the AST for function templates, the return will be a DeclRefExpr, even if the return type differs from that of the returned variable. Protect against false-positives by constraining the canonical re

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

2024-04-26 Thread Julian Schmidt via cfe-commits
5chmidti wrote: @HerrCai0907 I was looking at false positives for templates regarding this check and ended up implementing the fix. https://github.com/llvm/llvm-project/pull/90273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Xiang Li via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-V

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Xiang Li via cfe-commits
https://github.com/python3kgae edited https://github.com/llvm/llvm-project/pull/89823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

2024-04-26 Thread Julian Schmidt via cfe-commits
5chmidti wrote: The false positives that are fixed by implementing this fix are in lines: 98, 101, 110, 113. The other tests are for completeness. https://github.com/llvm/llvm-project/pull/90273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Ben Langmuir via cfe-commits
@@ -249,9 +245,27 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { for (const auto &KH : HS.findResolvedModulesForHeader(*File)) if (const Module *M = KH.getModule()) -CollectIncludingMapsFromAncestors(M); +CollectModuleMapsFor

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-26 Thread Vadim D. via cfe-commits
vvd170501 wrote: @PiotrZSL, can you merge this, please? I've fixed merge conflicts caused by ef5906989ae2004100ff56dc5ab59be2be9d5c99 (changes in the string header for tests), now everything should be ok https://github.com/llvm/llvm-project/pull/88636 ___

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

2024-04-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Delete uses __get_long_cap() ``` _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_S

[clang] [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (PR #90153)

2024-04-26 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/90153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3d5e9ab - [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (#90153)

2024-04-26 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-04-26T14:28:27-07:00 New Revision: 3d5e9ab6d89bfe3454e2b6f80b4babaa69413a87 URL: https://github.com/llvm/llvm-project/commit/3d5e9ab6d89bfe3454e2b6f80b4babaa69413a87 DIFF: https://github.com/llvm/llvm-project/commit/3d5e9ab6d89bfe3454e2b6f80b4babaa69413a87.diff

[clang] [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (PR #90153)

2024-04-26 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/90153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][hlsl] Add tan intrinsic part 1 (PR #90276)

2024-04-26 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/90276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

2024-04-26 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Do we add `improvement` documentation for checks that landed in the same release cycle? https://github.com/llvm/llvm-project/pull/90273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [clang-tidy] fix false-negative for macros in `readability-math-missing-parentheses` (PR #90279)

2024-04-26 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/90279 When a binary operator is the last operand of a macro, the end location that is past the `BinaryOperator` will be inside the macro and therefore an invalid location to insert a `FixIt` into, which is why the chec

[clang-tools-extra] [clang-tidy] fix false-negative for macros in `readability-math-missing-parentheses` (PR #90279)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes When a binary operator is the last operand of a macro, the end location that is past the `BinaryOperator` will be inside the macro and therefore an invalid location to insert a `FixIt` into, whi

[clang-tools-extra] [clang-tidy] fix false-negative for macros in `readability-math-missing-parentheses` (PR #90279)

2024-04-26 Thread Julian Schmidt via cfe-commits
5chmidti wrote: CC @11happy (couldn't add you as a reviewer) https://github.com/llvm/llvm-project/pull/90279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-26 Thread via cfe-commits
dyung wrote: This change is also causing a failure on our internal Windows builder, and a public Windows bot: https://lab.llvm.org/buildbot/#/builders/119/builds/17634 ``` 88.872 [191/66/4550] Linking CXX executable bin\clang-repl.exe FAILED: bin/clang-repl.exe cmd.exe /C "cd . && "C:\Program F

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
@@ -249,9 +245,27 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { for (const auto &KH : HS.findResolvedModulesForHeader(*File)) if (const Module *M = KH.getModule()) -CollectIncludingMapsFromAncestors(M); +CollectModuleMapsFor

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Ben Langmuir via cfe-commits
@@ -249,9 +245,27 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { for (const auto &KH : HS.findResolvedModulesForHeader(*File)) if (const Module *M = KH.getModule()) -CollectIncludingMapsFromAncestors(M); +CollectModuleMapsFor

[clang] Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (PR #88245)

2024-04-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: For driver tests we prefer specifying a concrete target triple than making a test dependent on the default target triple (controlled by `REQUIES: coff-supported-target` in this case). A concrete target triple (e.g. x86_64-windows) loses coverage for aarch64-windows, but we gene

[clang] [Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format (PR #87149)

2024-04-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am curious what a `win32-elf` triple is. Does MSVC support generating ELF object files? https://github.com/llvm/llvm-project/pull/87149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
@@ -249,9 +245,27 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { for (const auto &KH : HS.findResolvedModulesForHeader(*File)) if (const Module *M = KH.getModule()) -CollectIncludingMapsFromAncestors(M); +CollectModuleMapsFor

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

2024-04-26 Thread Eli Friedman via cfe-commits
@@ -62,6 +62,13 @@ namespace llvm { LibFunc TheLibFunc, AttributeList AttributeList, FunctionType *Invalid, ArgsTy... Args) = delete; + // Handle -mregparm for the given function. + // FIXME: This should likely be implemented in + /

[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

2024-04-26 Thread Eli Friedman via cfe-commits
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } setDSOLocal(F); + markRegisterParameterAttributes(F); efriedma-quic wrote: Suggested text on the clang change: FIXME: We should u

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This change seems to have caused a test in emscripten to starting failing > with `argument unused during compilation: '-O2'`: > [emscripten-core/emscripten#21841](https://github.com/emscripten-core/emscripten/pull/21841). > > Is that an intended side effect of this change? The

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

2024-04-26 Thread Derek Schuff via cfe-commits
dschuff wrote: We are also seeing the Windows failure. Given that there appear to be 2 separate problems, this patch should probably be reverted rather than trying to fix-forward. https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailin

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-04-26 Thread Vitaly Buka via cfe-commits
@@ -35,6 +35,9 @@ // RUN: %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc \ // RUN: | grep -e "INTERFACE_\(WEAK_\)\?FUNCTION" \ // RUN: | grep -v "__sanitizer_weak_hook" \ +// R

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-04-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: It's LGTM, but it's going to be annoying to merge. I bet this patch has several reasons to be reverted, and will be reverted multiple times. It would be nice to try to split into smaller parts. https://github.com/llvm/llvm-project/pull/81677 __

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

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

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/90298 There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 >From 8dafc9af06eef1a4b3fba8b5cffeece62967a6fd Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Fri, 26 Apr 2024

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Volodymyr Sapsai (vsapsai) Changes There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 --- Full diff: https://github.com/llvm/llvm-project/pull/90298.diff 2 Files Affected: - (modified) c

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 --- Full diff: https://github.com/llvm/llvm-project/pull/90298.diff 2 Files Affected: - (modified) clang/lib

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-26 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > Overall I really like the direction of this. I'm curious if any of the > maintainers from Apple have thoughts since they're the primary users of > availability annotations. While I like the approach of aligning availability parameters closer to `llvm::Triple`, I am concer

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

2024-04-26 Thread Justin Stitt via cfe-commits
JustinStitt wrote: In an effort to appease the build bot, I am adding a `-W` flag to turn of `warn_wraps_attr_var_decl_type_not_integer` which yells at users for trying to add `__attribute__((wraps))` to things that don't really wrap in the traditional sense. https://github.com/llvm/llvm-proj

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-04-26 Thread Brandt Bucher via cfe-commits
https://github.com/brandtbucher updated https://github.com/llvm/llvm-project/pull/88333 >From f797b695ce38f46563f3724dcffee4005c65c659 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 10 Apr 2024 17:03:19 -0700 Subject: [PATCH 1/2] Prefer non-volatile registers for preserve_none Use non

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

2024-04-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/90299 https://lab.llvm.org/buildbot/#/builders/168/builds/20063 This reverts commit cf5a8b489464d09dfdd7a48ce7c8b41d3c9bf819. >From b4c0a3f4835a686a15a3ed90a4058f353f844f26 Mon Sep 17 00:00:00 2001 From: Vitaly Bu

<    1   2   3   4   5   >