[clang] [llvm] [compiler-rt] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/70611 >From 7c41be75c1ef661e757bfaca8d693b3937df649e Mon Sep 17 00:00:00 2001 From: Wenju He Date: Mon, 30 Oct 2023 08:36:52 +0800 Subject: [PATCH 1/3] [InferAddressSpaces] Fix constant replace to avoid modifying oth

[clang] [llvm] [compiler-rt] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
https://github.com/wenju-he ready_for_review https://github.com/llvm/llvm-project/pull/70611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/70567 >From 77b9cba0aaa1157cc323f2f3ef7b1cef536ef147 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Fri, 27 Oct 2023 16:37:40 -0700 Subject: [PATCH 1/6] [Clang] Coroutines: warn against unused parameters in C+

[clang] [llvm] [compiler-rt] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Wenju He (wenju-he) Changes A constant value is unique in llvm context. InferAddressSpaces was replacing its users in other functions as well. This leads to unexpected behavior in our downstream use case after the pass. InferAddr

[clang] [llvm] [compiler-rt] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
@@ -0,0 +1,40 @@ +; RUN: opt -assume-default-is-flat-addrspace -print-module-scope -print-after-all -S -disable-output -passes=infer-address-spaces <%s 2>&1 | FileCheck %s + +; CHECK: IR Dump After InferAddressSpacesPass on f2 + +; Check that after running infer-address-spaces o

[clang] [llvm] [compiler-rt] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
@@ -0,0 +1,40 @@ +; RUN: opt -assume-default-is-flat-addrspace -print-module-scope -print-after-all -S -disable-output -passes=infer-address-spaces <%s 2>&1 | FileCheck %s + +; CHECK: IR Dump After InferAddressSpacesPass on f2 + +; Check that after running infer-address-spaces o

[compiler-rt] [llvm] [clang] [clang-tools-extra] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Wenju He via cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type { } }; +template <> struct GraphTraits { wenju-he wrote: > In any case, this should not be in a public IR header. I've reverted the change in this file. https://github.com/llvm/llvm-project/pull/70611 _

[clang] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Thanks for the very quick response. But I think it might be worthy to spend more time to find a light weight solution than RecursiveASTVisitors. https://github.com/llvm/llvm-project/pull/70567 ___ cfe-commits m

[clang] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-11-01 Thread Yuxuan Chen via cfe-commits
@@ -3165,7 +3165,16 @@ class Sema final { /// Diagnose any unused parameters in the given sequence of /// ParmVarDecl pointers. - void DiagnoseUnusedParameters(ArrayRef Parameters); + /// + /// Normally, we check if the parameter decls have the Referenced bit set. + //

[clang] [Clang] Warn against unused parameters in C++ coroutines with `-Wunused-parameters` (PR #70567)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/70567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [clang-tools-extra] Changes to support running tests for Windows arm64 asan (PR #66973)

2023-11-01 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM, but please address @omjavaid comments. https://github.com/llvm/llvm-project/pull/66973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-11-01 Thread James Henderson via cfe-commits
https://github.com/jh7370 approved this pull request. I'd like @MaskRay to give this a once-over before merging this, but otherwise LGTM. https://github.com/llvm/llvm-project/pull/65815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] Do not clear FP pragma stack when instantiating functions (PR #70646)

2023-11-01 Thread John McCall via cfe-commits
rjmccall wrote: It's certainly possible to see push/pop pragmas in late-parsed code, but Sema should immediately emit an error and ignore them because, like I said, they're only allowed at file context, and AFAIK late-parsed code is never at file context. If there's some sneaky way to late-pa

[clang] [llvm] [RISCV] Add processor definition for XiangShan-NanHu (PR #70294)

2023-11-01 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/70294 >From 1222b8bda348af58f4921a45d8cddca726875bb9 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 26 Oct 2023 13:47:39 +0800 Subject: [PATCH 1/2] [RISCV] Add processor definition for XiangShan-NanHu Co-auth

[clang] 760658c - [Driver] Silence stdlib warning when linking C on *BSD / Solaris / Haiku (#70434)

2023-11-01 Thread via cfe-commits
Author: Brad Smith Date: 2023-11-01T04:28:55-04:00 New Revision: 760658c118f491985ec00f62f5a261293db67b95 URL: https://github.com/llvm/llvm-project/commit/760658c118f491985ec00f62f5a261293db67b95 DIFF: https://github.com/llvm/llvm-project/commit/760658c118f491985ec00f62f5a261293db67b95.diff LO

[clang] [Driver] Silence stdlib warning when linking C on *BSD / Solaris / Haiku (PR #70434)

2023-11-01 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/70434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b120fe8 - [clang][NFC] Refactor `ArgPassingKind`

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T11:49:59+03:00 New Revision: b120fe8d3288c4dca1b5427ca34839ce8833f71c URL: https://github.com/llvm/llvm-project/commit/b120fe8d3288c4dca1b5427ca34839ce8833f71c DIFF: https://github.com/llvm/llvm-project/commit/b120fe8d3288c4dca1b5427ca34839ce8833f71c.

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-01 Thread Ben Shi via cfe-commits
benshi001 wrote: @balazske Do you have any further concern? https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [compiler-rt] [clang] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,32 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; RUN: opt -assume-default-is-flat-addrspace -S -passes=infer-address-spaces < %s 2>&1 | FileCheck %s + +@g = addrspace(1) global i32 0, align 4 + +define ptr @f2()

[llvm] [clang-tools-extra] [clang] [compiler-rt] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-01 Thread Matt Arsenault via cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type { } }; +template <> struct GraphTraits { arsenm wrote: What's the issue with putting this here? Seems nicer than inlining yet another DFS in another place https://github.com/llvm/llvm-project/pull/7061

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-01 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 updated https://github.com/llvm/llvm-project/pull/70792 >From afda56104e079c177d7941ff1394636cb48e7347 Mon Sep 17 00:00:00 2001 From: Ella Ma Date: Tue, 31 Oct 2023 18:41:14 +0800 Subject: [PATCH] [analyzer] Fix uninitialized base class with initializer list when c

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread via cfe-commits
https://github.com/zmodem approved this pull request. Looks reasonable to me. Probably best to have someone with more cmake experience double check that part. https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lis

[llvm] [clang] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-11-01 Thread via cfe-commits
zmodem wrote: Just to double check: the commit message says "emit warning", but it should error by default, right? https://github.com/llvm/llvm-project/pull/69513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Martin Storsjö via cfe-commits
@@ -53,3 +53,26 @@ add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN binary-to-decimal.cpp decimal-to-binary.cpp ) + +if (DEFINED MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) mstorsjo wrote: Instead of redefining `CMAKE_MSVC_RUNTIME_LIBRARY

[clang] 50dec54 - [clang][NFC] Refactor `OMPDeclareReductionDecl::InitKind`

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T12:40:13+03:00 New Revision: 50dec541f328a251c2830421f354e4439e635def URL: https://github.com/llvm/llvm-project/commit/50dec541f328a251c2830421f354e4439e635def DIFF: https://github.com/llvm/llvm-project/commit/50dec541f328a251c2830421f354e4439e635def.

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-01 Thread Nikita Popov via cfe-commits
@@ -5587,11 +5587,17 @@ Instruction *InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) { return new ICmpInst(ICmp.getPredicate(), Builder.CreateOr(X, Y), Constant::getNullValue(X->getType())); + // Treat "zext nneg" as "sext" +

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,185 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --tool ./bin/opt --version 3 +; See PRXXX for more details +; RUN-./bin/opt: opt < %s -S -passes=ipsccp | FileCheck %s nikic wrote: This is an ipsccp test in t

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 %s -O2 -triple=x86_64-apple-darwin -emit-llvm -o - | FileCheck %s nikic wrote: We don't test end-to-end codegen with clang. If you want to test this, you should take the unoptimized clang IR and create a test in the llvm/te

[clang] b6b31e7 - [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class

2023-11-01 Thread via cfe-commits
Author: Ella Ma Date: 2023-11-01T17:50:01+08:00 New Revision: b6b31e791b5ada286bace4c48243910985b0ac10 URL: https://github.com/llvm/llvm-project/commit/b6b31e791b5ada286bace4c48243910985b0ac10 DIFF: https://github.com/llvm/llvm-project/commit/b6b31e791b5ada286bace4c48243910985b0ac10.diff LOG:

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-01 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 closed https://github.com/llvm/llvm-project/pull/70792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 39dfaf0 - [clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (#68774)

2023-11-01 Thread via cfe-commits
Author: Exile Date: 2023-11-01T18:29:37+08:00 New Revision: 39dfaf0d0d48ac53fca5a8123d2074dcc55ce6fd URL: https://github.com/llvm/llvm-project/commit/39dfaf0d0d48ac53fca5a8123d2074dcc55ce6fd DIFF: https://github.com/llvm/llvm-project/commit/39dfaf0d0d48ac53fca5a8123d2074dcc55ce6fd.diff LOG: [c

[clang] [clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (PR #68774)

2023-11-01 Thread via cfe-commits
https://github.com/mzyKi closed https://github.com/llvm/llvm-project/pull/68774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aaba376 - [clang][NFC] Refactor `ObjCMethodDecl::ImplementationControl`

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T13:40:11+03:00 New Revision: aaba3761db84032541712899964714f3184e8b3d URL: https://github.com/llvm/llvm-project/commit/aaba3761db84032541712899964714f3184e8b3d DIFF: https://github.com/llvm/llvm-project/commit/aaba3761db84032541712899964714f3184e8b3d.

[clang] ba31ed4 - Disable memtag sanitization for global fnptrs going into .ctors (#70186)

2023-11-01 Thread via cfe-commits
Author: Mitch Phillips Date: 2023-11-01T11:43:28+01:00 New Revision: ba31ed472577aea1f4b5d6669bb1e717aaf1fb4f URL: https://github.com/llvm/llvm-project/commit/ba31ed472577aea1f4b5d6669bb1e717aaf1fb4f DIFF: https://github.com/llvm/llvm-project/commit/ba31ed472577aea1f4b5d6669bb1e717aaf1fb4f.diff

[clang] [llvm] Disable memtag sanitization for global fnptrs going into .ctors (PR #70186)

2023-11-01 Thread Mitch Phillips via cfe-commits
https://github.com/hctim closed https://github.com/llvm/llvm-project/pull/70186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D151188: [LLD][COFF] Add LLVM toolchain library paths by default.

2023-11-01 Thread Jason via Phabricator via cfe-commits
JasonWoodArm added a comment. Is it possible to override this behaviour ? We have an issue where we have our own FortranRuntimelib built with MT linkage and in the past I could just specify a path and -lFortranRuntime and all was well. Having just moved our machines to llvm17 this no longer wor

[clang] [lldb] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-11-01 Thread Michael Buch via cfe-commits
Michael137 wrote: Hmmm it seems like for `constexpr static` data members we don't get a symbol in the MachO the same way we do for out-of-line `const static`s that have a location: ``` struct Foo { static const int val1; static constexpr int val2 = 5; };

[clang] 5084891 - [CGExprConstant] Avoid use of ConstantExpr::getIntegerCast() (NFC)

2023-11-01 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2023-11-01T12:02:19+01:00 New Revision: 50848916e5e4f07231c7366e6d0014de6f7bc362 URL: https://github.com/llvm/llvm-project/commit/50848916e5e4f07231c7366e6d0014de6f7bc362 DIFF: https://github.com/llvm/llvm-project/commit/50848916e5e4f07231c7366e6d0014de6f7bc362.diff

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -53,3 +53,26 @@ add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN binary-to-decimal.cpp decimal-to-binary.cpp ) + +if (DEFINED MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) DavidTruby wrote: Yeah I tried this but inside add_flang_library

[lldb] [clang] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-11-01 Thread Michael Buch via cfe-commits
Michael137 wrote: > One question I have here: where will the DW_TAG_variable get emitted for > these `constexpr`? For actual static member variables we emit a single > DW_TAG_variable in the file that declares the global variable, but for > `constexpr` we won't be able to do this will we? Will

[clang] [clang] Do not clear FP pragma stack when instantiating functions (PR #70646)

2023-11-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > And contrariwise, if there's some sneaky way to put push/pop pragmas in > non-file contexts, that also seems like a serious problem, because the way we > process them is not designed to understand local scopes, which means we're > just doing random stuff instead of implem

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -767,7 +762,7 @@ class Preprocessor { /// \#included, and macros currently being expanded from, not counting /// CurLexer/CurTokenLexer. struct IncludeStackInfo { -enum CurLexerKind CurLexerKind; +LexerCallback CurLexerCallback; Aaron

[clang] [Clang] Add __datasizeof (PR #67805)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with the new codegen test, thank you! https://github.com/llvm/llvm-project/pull/67805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang][analyzer] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/70927 The passed in parameter 'State' is always identical to 'C.getState()'. >From 48dc5f677a5d4eb5e2bc012665f69cc038a20407 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Wed, 1 Nov 2023 17:32:10 +0800 Subject: [PATCH

[clang] [clang][analyzer] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/70927 >From 1cb32d9bb1b48af8282799d9879b91ae45bf035e Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Wed, 1 Nov 2023 17:32:10 +0800 Subject: [PATCH] [clang][analyzer][NFC] Simplify method 'ensureStreamNonNull' of Strea

[clang] [clang][analyzer] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes The passed in parameter 'State' is always identical to 'C.getState()'. --- Full diff: https://github.com/llvm/llvm-project/pull/70927.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/Stre

[clang] [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/70927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-11-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This appears to have broken some bots: https://lab.llvm.org/buildbot/#/builders/119/builds/15633 https://lab.llvm.org/buildbot/#/builders/60/builds/14449 Can you investigate and get those bots back to green? https://github.com/llvm/llvm-project/pull/69095 ___

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-11-01 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/70381 >From 8ee0ca67fcd45ba462701ba2b4c58d412d77d2bd Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 26 Oct 2023 22:31:43 +0200 Subject: [PATCH 1/4] [clang] Change representation of CurLexerKind

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-11-01 Thread via cfe-commits
MaggieYingYi wrote: Hi @AaronBallman and @nikic, are you happy for me to recommit the change? Thanks https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2023-11-01 Thread Mitch Phillips via cfe-commits
hctim wrote: > > It's my understanding your problem is that you are asan-trapping on the > > redzones when you copy data to/from the device. Is it possible instead to > > just make those copy-from and copy-to functions in the runtime > > `__attribute__((no_sanitize("address")))` and copy the p

[clang] 47d9fbc - [LinkerWrapper] Add 'Freestanding' config to the LTO pass

2023-11-01 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-11-01T07:47:25-05:00 New Revision: 47d9fbc04b91fb03b6da294e82c2fb4bca6b6343 URL: https://github.com/llvm/llvm-project/commit/47d9fbc04b91fb03b6da294e82c2fb4bca6b6343 DIFF: https://github.com/llvm/llvm-project/commit/47d9fbc04b91fb03b6da294e82c2fb4bca6b6343.diff

[clang-tools-extra] [clang] [llvm] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: Should we move on and submit this patch? @jayfoad do you have concerns about live-through register set computation or others? I believe fixing trackers should go to another PR. https://github.com/llvm/llvm-project/pull/70031 ___ cfe-c

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-01 Thread Björn Schäpers via cfe-commits
@@ -185,6 +191,8 @@ def main(): diff_string = "".join(diff) if len(diff_string) > 0: sys.stdout.write(diff_string) +if args.non_zero_exit_code: +sys.exit(1) HazardyKnusperkeks wrote: B

[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2023-11-01 Thread Mitch Phillips via cfe-commits
hctim wrote: Will wait for a rebase on some changes requested in #68865, but it'd also be really important to write tests for a couple more scenarios: 1. Building with `-fsanitize=address -S -emit-llvm` results in GVs with `sanitized_padded_global` (and results in GVs without `sanitized_padde

[clang] [llvm] [WIP][AMDGPU] Enable hostcall printf for OpenCL (PR #70932)

2023-11-01 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH created https://github.com/llvm/llvm-project/pull/70932 Attempt to enable OpenCL hostcall printf (SWDEV-204804). I would like to have some inputs regarding few key points listed here, 1. We continue to use "-mprintf-kind" option to decide the lowering scheme. It n

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

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

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: FWIW, when the description for the PR says it can't be merged for some reason, it usually goes on the bottom of my review queue until those issues are addressed. It's difficult to accept known-broken code. :-( https://github.com/llvm/llvm-project/pull

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -167,17 +169,13 @@ template class IntegralAP final { } static bool increment(IntegralAP A, IntegralAP *R) { -// FIXME: Implement. -assert(false); -*R = IntegralAP(A.V - 1); -return false; +IntegralAP One(1, A.bitWidth()); +return add(A, One, A.b

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -167,17 +169,13 @@ template class IntegralAP final { } static bool increment(IntegralAP A, IntegralAP *R) { -// FIXME: Implement. -assert(false); -*R = IntegralAP(A.V - 1); -return false; +IntegralAP One(1, A.bitWidth()); AaronBallm

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-11-01 Thread Björn Schäpers via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control. parseVe

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Brad King via cfe-commits
https://github.com/bradking requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Brad King via cfe-commits
https://github.com/bradking edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Brad King via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Brad King via cfe-commits
@@ -53,3 +53,26 @@ add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN binary-to-decimal.cpp decimal-to-binary.cpp ) + +if (DEFINED MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) bradking wrote: `add_flang_library` eventually ends up in `llvm/c

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread Brad King via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)

2023-11-01 Thread Henrik G. Olsson via cfe-commits
@@ -429,3 +429,19 @@ namespace qualified_friend_no_match { friend void Y::f(double); // expected-error {{friend declaration of 'f' does not match any declaration in 'qualified_friend_no_match::Y'}} }; } + +namespace gh21483 { +template +struct B { + struct mixin { +

[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)

2023-11-01 Thread Congcong Cai via cfe-commits
@@ -429,3 +429,19 @@ namespace qualified_friend_no_match { friend void Y::f(double); // expected-error {{friend declaration of 'f' does not match any declaration in 'qualified_friend_no_match::Y'}} }; } + +namespace gh21483 { +template +struct B { + struct mixin { +

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70662)

2023-11-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/70662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

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

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -5339,16 +5339,22 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, TypeSpecType == DeclSpec::TST_interface || TypeSpecType == DeclSpec::TST_union || TypeSpecType == DeclSpec::TST_enum) { - for (const ParsedAttr &AL : DS.ge

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Aside from some nits, I think this looks reasonable to me. I'll leave the final sign-off to @erichkeane but if he doesn't approve in the next few days (WG21 meetings are upcoming so he may be busy), I'll come back to approve. Thank you for all the hel

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -264,6 +264,11 @@ Attribute Changes in Clang supports but that are never the result of default argument promotion, such as ``float``. (`#59824: `_) +- Clang now warns you that the ``_Alignas`` attribute on declaration s

[clang] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-11-01 Thread Henrik G. Olsson via cfe-commits
@@ -4,7 +4,7 @@ // RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,reorder -Wno-c99-designator -Werror=reorder-init-list -Wno-initializer-overrides // RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,override -Wno-c99-designator -Wno-reorder-init-list -Werror=initiali

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -451,3 +451,5 @@ namespace P2361 { // expected-warning {{use of the 'deprecated' attribute is a C++14 extension}} [[nodiscard("\123")]] int b(); // expected-error{{invalid escape sequence '\123' in an unevaluated string literal}} } + +align

[clang] [clang-tools-extra] [llvm] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. > Should we move on and submit this patch? Yes! > @jayfoad do you have concerns about live-through register set computation or > others? I personally have no interest in the live-through part. You could remove it from this patch, but I d

[clang] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-11-01 Thread Henrik G. Olsson via cfe-commits
@@ -2537,19 +2555,13 @@ class FieldInitializerValidatorCCC final : public CorrectionCandidateCallback { /// actually be initialized. hnrklssn wrote: The comment above looks like it needs to be updated with `@param`s for `FinishSubobjectInit`, `TopLevelObject`

[clang] 700d93b - Add two time-trace scope variables.

2023-11-01 Thread Ying Yi via cfe-commits
Author: Ying Yi Date: 2023-11-01T13:37:52Z New Revision: 700d93b0584c9d6401ec646fc3e343e90f326fa2 URL: https://github.com/llvm/llvm-project/commit/700d93b0584c9d6401ec646fc3e343e90f326fa2 DIFF: https://github.com/llvm/llvm-project/commit/700d93b0584c9d6401ec646fc3e343e90f326fa2.diff LOG: Add t

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-11-01 Thread via cfe-commits
MaggieYingYi wrote: Thanks @AaronBallman, the patch is recommitted. https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-11-01 Thread via cfe-commits
https://github.com/MaggieYingYi closed https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6576120 - [clang][NFC] Refactor `LinkageSpecDecl::LanguageIDs`

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T16:44:34+03:00 New Revision: 65761200ce4e1f366e8418652efdafd2f744291b URL: https://github.com/llvm/llvm-project/commit/65761200ce4e1f366e8418652efdafd2f744291b DIFF: https://github.com/llvm/llvm-project/commit/65761200ce4e1f366e8418652efdafd2f744291b.

[clang] 128b3b6 - [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (#70548)

2023-11-01 Thread via cfe-commits
Author: 刘雨培 Date: 2023-11-01T06:45:48-07:00 New Revision: 128b3b61fe6768c724975fd1df2be0abec848cf6 URL: https://github.com/llvm/llvm-project/commit/128b3b61fe6768c724975fd1df2be0abec848cf6 DIFF: https://github.com/llvm/llvm-project/commit/128b3b61fe6768c724975fd1df2be0abec848cf6.diff LOG: [Cla

[lld] [clang] [lldb] [llvm] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [lldb] [llvm] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/70548 >From 11ceaed39b3f0c60c5a44c3b3a2b5856e7ee9a8d Mon Sep 17 00:00:00 2001 From: letrec Date: Sat, 28 Oct 2023 18:05:36 +0800 Subject: [PATCH 1/7] Defer the instantiation of explicit-specifier after constraint c

[clang] [llvm] [WIP][AMDGPU] Enable hostcall printf for OpenCL (PR #70932)

2023-11-01 Thread Matt Arsenault via cfe-commits
arsenm wrote: For point 1, I would prefer to decouple the printf implementation choice from the language. I would expect consistent defaults regardless of the language. This also contradicts point 2? I thought the clang emitted path used hostcall, and the backend path did not. As for expandin

[clang-tools-extra] 008af1c - [clang][NFC] Fix leftovers from `LinkageSpecDecl::LanguageIDs` refactoring

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T17:00:55+03:00 New Revision: 008af1c9f4cd0188a69bf42b821749154a8142c8 URL: https://github.com/llvm/llvm-project/commit/008af1c9f4cd0188a69bf42b821749154a8142c8 DIFF: https://github.com/llvm/llvm-project/commit/008af1c9f4cd0188a69bf42b821749154a8142c8.

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -192,6 +192,13 @@ class AttributeCommonInfo { bool isC23Attribute() const { return SyntaxUsed == AS_C23; } + bool isAlignas() const { +// In the current state of code, IsAlignas is only configured to return erichkeane wrote: This comment is immedia

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The comments Aaron made should be fixed, plus 1 more from me, else LGTM. https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] bc44e6e - [clang] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-01 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-01T09:06:15-05:00 New Revision: bc44e6e7c64ae7abd885fc31a62e37f649e307be URL: https://github.com/llvm/llvm-project/commit/bc44e6e7c64ae7abd885fc31a62e37f649e307be DIFF: https://github.com/llvm/llvm-project/commit/bc44e6e7c64ae7abd885fc31a62e37f649e307be.diff

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -277,23 +277,28 @@ class DefaultIntArgument : IntArgument { int Default = default; } -// This argument is more complex, it includes the enumerator type name, -// a list of strings to accept, and a list of enumerators to map them to. +// This argument is more complex, it

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Just 1 more comment (the name of `External` everywhere), else LGTM. https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)

2023-11-01 Thread Henrik G. Olsson via cfe-commits
@@ -429,3 +429,19 @@ namespace qualified_friend_no_match { friend void Y::f(double); // expected-error {{friend declaration of 'f' does not match any declaration in 'qualified_friend_no_match::Y'}} }; } + +namespace gh21483 { +template +struct B { + struct mixin { +

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Jerin Philip via cfe-commits
@@ -192,6 +192,13 @@ class AttributeCommonInfo { bool isC23Attribute() const { return SyntaxUsed == AS_C23; } + bool isAlignas() const { +// In the current state of code, IsAlignas is only configured to return jerinphilip wrote: This refers to the var

[llvm] [clang] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-11-01 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Just to double check: the commit message says "emit warning", but it should > error by default, right? Yes, -failure-mode=any is default, which throws an error if there is any. https://github.com/llvm/llvm-project/pull/69513 ___ cfe

[clang] [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. You are right. I'm not sure it improves the code too much, and I wonder if you have further ideas refactoring the checker; if so we could probably bundle up similar changes into this one. https://github.com/llvm/llvm-project/pull/70927 __

  1   2   3   4   5   >