[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66835 ___ 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 support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM, thanks for the fix and the great cleanup! https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/66947 b1e3cd1d79443603dc003441e07cdd8d30bb7f26 dropped the leading slash here, presumably unintentionally. (I don't understand Driver well enough to know how/where this is supposed to be tested, but it broke clangd

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Changes b1e3cd1d79443603dc003441e07cdd8d30bb7f26 dropped the leading slash here, presumably unintentionally. (I don't understand Driver well enough to know how/where this is supposed to be tested, but it broke clangd on any project that uses

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-20 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,77 @@ + +#include "clang/Frontend/CodeSnippetHighlighter.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Lex/Lexer.h" +#include "clang/Lex

[clang-tools-extra] 5d95d27 - [clang-tidy] Fix support for typedefs in readability-identifier-naming (#66835)

2023-09-20 Thread via cfe-commits
Author: Piotr Zegar Date: 2023-09-20T21:29:54+02:00 New Revision: 5d95d27e50c1f5ce4803039d942ff3c25401c77f URL: https://github.com/llvm/llvm-project/commit/5d95d27e50c1f5ce4803039d942ff3c25401c77f DIFF: https://github.com/llvm/llvm-project/commit/5d95d27e50c1f5ce4803039d942ff3c25401c77f.diff L

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Reid Kleckner via cfe-commits
rnk wrote: It is true that the MSVC mangler doesn't generally canonicalize types, but I think we can canonicalize in the `mangleTypeName` entry point, because it exists to create unique type names for TBAA and CFI. You can audit the callers, they all relate to either of those two things. Unre

[clang] [clang-format] Stop breaking unbreakable strings in JS (PR #66168)

2023-09-20 Thread via cfe-commits
eaeltsin wrote: Looks like we need the similar fix for verilog, see https://reviews.llvm.org/D154093#4648931 https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-09-20 Thread Richard Smith via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,77 @@ + +#include "clang/Frontend/CodeSnippetHighlighter.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Lex/Lexer.h" +#include "clang/Lex

[clang] Re-apply "[Parse] Split incremental-extensions" (PR #66446)

2023-09-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. https://github.com/llvm/llvm-project/pull/66446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid resolved https://github.com/llvm/llvm-project/pull/65969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/65969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
@@ -7095,6 +7096,21 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue &Val, QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); + +CharUnits ElemWidth = Info.Ctx.getTypeSizeInChars(VT->getElementType()); +unsign

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Generally this looks good to me, but doesn't seem to properly handle `__attribute__((ext_vector_type(N))) bool`. https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] 33dfd90 - Fix sphinx bot build

2023-09-20 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-09-20T22:27:29+02:00 New Revision: 33dfd90700a11fb39802d0b1ab500f3a8efd7e78 URL: https://github.com/llvm/llvm-project/commit/33dfd90700a11fb39802d0b1ab500f3a8efd7e78 DIFF: https://github.com/llvm/llvm-project/commit/33dfd90700a11fb39802d0b1ab500f3a8efd7e78.diff

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Shoaib Meenai via cfe-commits
smeenai wrote: Sorry about the breakage. The `sys::path::append` behavior here is surprising. I think it'd be better to change the computation of `SysRoot` in the function above (line 3102, which I can't comment because of GitHub, sigh) to default to `llvm::sys::path::get_separator()` if it's

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/66164 >From dcaa197c8b4e80fba83fc3905b0488a44fe89cc5 Mon Sep 17 00:00:00 2001 From: William Huang Date: Fri, 15 Sep 2023 23:08:46 + Subject: [PATCH] Rebase with main --- .../include/llvm/ProfileData/ProfileFuncRe

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/66164 >From dcaa197c8b4e80fba83fc3905b0488a44fe89cc5 Mon Sep 17 00:00:00 2001 From: William Huang Date: Fri, 15 Sep 2023 23:08:46 + Subject: [PATCH 1/2] Rebase with main --- .../include/llvm/ProfileData/ProfileFu

[clang] [clang-cl] Fix for __FUNCTION__ in c++. (PR #66120)

2023-09-20 Thread Reid Kleckner via cfe-commits
@@ -2218,6 +2218,9 @@ printTo(raw_ostream &OS, ArrayRef Args, const PrintingPolicy &Policy, } else { if (!FirstArg) OS << Comma; + //if (Argument.getKind() == TemplateArgument::Type) + // OS << "class "; + rnk wrote: I would move

[clang] [clang-format] Don't split "DPI"/"DPI-C" in imports (PR #66951)

2023-09-20 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/66951 The spec doesn't allow splitting these strings and we're seeing compile issues with splitting it. String splitting was enabled for Verilog in https://reviews.llvm.org/D154093. >From b52605303495001902354baab9

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-09-20 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D154093#4648986 , @aeubanks wrote: > In D154093#4648931 , @eaeltsin > wrote: > >> This might have another issue with Verilog - >> >> < import "AAA-BBB" foo bar baz >

[clang] [clang-format] Don't split "DPI"/"DPI-C" in Verilog imports (PR #66951)

2023-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Changes The spec doesn't allow splitting these strings and we're seeing compile issues with splitting it. String splitting was enabled for Verilog in https://reviews.llvm.org/D154093. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [clang-format] Don't split "DPI"/"DPI-C" in Verilog imports (PR #66951)

2023-09-20 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/66951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Sam McCall via cfe-commits
sam-mccall wrote: Thanks for the quick response! > The `sys::path::append` behavior here is surprising. I think it'd be better > to change the computation of `SysRoot` in the function above (line 3102, > which I can't comment because of GitHub, sigh) to default to > `llvm::sys::path::get_sepa

[clang-tools-extra] 5eaa531 - [clang-tidy][NFC] Update documentation for bugprone-undefined-memory-manipulation

2023-09-20 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-20T21:01:34Z New Revision: 5eaa5312e7943e23155da4f0fbf07b55a200fc60 URL: https://github.com/llvm/llvm-project/commit/5eaa5312e7943e23155da4f0fbf07b55a200fc60 DIFF: https://github.com/llvm/llvm-project/commit/5eaa5312e7943e23155da4f0fbf07b55a200fc60.diff LOG: [

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -537,6 +538,9 @@ class SampleContext { assert(!Name.empty() && "Name is empty"); } + SampleContext(ProfileFuncRef Name) david-xl wrote: Name ->Func https://github.com/llvm/llvm-project/pull/66164

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -476,12 +471,12 @@ enum ContextAttributeMask { // Represents a context frame with function name and line location struct SampleContextFrame { - StringRef FuncName; + ProfileFuncRef FuncName; david-xl wrote: Nit: FuncName--> Func https://github.com/llvm

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -1135,12 +1141,12 @@ class FunctionSamples { /// translate \p Name in current FunctionSamples into its original name /// by looking up in the function map GUIDToFuncNameMap. /// If the original name doesn't exist in the map, return empty StringRef. - StringRef getFunc

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -715,7 +717,7 @@ class SampleContext { private: /// Mangled name of the function. - StringRef Name; + ProfileFuncRef Name; david-xl wrote: Name --> Func https://github.com/llvm/llvm-project/pull/66164 ___ cf

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -537,6 +538,9 @@ class SampleContext { assert(!Name.empty() && "Name is empty"); } + SampleContext(ProfileFuncRef Name) david-xl wrote: Name ->Func https://github.com/llvm/llvm-project/pull/66164

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -0,0 +1,225 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- 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-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -1048,27 +1052,29 @@ class FunctionSamples { }; if (isDeclaration(SymbolMap.lookup(getFuncName( { // Add to the import list only when it's defined out of module. - S.insert(getGUID(getName())); + S.insert(getGUID()); } // Import hot Call

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -1048,27 +1052,29 @@ class FunctionSamples { }; if (isDeclaration(SymbolMap.lookup(getFuncName( { // Add to the import list only when it's defined out of module. - S.insert(getGUID(getName())); + S.insert(getGUID()); } // Import hot Call

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -643,14 +648,11 @@ class SampleContext { uint64_t getHashCode() const { if (hasContext()) return hash_value(getContextFrames()); - -// For non-context function name, use its MD5 as hash value, so that it is -// consistent with the profile map's key. -

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -0,0 +1,225 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- 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-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -574,7 +578,7 @@ class SampleContext { ContextStr = ContextStr.substr(1, ContextStr.size() - 2); StringRef ContextRemain = ContextStr; StringRef ChildContext; -StringRef CalleeName; +ProfileFuncRef CalleeName; david-xl wrote: CalleeName

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -0,0 +1,226 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- 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-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -1048,27 +1052,29 @@ class FunctionSamples { }; if (isDeclaration(SymbolMap.lookup(getFuncName( { // Add to the import list only when it's defined out of module. - S.insert(getGUID(getName())); + S.insert(getGUID()); } // Import hot Call

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -715,7 +717,7 @@ class SampleContext { private: /// Mangled name of the function. - StringRef Name; + ProfileFuncRef Name; david-xl wrote: Name --> Func https://github.com/llvm/llvm-project/pull/66164 ___ cf

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -1135,12 +1141,12 @@ class FunctionSamples { /// translate \p Name in current FunctionSamples into its original name /// by looking up in the function map GUIDToFuncNameMap. /// If the original name doesn't exist in the map, return empty StringRef. - StringRef getFunc

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -0,0 +1,225 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- 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-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -574,7 +578,7 @@ class SampleContext { ContextStr = ContextStr.substr(1, ContextStr.size() - 2); StringRef ContextRemain = ContextStr; StringRef ChildContext; -StringRef CalleeName; +ProfileFuncRef CalleeName; david-xl wrote: CalleeName

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -643,14 +648,11 @@ class SampleContext { uint64_t getHashCode() const { if (hasContext()) return hash_value(getContextFrames()); - -// For non-context function name, use its MD5 as hash value, so that it is -// consistent with the profile map's key. -

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread David Li via cfe-commits
@@ -0,0 +1,226 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- 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-Identifier: Apache-2

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Shoaib Meenai via cfe-commits
smeenai wrote: > Thanks for the quick response! > > > The `sys::path::append` behavior here is surprising. I think it'd be better > > to change the computation of `SysRoot` in the function above (line 3102, > > which I can't comment because of GitHub, sigh) to default to > > `llvm::sys::path:

[PATCH] D153059: [-Wunsafe-buffer-usage] Group parameter fix-its

2023-09-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Everything looks great now, let's commit! Again, thank you Ziqing for simplifying and splitting up the patch. It looks like we're able to keep code complexity from exploding. That makes me feel very

[libunwind] [runtimes] Fix link order of system librarires on Apple platforms (PR #66940)

2023-09-20 Thread via cfe-commits
@@ -659,24 +659,22 @@ function(cxx_link_system_libraries target) target_add_link_flags_if_supported(${target} PRIVATE "--unwindlib=none") endif() - if (LIBCXX_HAS_SYSTEM_LIB) -target_link_libraries(${target} PRIVATE System) - endif() - - if (LIBCXX_HAS_PTHREAD_LIB

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-20 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: compiler-rt/lib/tsan/rtl/CMakeLists.txt:223 +elseif(arch MATCHES "riscv64") + add_asm_sources(TSAN_ASM_SOURCES +tsan_rtl_riscv64.S hiraditya wrote: > I'm getting error with this line for some reason. U

[clang] ca22d6e - [Coverage] Fix -Wswitch after D138847

2023-09-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-09-20T14:20:58-07:00 New Revision: ca22d6e40508f6d24a9352835bda9c152e3eee1b URL: https://github.com/llvm/llvm-project/commit/ca22d6e40508f6d24a9352835bda9c152e3eee1b DIFF: https://github.com/llvm/llvm-project/commit/ca22d6e40508f6d24a9352835bda9c152e3eee1b.diff

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/66816 >From 725a8b45144d6aaab71d282110619f5f843d527f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 19 Sep 2023 21:50:39 +0200 Subject: [PATCH 1/3] -fsanitize=function: Add a MSVC test case --- clang/test

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Okay, makes sense, although we can only say for certain regarding in-tree users. I have gone ahead and done that, plus I have renamed `mangleTypeName` to `mangleCanonicalTypeName` so the name describes the behavior better, and since this is an API break, we break it loudly. ht

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread Takuya Shimizu via cfe-commits
https://github.com/hazohelet created https://github.com/llvm/llvm-project/pull/66954 Old iterator is invalidated upon SmallVector elements additions. Stores index instead of iterator to avoid this. Fixes https://github.com/llvm/llvm-project/issues/66938 >From 74b06739e7309798e53110307bfe0abb9

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Old iterator is invalidated upon SmallVector elements additions. Stores index instead of iterator to avoid this. Fixes https://github.com/llvm/llvm-project/issues/66938 --- Full diff: https://github.com/llvm/llvm-project/pull/66954.diff

[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

2023-09-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks amazing now. Thanks for splitting it up and fighting hard against complexity! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2586 #endif it = FixablesForAllV

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

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

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 1 suggestion, else LGTM. https://github.com/llvm/llvm-project/pull/66954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread Erich Keane via cfe-commits
@@ -228,9 +228,12 @@ calculateConstraintSatisfaction(Sema &S, const Expr *ConstraintExpr, // The following code removes the irrelevant diagnostic information. // FIXME: We should probably delay the addition of diagnostic information // until we know the entire expr

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread Takuya Shimizu via cfe-commits
https://github.com/hazohelet updated https://github.com/llvm/llvm-project/pull/66954 >From 74b06739e7309798e53110307bfe0abb9bd5b649 Mon Sep 17 00:00:00 2001 From: Takuya Shimizu Date: Thu, 21 Sep 2023 06:27:55 +0900 Subject: [PATCH 1/2] [clang][Sema] Fix crash introduced in b2cd9db Old iterato

[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)

2023-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/66954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ee65a7 - Revert "[Coverage] Fix -Wswitch after D138847"

2023-09-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-09-20T14:45:19-07:00 New Revision: 9ee65a7618d29caccbadc52d60f9bfc2e6468907 URL: https://github.com/llvm/llvm-project/commit/9ee65a7618d29caccbadc52d60f9bfc2e6468907 DIFF: https://github.com/llvm/llvm-project/commit/9ee65a7618d29caccbadc52d60f9bfc2e6468907.diff

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-09-20 Thread via cfe-commits
@@ -19,20 +19,38 @@ namespace llvm { // Visitor class that finds all indirect call. struct PGOIndirectCallVisitor : public InstVisitor { std::vector IndirectCalls; + std::vector VTableAddrs; PGOIndirectCallVisitor() = default; void visitCallBase(CallBase &Call) {

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 updated https://github.com/llvm/llvm-project/pull/66715 >From 707106f0a42f9682af5354aa46f28155471fd5f2 Mon Sep 17 00:00:00 2001 From: Balint Cristian Date: Thu, 21 Sep 2023 00:56:09 +0300 Subject: [PATCH] [clang] Enable descriptions for --print-supported-extensions

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/66816 >From 725a8b45144d6aaab71d282110619f5f843d527f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 19 Sep 2023 21:50:39 +0200 Subject: [PATCH 1/3] -fsanitize=function: Add a MSVC test case --- clang/test

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 resolved https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D158561: [-Wunsafe-buffer-usage] Add AST info to the unclaimed DRE debug notes for analysis

2023-09-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I like where this is going, and I appreciate the test! Tests for tiny debug utilities aren't critical for the compiler, but they're a great way to demonstrate and document how to invoke the script and how it's supposed to work. Comment at: clang/lib/Analy

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
cbalint13 wrote: @DavidSpickett , Addressed all requests. * Here is the console output: [console-output.txt.gz](https://github.com/llvm/llvm-project/files/12677908/console-output.txt.gz) ``` $ zcat ~/console-output.txt.gz | grep 'print' $ ./bin/clang --target=arm-unknown-linux-gnu --print-suppo

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 resolved https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-09-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. I'm still working on a repro, but after this patch we're seeing "truncated profile data" errors in chromium Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138846/new/ https://reviews.llvm.org/D138846 __

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
@@ -198,13 +199,20 @@ static int PrintSupportedExtensions(std::string TargetStr) { std::unique_ptr TheTargetMachine( TheTarget->createTargetMachine(TargetStr, "", "", Options, std::nullopt)); const llvm::Triple &MachineTriple = TheTargetMachine->getTargetTriple(); +

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 unresolved https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 edited https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-20 Thread Owen Pan via cfe-commits
@@ -22537,10 +22537,12 @@ TEST_F(FormatTest, FormatsLambdas) { " }\n" "}", Style); - verifyFormat("std::sort(v.begin(), v.end(),\n" - " [](const auto &foo, const auto &bar) {\n" - " return foo.

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 updated https://github.com/llvm/llvm-project/pull/66715 >From 4d7d748be3f1d7db94094c00c9ae0d07ecaf6b7e Mon Sep 17 00:00:00 2001 From: Balint Cristian Date: Thu, 21 Sep 2023 01:46:13 +0300 Subject: [PATCH] [clang] Enable descriptions for --print-supported-extensions

[clang-tools-extra] c03d184 - [clang] NFCI: Use `FileEntryRef` in `PreamblePatch`

2023-09-20 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-09-20T16:10:18-07:00 New Revision: c03d18441c94a69c0b32a7882a66c8cc95c6e928 URL: https://github.com/llvm/llvm-project/commit/c03d18441c94a69c0b32a7882a66c8cc95c6e928 DIFF: https://github.com/llvm/llvm-project/commit/c03d18441c94a69c0b32a7882a66c8cc95c6e928.diff L

[clang] [Sema] Fix fixit cast printing inside macros (PR #66853)

2023-09-20 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai updated https://github.com/llvm/llvm-project/pull/66853 >From 701b1d99515e40eec8dcbaba3a0b2dc436bf9652 Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Tue, 19 Sep 2023 19:46:56 -0700 Subject: [PATCH] [Sema] Fix fixit cast printing inside macros `Lexer::getLocForEn

[clang] [Clang][Coroutines] Improve GRO handling to better fit scopes and cleanups (PR #66706)

2023-09-20 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes updated https://github.com/llvm/llvm-project/pull/66706 >From 6312dd56ed3a2f47e7291ae32ca044622a317259 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Wed, 20 Sep 2023 15:00:06 -0700 Subject: [PATCH] [Clang][LLVM][Coroutines] Prevent __coro_gro from out

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-09-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/11] [libc++] Implement ranges::contains Differential Revision

[clang-tools-extra] [libc++] Implement ranges::contains (PR #65148)

2023-09-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/11] [libc++] Implement ranges::contains Differential Revision

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-09-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/11] [libc++] Implement ranges::contains Differential Revision

[clang] [Clang][Coroutines] Improve GRO handling to better fit scopes and cleanups (PR #66706)

2023-09-20 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/66706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][LLVM][Coroutines] Prevent __coro_gro from outliving __promise (PR #66706)

2023-09-20 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/66706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][LLVM][Coroutines] Prevent __coro_gro from outliving __promise (PR #66706)

2023-09-20 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks for the clarifications > By forcing the GRO not living on the coroutine frames, it shouldn't be a > problem if the lifetime of `__coro_gro` outlives the `__promise`. The only > limit is that the initialization of `__coro_gro` should be in the lifetime of > `__promi

[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

2023-09-20 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 resolved https://github.com/llvm/llvm-project/pull/66715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Reid Kleckner via cfe-commits
rnk wrote: Seems reasonable to me, but I want @efriedma-quic to approve as well, if this is a reasonable implementation of your direction. https://github.com/llvm/llvm-project/pull/66816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)

2023-09-20 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I think this is a better direction overall, although it has the downside that it might be more difficult to backport this to 17. https://github.com/llvm/llvm-project/pull/66816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-format] Don't split "DPI"/"DPI-C" in Verilog imports (PR #66951)

2023-09-20 Thread via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/66951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't split "DPI"/"DPI-C" in Verilog imports (PR #66951)

2023-09-20 Thread via cfe-commits
https://github.com/alexfh approved this pull request. Looks good once the comment is addressed. https://github.com/llvm/llvm-project/pull/66951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang-format] Don't split "DPI"/"DPI-C" in Verilog imports (PR #66951)

2023-09-20 Thread via cfe-commits
@@ -2270,7 +2270,15 @@ ContinuationIndenter::createBreakableToken(const FormatToken &Current, if (State.Stack.back().IsInsideObjCArrayLiteral) return nullptr; +// The "DPI" (or "DPI-C") in SystemVerilog direct programming interface +// imports cannot be spli

[clang] [clang][modules] Remove preloaded SLocEntries from PCM files (PR #66962)

2023-09-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/66962 This commit removes the list of SLocEntry offsets to preload eagerly from PCM files. Commit introducing this functionality (258ae54a) doesn't clarify why this would be more performant than the lazy approach

[clang] [clang][modules] Remove preloaded SLocEntries from PCM files (PR #66962)

2023-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Changes This commit removes the list of SLocEntry offsets to preload eagerly from PCM files. Commit introducing this functionality (258ae54a) doesn't clarify why this would be more performant than the lazy approach used regularly. Current

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-09-20 Thread Alan Phipps via Phabricator via cfe-commits
alanphipps added a comment. In D138846#4649110 , @akhuang wrote: > I'm still working on a repro, but after this patch we're seeing "truncated > profile data" errors in chromium (crbug.com/1485303) Thank you for the heads-up! If there's an issue, I'm eag

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-09-20 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 557153. Prabhuk added a comment. Update X86 backend to use Microsoft ABI for UEFI target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.org/D152206 Files: clang/lib/Basic/Tar

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
https://github.com/huangjd edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
https://github.com/huangjd edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
huangjd wrote: Added performance measurement. This patch does significantly reduce profile load time, which is its motivation https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-09-20 Thread William Junda Huang via cfe-commits
huangjd wrote: Added performance measurement. This patch does significantly reduce profile load time, which is its motivation https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-09-20 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 557154. Prabhuk added a comment. Minor cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.org/D152206 Files: clang/lib/Basic/Targets.cpp clang/lib/Basic/Targets/OSTarge

<    1   2   3   4   5   >