[clang-tools-extra] 22605f5 - [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).

2023-07-19 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-07-19T08:32:53Z New Revision: 22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd URL: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd DIFF: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.diff

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4511652 , @aaron.ballman wrote: > In the x86 compilation: `sizeof(std::size_t) < sizeof(uint64_t)` is true, so > we test the other expression; because `Size` is greater than `__SIZE_MAX__` > the function returns

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-19 Thread Simi Pallipurath via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc1873d84a331: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal… (authored by simpal01). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] c1873d8 - [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-19 Thread Simi Pallipurath via cfe-commits
Author: Simi Pallipurath Date: 2023-07-19T09:37:40+01:00 New Revision: c1873d84a3316fa03326e9157e799b81f63d7a10 URL: https://github.com/llvm/llvm-project/commit/c1873d84a3316fa03326e9157e799b81f63d7a10 DIFF:

[clang] 7db501a - [NFC] Adjust test for pr63595

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T16:51:37+08:00 New Revision: 7db501a7385e62b342b393cba763205753b3cb89 URL: https://github.com/llvm/llvm-project/commit/7db501a7385e62b342b393cba763205753b3cb89 DIFF: https://github.com/llvm/llvm-project/commit/7db501a7385e62b342b393cba763205753b3cb89.diff

[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/unittests/Format/FormatTest.cpp:25504 + +#if 0 verifyFormat("if (quitelongarg !=\n" we don't do this.

[PATCH] D155273: [clang-format] Add TypeNames option to disambiguate types/objects

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I used isSimpleTypeSpecifier() in the east/west const fixer, I think this could probably help there to catch more places too.. (you don't need to do that here) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 7 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2441 bool Sema::CheckImmediateEscalatingFunctionDefinition( -FunctionDecl *FD, bool HasImmediateEscalatingExpression) { - if (!FD->hasBody() ||

[clang] 061e855 - [clang][Docs] Added release note for D142609

2023-07-19 Thread Shivam Gupta via cfe-commits
Author: Shivam Gupta Date: 2023-07-19T15:00:24+05:30 New Revision: 061e855767dbe0821d81a8d47158f468dd00ae5f URL: https://github.com/llvm/llvm-project/commit/061e855767dbe0821d81a8d47158f468dd00ae5f DIFF: https://github.com/llvm/llvm-project/commit/061e855767dbe0821d81a8d47158f468dd00ae5f.diff

[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 541915. Fznamznon added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152003/new/ https://reviews.llvm.org/D152003 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaType.cpp

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova 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 rG22605f5f1bf8: [clangd] Make an include always refer to itself. Background: clang-review… (authored by VitaNuo). Repository: rG LLVM Github

[clang-tools-extra] 92c0546 - Revert "[clangd] Always run preamble indexing on a separate thread"

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T10:38:23+02:00 New Revision: 92c0546941190973e9201a08fa10edf27cb6992d URL: https://github.com/llvm/llvm-project/commit/92c0546941190973e9201a08fa10edf27cb6992d DIFF:

[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. It looks like this was added in D109557: Adds a BlockIndent option to AlignAfterOpenBracket I'm trying to understand what bad stuff happens if you remove the "if" from `return !(Previous && Previous->is(tok::kw_for));`

[clang-tools-extra] d06af7a - Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)"

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T10:45:23+02:00 New Revision: d06af7a44eb3d72036c7c5e05e39d43609311dc5 URL: https://github.com/llvm/llvm-project/commit/d06af7a44eb3d72036c7c5e05e39d43609311dc5 DIFF:

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2441 bool Sema::CheckImmediateEscalatingFunctionDefinition( -FunctionDecl *FD, bool HasImmediateEscalatingExpression) { - if (!FD->hasBody() || !getLangOpts().CPlusPlus20 || -

[PATCH] D143617: [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options

2023-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/utils/perf-training/bolt.lit.cfg:12 +if config.clang_bolt_mode.lower() == "instrument": +clang_binary = "clang-bolt.inst" +else: # perf or LBR This name would ideally be passed through the generated

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I think the discussion is getting derailed a bit. The original reason I was talking to Takuya about this is this: https://godbolt.org/z/GjsYrexT3 static_assert('a' == 100); For code like this, we print the it as `''a' == 100'`, but the AST contains a cast from the

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

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 541904. jacquesguan added a comment. Address comment and rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151547/new/ https://reviews.llvm.org/D151547 Files:

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

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan marked 2 inline comments as done. jacquesguan added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:151 // RUN: -o - | FileCheck --check-prefix=CHECK-ZIHINTNTL-EXT %s // CHECK-ZIHINTNTL-EXT: __riscv_zihintntl 2000{{$}}

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:18441 SemaRef.Diag(ND->getLocation(), diag::note_declared_at); + if (auto Context = + SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) { cor3ntin

[clang] 95bdd6e - [NFC] [C++20] [Modules] Add C++20 modules related changes to Release Note

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T14:16:01+08:00 New Revision: 95bdd6eed6f3f4b8a95523516120068ac18eccff URL: https://github.com/llvm/llvm-project/commit/95bdd6eed6f3f4b8a95523516120068ac18eccff DIFF: https://github.com/llvm/llvm-project/commit/95bdd6eed6f3f4b8a95523516120068ac18eccff.diff

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D155625#4512123 , @PiotrZSL wrote: > LGTM, but I'm not sure if isCopyableOrMovable will always work correctly, for > a user defined special members it looks ok, but for some implicit ones I > worry it may not always

[PATCH] D125765: [RISCV] Add type aliases float16_t, float32_t and float64_t

2023-07-19 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc planned changes to this revision. wangpc added a comment. I don't have any thoughts on this patch now. In D125765#4511637 , @eopXD wrote: > Sorry for the late reply, I missed this in may mails. > > I see that the motivation start from where you

[PATCH] D155614: [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1365 // Add the #include line to the references list. ReferencesResult::Reference Result; Result.Loc.range = i guess this patch is not needed anymore, but one comment about

[clang-tools-extra] c4fa97f - [clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)

2023-07-19 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-07-19T15:28:38+08:00 New Revision: c4fa97fca7e92c736fcb09779c84b42c25ffae70 URL: https://github.com/llvm/llvm-project/commit/c4fa97fca7e92c736fcb09779c84b42c25ffae70 DIFF: https://github.com/llvm/llvm-project/commit/c4fa97fca7e92c736fcb09779c84b42c25ffae70.diff LOG:

[clang] e271049 - [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2023-07-19T09:58:14+02:00 New Revision: e271049bc6a1408aa4e53771321117b3da6440ab URL: https://github.com/llvm/llvm-project/commit/e271049bc6a1408aa4e53771321117b3da6440ab DIFF: https://github.com/llvm/llvm-project/commit/e271049bc6a1408aa4e53771321117b3da6440ab.diff

[clang] 5e601ad - [NFC] Add a blank line after directives in StandardCPlusPlusModules.rst

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T16:10:55+08:00 New Revision: 5e601ad3bcb9fbeb1336dc728ac0eed196bce698 URL: https://github.com/llvm/llvm-project/commit/5e601ad3bcb9fbeb1336dc728ac0eed196bce698 DIFF: https://github.com/llvm/llvm-project/commit/5e601ad3bcb9fbeb1336dc728ac0eed196bce698.diff

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

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:151 // RUN: -o - | FileCheck --check-prefix=CHECK-ZIHINTNTL-EXT %s // CHECK-ZIHINTNTL-EXT: __riscv_zihintntl 2000{{$}} The CHECK-ZIHINTNTL-EXT also need update.

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:153 + static_assert(__builtin_LINE() == 152, ""); +} what is missing to enable the existing source location tests with the new intterpreter? Repository: rG LLVM Github

[clang] bc3f29c - Revert "[NFC] [C++20] [Modules] Add C++20 modules related changes to Release Note"

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T14:28:47+08:00 New Revision: bc3f29c5401f866380e5c4cedf5a1a8a8e503348 URL: https://github.com/llvm/llvm-project/commit/bc3f29c5401f866380e5c4cedf5a1a8a8e503348 DIFF: https://github.com/llvm/llvm-project/commit/bc3f29c5401f866380e5c4cedf5a1a8a8e503348.diff

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I agree with Aaron that in the current state, the common case diagnostics are made worse. But there is room for improvement! I think what we want to do here is modify `ConvertAPValueToString` so that it applies the same escape logic to `char` as we do in

[clang] f5768ec - [NFC] [C++20] [Modules] Add C++20 modules related changes to Release Note

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T14:33:09+08:00 New Revision: f5768ec9b1dcc3f72aae9ab90b92670c2828770b URL: https://github.com/llvm/llvm-project/commit/f5768ec9b1dcc3f72aae9ab90b92670c2828770b DIFF: https://github.com/llvm/llvm-project/commit/f5768ec9b1dcc3f72aae9ab90b92670c2828770b.diff

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp:91-102 + Finder->addMatcher( + fieldDecl(unless(isMemberOfLambda()), +hasDeclContext(cxxRecordDecl(isCopyableOrMovable())), +

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGdfdfd306cfaf: [Clang] Fix -Wconstant-logical-operand when LHS is a constant (authored by shivam-amd). Changed prior to

[clang-tools-extra] 036a1b2 - [clangd] Always run preamble indexing on a separate thread

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T08:48:14+02:00 New Revision: 036a1b2202cb71aacfa72ef15145a88dc50a02cf URL: https://github.com/llvm/llvm-project/commit/036a1b2202cb71aacfa72ef15145a88dc50a02cf DIFF:

[PATCH] D155619: [clangd] Always run preamble indexing on a separate thread

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG036a1b2202cb: [clangd] Always run preamble indexing on a separate thread (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155619/new/

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155627#4513433 , @cor3ntin wrote: > Note that you are probably need something like `SourceLocExprScopeGuard` to > make source_location actually work, , it might be worth doing in this patch. > The idea is to remember the

[clang] c3dd2f3 - [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via cfe-commits
Author: tomasz-kaminski-sonarsource Date: 2023-07-19T09:01:41+02:00 New Revision: c3dd2f35b876f9af39c01de49941a3920fd59a33 URL: https://github.com/llvm/llvm-project/commit/c3dd2f35b876f9af39c01de49941a3920fd59a33 DIFF:

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński 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 rGc3dd2f35b876: [analyzer] Model lifetime of a variable declared in for condition in CFG… (authored by tomasz-kaminski-sonarsource). Repository: rG

[PATCH] D154368: [Clang] Fix constraint checking of non-generic lambdas.

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 541858. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. Address Aaron's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154368/new/ https://reviews.llvm.org/D154368 Files:

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-19 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Thank you for your quick response. > Given that the intended use case is for usage behind the scenes in the > standard library... > I'd strongly prefer not to have a documented, user-visible attribute that > gives

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

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan added a comment. Herald added a subscriber: wangpc. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151547/new/ https://reviews.llvm.org/D151547 ___ cfe-commits mailing list

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Looks like we have two patches for this now. D151547 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155674/new/ https://reviews.llvm.org/D155674

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 541866. xgupta added a comment. Add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true,cfg-temporary-dtors=false,cfg-rich-constructors=false

[clang] 0d6ea6f - [NFC] [C++20] [Modules] Add a performance tip to the document

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T15:49:56+08:00 New Revision: 0d6ea6fc3b137b92809be740544e2715a7b0ba65 URL: https://github.com/llvm/llvm-project/commit/0d6ea6fc3b137b92809be740544e2715a7b0ba65 DIFF: https://github.com/llvm/llvm-project/commit/0d6ea6fc3b137b92809be740544e2715a7b0ba65.diff

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-19 Thread James Henderson via Phabricator via cfe-commits
jhenderson added inline comments. Comment at: llvm/test/tools/llvm-ranlib/aix-X-option.test:3 +## Test the -X option. +## The option specifies the type of object file on which llvm-ranlib will operate. + Nit: trailing whitespace Comment at:

[PATCH] D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes

2023-07-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I filed an issue for the new issue: https://github.com/llvm/llvm-project/issues/63947 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154324/new/ https://reviews.llvm.org/D154324

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

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: llvm/docs/RISCVUsage.rst:214 +``zihintntl`` LLVM implements the `0.2 draft specification `__. zihintntl could add into `table:: Ratified

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 541882. VitaNuo marked 2 inline comments as done. VitaNuo added a comment. Remove only one of the checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155614/new/ https://reviews.llvm.org/D155614 Files:

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo accepted this revision. VitaNuo added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/XRefs.cpp:1361-1362 }); - if (Results.References.empty()) -return std::nullopt; - usaxena95 wrote: >

[PATCH] D155456: [RISCV] Support -m[no-]strict-align options

2023-07-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Driver/riscv-features.c:41 +// DEFAULT: "-target-feature" "-unaligned-scalar-mem" +// DEFAULT-NOT: "-target-feature" "+unaligned-scalar-mem" + This looks a bit fragile, can we just check all

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg created this revision. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, jdoerfert, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng,

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Note that you are probably need something like `SourceLocExprScopeGuard` to make source_location actually work, , it might be worth doing in this patch. The idea is to remember the location of a call when evaluating default arguments / default member initializers

[clang] dfdfd30 - [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Shivam Gupta via cfe-commits
Author: Shivam Gupta Date: 2023-07-19T12:12:11+05:30 New Revision: dfdfd306cfaf54fbc43e2d5eb36489dac3eb9976 URL: https://github.com/llvm/llvm-project/commit/dfdfd306cfaf54fbc43e2d5eb36489dac3eb9976 DIFF: https://github.com/llvm/llvm-project/commit/dfdfd306cfaf54fbc43e2d5eb36489dac3eb9976.diff

[clang] 64cfcde - [Clang] Fix the location of default init expressions

2023-07-19 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-07-19T08:54:01+02:00 New Revision: 64cfcde31a48962c3bbc703753a4ea41200da7a8 URL: https://github.com/llvm/llvm-project/commit/64cfcde31a48962c3bbc703753a4ea41200da7a8 DIFF:

[PATCH] D155573: [Clang] Fix the location of default init expressions

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64cfcde31a48: [Clang] Fix the location of default init expressions (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D155573?vs=541473=541853#toc Repository: rG LLVM Github

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Thanks, @nickdesaulniers for reviewing and @nathanchance for testing the change. @aaron.ballman, I also agree with @xbolva00 seems warning in kernel code is valid but I also agree with your comment about macro, may be better to track the macro-related issue with another

[PATCH] D154696: [Clang] Diagnose jumps into statement expressions

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. FYI, this can be relanded after https://reviews.llvm.org/D155342 is merged Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154696/new/ https://reviews.llvm.org/D154696 ___

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-19 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:149 // RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \ -// RUN: -march=rv32izihintntl0p2 -x c -E -dM %s \ +// RUN: -march=rv32izihintntl1p0 -x c -E

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-19 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. Regarding the clang CI failure, libcxx's `__libcpp_is_constant_evaluated` always returns false under C++03 or earlier, where constexpr isn't available. (Code:

[PATCH] D154509: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:413-414 +using ValueConstraint::ValueConstraint; +ArgNo SizeArg1N; +std::optional SizeArg2N; +// This variable

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config

[PATCH] D154509: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. balazske marked an inline comment as done. Closed by commit rGe271049bc6a1: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and… (authored

[PATCH] D155445: [analyzer][docs] Add CSA release notes

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/docs/ReleaseNotes.rst:964 +- ``StdCLibraryFunctionArgs`` was merged into the ``StdCLibraryFunctions``. + The diagnostics of the ``StdCLibraryFunctions`` was improved. + (`4f0436dd1532

[PATCH] D78038: [clangd] WIP: fix several bugs relating to include insertion

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, i think this LG. Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:1697-1698 + )cpp"); + TU.HeaderFilename = "Foo.h"; + auto Symbols =

[PATCH] D155651: [SystemZ][z/OS] Add OpenFlags to CreateMissingDirectories path when creating temp files

2023-07-19 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan accepted this revision. abhina.sreeskantharajan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155651/new/ https://reviews.llvm.org/D155651

[PATCH] D138263: [clang-format] Supress aligning of trailing namespace comments

2023-07-19 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 541959. HazardyKnusperkeks marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138263/new/ https://reviews.llvm.org/D138263 Files: clang/lib/Format/FormatToken.h clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D155694: [NFC][analyzer] Enable implicit destructor for cfg-lifetime tests

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. tomasz-kaminski-sonarsource requested review of this

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 541961. carlosgalvezp marked 3 inline comments as done. carlosgalvezp added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625

[PATCH] D155694: [NFC][analyzer] Enable implicit destructor for cfg-lifetime tests

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. Updating this tests illustrated that we are missing a lot of coverage for the objects with trivial destructors, but I think this should be addressed as a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: llvm/unittests/Support/RISCVISAInfoTest.cpp:376 EXPECT_EQ(Exts.count("zihintntl"), 1U); - auto MaybeISAInfo2 = RISCVISAInfo::parseArchString("rv64izihintntl0p2", true); + auto MaybeISAInfo2 =

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Using `hasSimpleCopyConstructor` and so on greatly simplifies the logic, great! Let me know if you are happy with it or I should go ahead and merge. Comment at:

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 541963. carlosgalvezp added a comment. Merge matchers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625 Files:

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp:91-102 + Finder->addMatcher( + fieldDecl(unless(isMemberOfLambda()), +hasDeclContext(cxxRecordDecl(isCopyableOrMovable())),

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Looks fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625 ___ cfe-commits mailing list

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez 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 rGb70e6e968192: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid… (authored by carlosgalvezp). Repository: rG LLVM

[clang-tools-extra] b70e6e9 - [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-07-19T12:05:15Z New Revision: b70e6e9681925ad06d9899462b9e43250be53f64 URL: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64 DIFF: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64.diff

[PATCH] D155392: [clangd] add a config knob to disable modules

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/ModulesTests.cpp:34 +protected: + ModulesTest() : WithCfg(Config::Key, makeModuleConfig(GetParam())) {} +}; testing behaviour indirectly through config options cause some troubles in

[PATCH] D142967: [clangd] Introduce source.organizeImports code action.

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet resigned from this revision. kadircet added a comment. Herald added a subscriber: kadircet. resigning in favor of https://reviews.llvm.org/D153769 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142967/new/ https://reviews.llvm.org/D142967

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:153 + static_assert(__builtin_LINE() == 152, ""); +} tbaeder wrote: > cor3ntin wrote: > > what is missing to enable the existing source location tests with the new > >

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2730-2734 +DEF_TRAVERSE_STMT(CXXDefaultInitExpr, { + if (getDerived().shouldVisitImplicitCode()) +TRY_TO(TraverseStmt(S->getExpr())); +}) +

[PATCH] D154790: [HIP] Use native math functions for `-fcuda-approx-transcendentals`

2023-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154790/new/ https://reviews.llvm.org/D154790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142609#4513478 , @xgupta wrote: > Thanks, @nickdesaulniers for reviewing and @nathanchance for testing the > change. > > @aaron.ballman, I also agree with @xbolva00 seems warning in kernel code is > valid but I also

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 542086. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542125. nickdesaulniers added a comment. - add @efriedma's test case - check if the extending decl is not a reference, rather than for X or L values Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] a37d747 - [OpenMP][Docs] Add some things to the OpenMP support

2023-07-19 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-07-19T13:17:39-05:00 New Revision: a37d7472225442227c531ce85a7448499f70b72e URL: https://github.com/llvm/llvm-project/commit/a37d7472225442227c531ce85a7448499f70b72e DIFF: https://github.com/llvm/llvm-project/commit/a37d7472225442227c531ce85a7448499f70b72e.diff

[PATCH] D134544: [clang-cl] Implement /ZH: flag

2023-07-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/Driver/Options.td:3220 Values<"simple,mangled">, Flags<[CC1Option, NoDriverOption]>; +def gsrc_hash_EQ : Joined<["-"], "gsrc-hash=">, + Group, Flags<[CC1Option, NoDriverOption]>, thakis

[PATCH] D155729: [OptTable] Make explicitly included options override excluded ones

2023-07-19 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/include/clang/Driver/Options.h:40 + Ignored = (1 << 18), + TargetSpecific = (1 << 19), }; Given that the id for these flags have changed, does it make sense to write a test that makes sure these flags with

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk updated this revision to Diff 542032. mhalk added a comment. Rebase + removed `RunCleanupsScope` for preparation w.r.t. D137607 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155692/new/

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-19 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:542 +N = Decls.size(); + } + rjmccall wrote: > dexonsmith wrote: > > john.brawn wrote: > > > rjmccall wrote: > > > > john.brawn wrote: > > > > > rjmccall wrote: > > > > > > This is

[PATCH] D155446: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and `StructValue`.

2023-07-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. This is really impressive. Thank you! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:337-338 + /// Returns the location of the result

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm suggesting: llvm::BitVector declsToRemove; while (I < N) { if (shouldHideTag()) declsToRemove.add(I); if (notUnique()) declsToRemove.add(I); } Decls.removeAll(declsToRemove) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154503/new/

[PATCH] D155713: [clang] Fix interaction between dllimport and exclude_from_explicit_instantiation

2023-07-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Thanks for the patch! The other similar functionality that exists is `/Zc:dllexportInlines-`, which we could track down the implementation of to try to share logic, but I'm not sure about that. I should defer to @hans for a more thorough code review.

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:9591-9594 + bool IsMSConstexpr = Info.CurrentCall->CanEvalMSConstexpr && + OperatorNew->hasAttr(); if (OperatorNew->isReservedGlobalPlacementOperator() && +

[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes

2023-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155342/new/ https://reviews.llvm.org/D155342 ___ cfe-commits mailing list

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

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K ==

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource marked 2 inline comments as done. tomasz-kaminski-sonarsource added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-19 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro added inline comments. Comment at: flang/runtime/CMakeLists.txt:251 - INSTALL_WITH_TOOLCHAIN -) +if (DEFINED LLVM_ENABLE_RUNTIMES AND "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES) + add_flang_library(FortranRuntime STATIC efriedma wrote: > pscoro wrote: >

  1   2   3   >