[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:545-547 + // TODO(perf): For int and bool types, we can probably just skip this + // sinc

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM but please wait for @hubert.reinterpretcast to confirm the new tests cover what he was looking for. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Sema/Sema.h:6038 SourceLocation LocStart, LocEnd; bool isBrackets; // true if [expr], false if .ident +bool isQualifier; aaron.ballman wrote: > I think we should combine `isBrackets` a

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:59 +- Improved ``__builtin_offsetof`` support, allowing qualified name in member designator. This fixes [Issue 64154](https://github.com/llvm/llvm-project/issues/64154). ---

[PATCH] D157454: [NFC][Clang] Fix static analyzer concern about null value dereference

2023-08-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:222-223 Selector Sel = MethodWithObjects->getSelector(); - QualType ResultType = E->getType(); - const ObjCObjectPointerType *InterfacePointerType -= ResultType->getAsObjCInterfacePointerType();

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-08-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Thanks for the sample reports. I'm fine if we want to make it a non-alpha (released) checker. An orthogonal question is, whether we want to have it under the code package. I'm not sure there are official guidance for elevating a checker to code, but here are my assumpti

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-08-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Additionally, it might make sense to first "release" the checker, and after another llvm release, turn this into a Core checker. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152436/new/ https://reviews.llvm.org/D152436

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. Can someone please check for MacOS? Yesterday when this support was committed, the CHECK statements in tests loop_bind_codegen.cpp and loop_bind_enclosed.cpp had failed on Mac and I received a comment as follows: When relanding, please remember to put a link to the rev

[PATCH] D157029: [llvm] Construct option's prefixed name at compile-time

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LG! LLVMOption has users in llvm/ clang/ lldb/ lld/ clang-tools-extra/ flang/. You'll need to check that all the affected users are migrated... Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D157054: [clang] NFC: Use compile-time option spelling when generating command line

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157054/new/ https://reviews.llvm.org/D157054 __

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Yichi Lee via Phabricator via cfe-commits
yichi170 marked an inline comment as done. yichi170 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:59 +- Improved ``__builtin_offsetof`` support, allowing qualified name in member designator. This fixes [Issue 64154](https://github.com/llvm

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/offsetof.cpp:106 +int x3[__builtin_offsetof(struct X2, X2::static_a) == 0 ? 1 : -1]; // expected-error{{no member named 'static_a'}} +int x4[__builtin_offsetof(struct X2, X2::X2) == 0 ? 1 : -1]; // expected-err

[PATCH] D153114: [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-08-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D153114#4571703 , @ChuanqiXu wrote: > For example, may it be a reasonable expectation that we can have named > modules support in clangd in clang18? Clang18 will be released in the first > week of March 2024. So that's

[PATCH] D157297: [clang] Fixes compile error like error: expected unqualified-id for ::_tzcnt_u32(mask);

2023-08-09 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Would we be better off creating proper function definitions - we already have similar duplicates for `_bextr_u64` (Intel) vs `__bextr_u64` (AMD) names that do this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157297/new/

[PATCH] D157518: Avoid running optimization passes in frontend test

2023-08-09 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB created this revision. MatzeB added reviewers: wenlei, Mordante, aeubanks, hoy. Herald added subscribers: modimo, mcrosier. Herald added a project: All. MatzeB requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Only run "lower-expect" b

[PATCH] D157324: [clang] Move the Clang CI jobs off of the libc++ builders

2023-08-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision. Mordante added a comment. Nice to see the Clang CI new builder! Thanks for working on this, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157324/new/ https://reviews.llvm.org/D157324 _

[PATCH] D157518: Avoid running optimization passes in frontend test

2023-08-09 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB updated this revision to Diff 548655. MatzeB added a comment. Decided to just use "utils/update_cc_test_checks.py" so we can inspect the generate llvm.expect calls directly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157518/new/ https://

[clang] 501f92d - [llvm] Construct option's prefixed name at compile-time

2023-08-09 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-08-09T09:52:34-07:00 New Revision: 501f92d343828c0066d3286c3ae6606021b8b271 URL: https://github.com/llvm/llvm-project/commit/501f92d343828c0066d3286c3ae6606021b8b271 DIFF: https://github.com/llvm/llvm-project/commit/501f92d343828c0066d3286c3ae6606021b8b271.diff L

[PATCH] D157029: [llvm] Construct option's prefixed name at compile-time

2023-08-09 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG501f92d34382: [llvm] Construct option's prefixed name at compile-time (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157029/new/

[PATCH] D157518: Avoid running optimization passes in frontend test

2023-08-09 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks accepted this revision. aeubanks added a comment. This revision is now accepted and ready to land. seems fine if nobody else objects Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157518/new/ https://reviews.llvm.org/D157518 __

[PATCH] D157518: Avoid running optimization passes in frontend test

2023-08-09 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB updated this revision to Diff 548657. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157518/new/ https://reviews.llvm.org/D157518 Files: clang/test/CodeGenCXX/attr-likelihood-if-branch-weights.cpp Index: clang/test/CodeGenCXX/attr-likelihoo

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144457/new/ https://reviews.llvm.org/D144457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: ravikandhadai. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Herald added a subscriber: MaskRay. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D157520 Files:

[PATCH] D157054: [clang] NFC: Use compile-time option spelling when generating command line

2023-08-09 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGacf57858c1ac: [clang] NFC: Use compile-time option spelling when generating command line (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[clang] acf5785 - [clang] NFC: Use compile-time option spelling when generating command line

2023-08-09 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-08-09T09:55:07-07:00 New Revision: acf57858c1acb4ff776a1d734b86e1c05303132a URL: https://github.com/llvm/llvm-project/commit/acf57858c1acb4ff776a1d734b86e1c05303132a DIFF: https://github.com/llvm/llvm-project/commit/acf57858c1acb4ff776a1d734b86e1c05303132a.diff L

[PATCH] D156948: [clang][modules] Add -Wsystem-headers-in-module=

2023-08-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked an inline comment as done. benlangmuir added inline comments. Comment at: clang/include/clang/Basic/DiagnosticOptions.h:128 + /// whether -Wsystem-headers is enabled on a per-module basis. + std::vector SystemHeaderWarningsModules; + iana wro

[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. https://openradar.appspot.com/7198997 says `Date Originated:04-Sep-2009 06:00 PM`. Is the very old linker bug still relevant? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157520/new/ https://reviews.llvm.org/D157520

[PATCH] D157445: [CodeGen][UBSan] getUBSanFunctionTypeHash does not handle the attributed function case correctly, leading to an assertion failure. This patch desugars the QualType if it is of Attribu

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The title is very long. Can you shorten it and put additional description to the body of the commit message (aka summary)? What does the test `ubsan-function-attributed.c` do? It lacks comments to help reader understand the issue. Repository: rG LLVM Github Monorepo

[PATCH] D157454: [NFC][Clang] Fix static analyzer concern about null value dereference

2023-08-09 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:222-223 Selector Sel = MethodWithObjects->getSelector(); - QualType ResultType = E->getType(); - const ObjCObjectPointerType *InterfacePointerType -= ResultType->getAsObjCInterfacePointerType(); +

[PATCH] D156320: [Flang][Driver] Add support for Rpass and related options

2023-08-09 Thread victorkingi via Phabricator via cfe-commits
victorkingi updated this revision to Diff 548664. victorkingi edited the summary of this revision. victorkingi added a comment. Added remark error test and color printing for remark errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156320/new/ h

[PATCH] D157066: [clang][modules][deps] Create more efficient API for visitation of `ModuleFile` inputs

2023-08-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Landing with one more use of `Filename` converted to `FilenameAsRequested` (in call to `Listener.visitInputFile()`). The only remaining usages of `Filename` is now in the scanner (intentional) and in `ASTReader` when deciding whether an `InputFileInfo` has already

[clang] dcd3a0c - [clang][modules][deps] Create more efficient API for visitation of `ModuleFile` inputs

2023-08-09 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-08-09T10:19:36-07:00 New Revision: dcd3a0c9f13b551ca2bcefa0dd181a383f44df49 URL: https://github.com/llvm/llvm-project/commit/dcd3a0c9f13b551ca2bcefa0dd181a383f44df49 DIFF: https://github.com/llvm/llvm-project/commit/dcd3a0c9f13b551ca2bcefa0dd181a383f44df49.diff L

[PATCH] D157066: [clang][modules][deps] Create more efficient API for visitation of `ModuleFile` inputs

2023-08-09 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdcd3a0c9f13b: [clang][modules][deps] Create more efficient API for visitation of `ModuleFile`… (authored by jansvoboda11). Changed prior to commit:

[PATCH] D156320: [Flang][Driver] Add support for Rpass and related options

2023-08-09 Thread victorkingi via Phabricator via cfe-commits
victorkingi marked an inline comment as done. victorkingi added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:786 parseShowColorsArgs(args, /*defaultDiagColor=*/false); + res.getDiagnosticOpts().ShowColors = res.getFrontendOpts().showColors; ---

[PATCH] D157474: [RISCV] Add missing Xsfvcp extension check in clang sema

2023-08-09 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/rvv-required-features-invalid.c:16 +void test_sf_vc_x_se_u64m1(uint64_t rs1, size_t vl) { // expected-note {{'test_sf_vc_x_se_u64m1' declared here}} + __riscv_sf_vc_x_se_u64m1(1, 1, 1, rs1, vl); // expected-error {

[PATCH] D157410: [Flang][Driver] Enable Rpass and other R family options.

2023-08-09 Thread victorkingi via Phabricator via cfe-commits
victorkingi updated this revision to Diff 548675. victorkingi added a comment. refactoring Options.td Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157410/new/ https://reviews.llvm.org/D157410 Files: clang/include/clang/Driver/Options.td clang

[clang] dc5cbba - [clang][modules] Add -Wsystem-headers-in-module=

2023-08-09 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2023-08-09T10:40:53-07:00 New Revision: dc5cbba3196db61d57b7d84118732a6c96d8ee64 URL: https://github.com/llvm/llvm-project/commit/dc5cbba3196db61d57b7d84118732a6c96d8ee64 DIFF: https://github.com/llvm/llvm-project/commit/dc5cbba3196db61d57b7d84118732a6c96d8ee64.diff

[PATCH] D156948: [clang][modules] Add -Wsystem-headers-in-module=

2023-08-09 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdc5cbba3196d: [clang][modules] Add -Wsystem-headers-in-module= (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D157394: [clang][DeclPrinter] Improve AST print of function attributes

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D157394#4572777 , @giulianobelinassi wrote: > This patch do not address attributes in variables nor the __declspec case, as > D141714 do. His patch looks cleaner and I > can surely co

[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-08-09 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, erichkeane, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. BEFORE this patch, when clang handles constraints like `C1 || C2` where `C1` evaluates t

[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-08-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/Stmt.h:596-597 -// These don't need to be particularly wide, because they're -// strictly limited by the forms of expressions we permit. -unsigned NumSubExprs : 8; -unsigned ResultIndex : 32 - 8

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) cor3ntin wrote: > aaron.ballman wrote: > > hiraditya wrote: > > > enh wrote: > > > > hiraditya w

[clang] 66c43fb - Enable concatenation of predefined identifiers

2023-08-09 Thread Aaron Ballman via cfe-commits
Author: Richard Dzenis Date: 2023-08-09T13:55:03-04:00 New Revision: 66c43fbd271a8231187bfcb73428ed663606585d URL: https://github.com/llvm/llvm-project/commit/66c43fbd271a8231187bfcb73428ed663606585d DIFF: https://github.com/llvm/llvm-project/commit/66c43fbd271a8231187bfcb73428ed663606585d.diff

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66c43fbd271a: Enable concatenation of predefined identifiers (authored by RIscRIpt, committed by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) ZijunZhao wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > hiraditya wrote: > > > > enh wrote:

[PATCH] D157334: [clang] Define _MSC_EXTENSIONS on -gnu if -fms-extensions is set

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm curious to hear what others think about this (especially @rnk and @hans). I think this is the correct approach -- `-fms-extensions` is separate from the Windows target; for example, users can enable `__declspec` attributes this way: https://godbolt.org/z/GEa3o

[PATCH] D157334: [clang] Define _MSC_EXTENSIONS on -gnu if -fms-extensions is set

2023-08-09 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman added a comment. Since `-fms-extensions` can be enabled on Linux as well, we should probably hoist this further since this patch only accounts for the windows case as I just hoist the conditional to be in `addWindowsDefines`. I'll work on getting another patch version up in a bit.

[PATCH] D154014: [SpecialCaseList] Use Globs instead of Regex

2023-08-09 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 548693. ellis added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154014/new/ https://reviews.llvm.org/D154014 Files: clang/docs/SanitizerSpecialCaseList.rst clang/lib/Basic/ProfileList.cpp

[PATCH] D157280: [PGO] Enable `-fprofile-update` for `-fprofile-generate`

2023-08-09 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 updated this revision to Diff 548695. qiongsiwu1 added a comment. Update clang users manual. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157280/new/ https://reviews.llvm.org/D157280 Files: clang/docs/UsersManual.rst clang/lib/Code

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) enh wrote: > ZijunZhao wrote: > > cor3ntin wrote: > > > aaron.ballman wrote: > > > > hiradit

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D144634#4573483 , @koops wrote: > Can someone please check for MacOS? Yesterday when this support was > committed, the CHECK statements in tests loop_bind_codegen.cpp and > loop_bind_enclosed.cpp had failed on Mac I patched

[PATCH] D157454: [NFC][Clang] Fix static analyzer concern about null value dereference

2023-08-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:222-223 Selector Sel = MethodWithObjects->getSelector(); - QualType ResultType = E->getType(); - const ObjCObjectPointerType *InterfacePointerType -= ResultType->getAsObjCInterfacePointerType();

[PATCH] D157445: [CodeGen][UBSan] getUBSanFunctionTypeHash does not handle the attributed function case correctly, leading to an assertion failure. This patch desugars the QualType if it is of Attribu

2023-08-09 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 updated this revision to Diff 548723. usama54321 added a comment. Fix commit message and description, and added comment explaining the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157445/new/ https://reviews.llvm.org/D157445 File

[PATCH] D157334: [clang] Define _MSC_EXTENSIONS on -gnu if -fms-extensions is set

2023-08-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. I think this makes sense in principle - however it does diverge from GCC. GCC also supports `-fms-extensions` (but I'm not sure if the set of extensions that are enabled by the option is an exact match between the two cases), but GCC doesn't expose any extra define in

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) aaron.ballman wrote: > enh wrote: > > ZijunZhao wrote: > > > cor3ntin wrote: > > > > aaron.ballm

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + hiraditya wrote: > aaron.ballman wrote: > > ZijunZhao wrote: > > > enh wrote: > > > > Zi

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. Probably should just wrap uses in macros for now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156816/new/ https://reviews.llvm.org/D1

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4574190 , @arsenm wrote: > Probably should just wrap uses in macros for now In clang? Or just have users deal with `opencl_` on everything and rename it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D157334: [clang] Define _MSC_EXTENSIONS on -gnu if -fms-extensions is set

2023-08-09 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman added a comment. It's something set on by default in MSVC (https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170). It's interesting that GCC doesn't set the `_MSC_EXTENSIONS` macro with `-fms-extensions`. It should if it wants to match the behavior of

[clang] 8ab62da - [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Chi Chun Chen via cfe-commits
Author: Chi Chun Chen Date: 2023-08-09T14:26:38-05:00 New Revision: 8ab62da18d47fa0ce6aef9da50cca34a26ea775c URL: https://github.com/llvm/llvm-project/commit/8ab62da18d47fa0ce6aef9da50cca34a26ea775c DIFF: https://github.com/llvm/llvm-project/commit/8ab62da18d47fa0ce6aef9da50cca34a26ea775c.diff

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Chi Chun Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8ab62da18d47: [Clang][OpenMP] Support for Code Generation of loop bind clause (authored by cchen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/

[clang] 9fe632b - [clang][HeaderSearch] Treat framework headers as Angled for suggestPath

2023-08-09 Thread David Goldman via cfe-commits
Author: David Goldman Date: 2023-08-09T15:51:02-04:00 New Revision: 9fe632ba18f1398aa9e6fd531a2ed98fd79eba40 URL: https://github.com/llvm/llvm-project/commit/9fe632ba18f1398aa9e6fd531a2ed98fd79eba40 DIFF: https://github.com/llvm/llvm-project/commit/9fe632ba18f1398aa9e6fd531a2ed98fd79eba40.diff

[PATCH] D156704: [clang][HeaderSearch] Treat framework headers as System for suggestPath

2023-08-09 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9fe632ba18f1: [clang][HeaderSearch] Treat framework headers as Angled for suggestPath (authored by dgoldman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D157445: [CodeGen][UBSan] Add support for handling attributed functions in getUBSanFunctionTypeHash.

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/ubsan-function-attributed.c:4 +//Make sure compiler does not crash inside getUBSanFunctionTypeHash while compiling this +long __attribute__((ms_abi)) f() {} https://maskray.me/blog/2021-08-08-toolchai

[clang] 872d22c - [NFC][Clang][Test] Fix warning-as-error

2023-08-09 Thread Michael Platings via cfe-commits
Author: Michael Platings Date: 2023-08-09T21:29:53+01:00 New Revision: 872d22c735b83d39cbd7660e4678a9c0d42fe36a URL: https://github.com/llvm/llvm-project/commit/872d22c735b83d39cbd7660e4678a9c0d42fe36a DIFF: https://github.com/llvm/llvm-project/commit/872d22c735b83d39cbd7660e4678a9c0d42fe36a.di

[PATCH] D156188: [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

2023-08-09 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. Very nice, everything looks great! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1777-1778 + + StringRef SpanOpen = "std::span<"; + StringRef SpanClose = ">"; + std::stri

[PATCH] D157547: Arm64EC entry/exit thunks, consolidated.

2023-08-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: dpaoliello, mstorsjo, bcl5980, jacek. Herald added subscribers: zzheng, hiraditya, kristof.beyls. Herald added a project: All. efriedma requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-com

[PATCH] D156188: [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

2023-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Btw, how does this work with `int **`? Given that the pointee type `int *` isn't a simple identifier. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156188/new/ https://reviews.llvm.org/D156188 ___ cfe-commits mailing lis

[PATCH] D157550: [clang] Drop some references to typed pointers (getInt8PtrTy). NFC

2023-08-09 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope created this revision. Herald added a subscriber: ChuanqiXu. Herald added a project: All. bjope requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D157550 Files: clang/li

[PATCH] D157394: [clang][DeclPrinter] Improve AST print of function attributes

2023-08-09 Thread Giuliano Belinassi via Phabricator via cfe-commits
giulianobelinassi added inline comments. Comment at: clang/lib/AST/DeclPrinter.cpp:259 +case attr::Final: +case attr::Override: + return AttrLocation::AfterDecl; aaron.ballman wrote: > giulianobelinassi wrote: > > @aaron.ballman @erichkeane > > > >

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-09 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. I was thinking to commit this patch to minimize the dependencies if there are no objections. @MaskRay @nemanjai any preferences? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155540/new/ https://reviews.llvm.org/D155540 _

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Parser/cxx0x-attributes.cpp:450-451 +namespace P2361 { +[[deprecated(L"abc")]] void a(); // expected-error{{an unevaluated string literal cannot have an encoding prefix}} +[[nodiscard("\123")]] int b(); // expe

[PATCH] D156726: Make globals with mutable members non-constant, even in custom sections

2023-08-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14254 int SectionFlags = ASTContext::PSF_Read; -if (var->getType().isConstQualified()) { - if (HasConstInit) rnk wrote: > rsmith wrote: > > efriedma wrote: > > > rnk wrote: > >

[PATCH] D157454: [NFC][Clang] Fix static analyzer concern about null value dereference

2023-08-09 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 548789. eandrews added a comment. Applied review comments to use an assert instead CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157454/new/ https://reviews.llvm.org/D157454 Files: clang/lib/CodeGen/CGObjC.cpp Index: clang/lib/CodeGen/CGObjC.c

[PATCH] D157554: [NFC][Clang] Fix static analyzer concern about null pointer dereference

2023-08-09 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: tahonermann, aaron.ballman. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. eandrews requested review of this revision. Herald added a subscriber: wa

[PATCH] D156726: Make globals with mutable members non-constant, even in custom sections

2023-08-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14254 int SectionFlags = ASTContext::PSF_Read; -if (var->getType().isConstQualified()) { - if (HasConstInit) dblaikie wrote: > rnk wrote: > > rsmith wrote: > > > efriedma wrote:

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added subscribers: abhina.sreeskantharajan, hubert.reinterpretcast. hubert.reinterpretcast added a comment. @abhina.sreeskantharajan, does this patch assume too much about the characters displayable for diagnostic output? CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D155290#4572965 , @qiongsiwu1 wrote: > Ping for review. > > If there are no comments on whether we should add `-lpthread` for platforms > other than AIX, I will land this patch soon, and let the official buildbots > check fo

[PATCH] D156188: [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

2023-08-09 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. > Btw, how does this work with `int **`? Given that the pointee type `int *` > isn't a simple identifier. It does not require the pointee type to be a simple identifier. The (source range of) pointee type is obtained by analyzing the `TypeLoc` of a variable decl

[PATCH] D157559: [clang][modules] Respect "-fmodule-name=" when serializing included files into a PCH

2023-08-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang writes the set of textually

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/offsetof.cpp:104 +struct X2 { int a; static int static_a; }; +int x2[__builtin_offsetof(struct X2, X2::a) == 0 ? 1 : -1]; +int x3[__builtin_offsetof(struct X2, X2::static_a) == 0 ? 1 : -1]; // expected-

[PATCH] D157562: [Driver][DXC] Treat stdin as HLSL

2023-08-09 Thread Justin Bogner via Phabricator via cfe-commits
bogner created this revision. bogner added reviewers: beanz, python3kgae. Herald added subscribers: Anastasia, mcrosier. Herald added a project: All. bogner requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Githu

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. In D156596#4573354 , @aaron.ballman wrote: > LGTM but please wait for @hubert.reinterpretcast to confirm the new tests > cover what he was looking for. LGTM; thanks!

[PATCH] D157445: [CodeGen][UBSan] Add support for handling attributed functions in getUBSanFunctionTypeHash.

2023-08-09 Thread Julian Lettner via Phabricator via cfe-commits
yln added inline comments. Comment at: clang/test/CodeGen/ubsan-function-attributed.c:4 +//Make sure compiler does not crash inside getUBSanFunctionTypeHash while compiling this +long __attribute__((ms_abi)) f() {} MaskRay wrote: > https://maskray.me/blog/2021-0

[PATCH] D157227: [Clang] Don't add `undef` for `operator new` under -fno-exceptions.

2023-08-09 Thread DianQK via Phabricator via cfe-commits
DianQK abandoned this revision. DianQK added a comment. Track this issue at https://github.com/llvm/llvm-project/issues/60717. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157227/new/ https://reviews.llvm.org/D157227 _

[PATCH] D156312: [analyzer] Upstream BitwiseShiftChecker

2023-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/BitwiseShiftChecker.cpp:301-302 + pluralSuffix(MaximalAllowedShift)); +R->addNote(LeftNote, PathDiagnosticLocation{LHS, Ctx.getSourceManager(), +

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D155540#4574613 , @lei wrote: > I was thinking to commit this patch to minimize the dependencies if there are > no objections. @MaskRay @nemanjai any preferences? LGTM. Please commit it. Repository: rG LLVM Github Monorep

[PATCH] D153701: [WIP][Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D153701#4563919 , @yronglin wrote: > The gap between these two numbers is very large. So I'think we can create > additional materializations only within for-range initializers. I'm not sure > if I can find a wa

[clang] 8d60e10 - [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-09 Thread via cfe-commits
Author: dingfei Date: 2023-08-10T08:02:32+08:00 New Revision: 8d60e10ce4bd428577ef441eb77b260ec3c14088 URL: https://github.com/llvm/llvm-project/commit/8d60e10ce4bd428577ef441eb77b260ec3c14088 DIFF: https://github.com/llvm/llvm-project/commit/8d60e10ce4bd428577ef441eb77b260ec3c14088.diff LOG:

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-09 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8d60e10ce4bd: [AST][Coroutine] Fix CoyieldExpr missing end loc (authored by dingfei ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157296/

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-08-09 Thread R4444 via Phabricator via cfe-commits
Ruturaj4 updated this revision to Diff 548825. Ruturaj4 added a comment. - [clang][ExtractAPI] Add support for Objective-C categories - [clang][ExtractAPI] Add support for Objective-C categories - [clang][ExtractAPI] Add support for Objective-C categories - [clang][ExtractAPI] Add support for Obje

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It doesn't have to be in `core` just because it's dealing with "core features" of the language. The `core` package is for checks without which path-sensitive analysis becomes //so incredibly incorrect// that we don't want to support such configuration, we don't want our us

[PATCH] D157149: [Option] Add "Visibility" field and clone the OptTable APIs to use it

2023-08-09 Thread Justin Bogner via Phabricator via cfe-commits
bogner updated this revision to Diff 548832. bogner added a comment. Rebase/resolve conflicts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157149/new/ https://reviews.llvm.org/D157149 Files: clang-tools-extra/clangd/CompileCommands.cpp clang/

[PATCH] D157566: [SEH] fix assertion when -fasy-exceptions is used.

2023-08-09 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: asmith, tentzen, rnk, efriedma, pengfei. jyu2 added a project: clang. Herald added a project: All. jyu2 requested review of this revision. The assertion only happens with use of -fasy-exception without -fexcessions. The assertion appen during the

[PATCH] D157568: [clang-format] Handle NamespaceMacro string arg for FixNamespaceComments

2023-08-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, MyDeveloperDay. owenpan requested review of this revision. Fixes https://github.com/llvm/llvm-project/issues/63795. Reposito

[PATCH] D156749: [modules] Fix error about the same module being defined in different .pcm files when using VFS overlays.

2023-08-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D156749#4565994 , @jansvoboda11 wrote: > I think your solution is the most pragmatic. If you're confident this doesn't > break anything internally, I say go for it. But I think it's good to be aware > of the pitfall I mentio

[PATCH] D157474: [RISCV] Add missing Xsfvcp extension check in clang sema

2023-08-09 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat updated this revision to Diff 548843. 4vtomat added a comment. Rename the function in the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157474/new/ https://reviews.llvm.org/D157474 Files: clang/lib/Sema/SemaRISCVVectorLookup.c

[clang] 4608686 - [clang][test] Fix LIT test failures for the following commit

2023-08-09 Thread Changpeng Fang via cfe-commits
Author: Changpeng Fang Date: 2023-08-09T18:23:18-07:00 New Revision: 4608686849bcb6e20de827750862d5345cbd URL: https://github.com/llvm/llvm-project/commit/4608686849bcb6e20de827750862d5345cbd DIFF: https://github.com/llvm/llvm-project/commit/4608686849bcb6e20de827750862d5345cbd.diff

[PATCH] D157474: [RISCV] Add missing Xsfvcp extension check in clang sema

2023-08-09 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat marked an inline comment as done. 4vtomat added inline comments. Comment at: clang/test/Sema/rvv-required-features-invalid.c:16 +void test_sf_vc_x_se_u64m1(uint64_t rs1, size_t vl) { // expected-note {{'test_sf_vc_x_se_u64m1' declared here}} + __riscv_sf_vc_x_se_u64m1(1

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-08-09 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 548848. jacquesguan added a comment. rebase and add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151547/new/ https://reviews.llvm.org/D151547 Files: clang/include/clang/Basic/BuiltinsRISCV

<    1   2   3   >