[clang] eb35e0e - [clang-format] don't break up #-style comment sections

2022-03-22 Thread Krasimir Georgiev via cfe-commits
Author: Krasimir Georgiev Date: 2022-03-22T15:29:02+01:00 New Revision: eb35e0ecbe0ae153481f1df16d91cc6001477d21 URL: https://github.com/llvm/llvm-project/commit/eb35e0ecbe0ae153481f1df16d91cc6001477d21 DIFF:

[PATCH] D122224: Allow -Wno-gnu to silence GNU extensions related to pointer arithmetic

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: nickdesaulniers, andrew.w.kaylor, eli.friedman, erichkeane. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. These diagnostics were added to a diagnostic group, but

[PATCH] D122150: [clang][analyzer] Add checker for bad use of 'errno'.

2022-03-22 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. I'm liking it. We need to improve the diagnostics and the user-facing docs as well. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:545 +

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hello, @devin.jeanpierre! I'm wondering if we should revert this while you investigate the fix, or do you think you'll have this solved sometime today? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. 1 request for a test, and 1 hope that @aaron.ballman will help bikeshed (or just say its fine!), but otherwise LGTM. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:69 +def note_constexpr_static_local : Note< + "control flows through

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I don't spot anything overly concerning in this patch, I believe it LGTM as well. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:38 + if (!b) +NonLiteral n; +}

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:69 +def note_constexpr_static_local : Note< + "control flows through the declaration of a %select{static|thread_local}0 variable">; def note_constexpr_subobject_declared_here :

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 417279. zahiraam marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122155/new/ https://reviews.llvm.org/D122155 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/lib/Sema/Sema.cpp

[PATCH] D122102: [clangd] Introduce "add subclass" tweak

2022-03-22 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added a comment. Thank for your comments, @adamcz and @njames93! I agree that a "Implement interface" tweak is probably more useful, and I can imagine to evolve this tweak in that direction. The main reason, I first went for the "create a new class from scratch" approach, was

[PATCH] D122102: [clangd] Introduce "add subclass" tweak

2022-03-22 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added a comment. @adamcz > Ideally I'd like to see this code action show up as code completion option as > well. I think in the long-term such a "Implement methods" code action should also apply as a quickfix for class Base { virtual void foo() = 0; }; class

[clang] 9cf8f81 - Fix _BitInt suffix width calculation

2022-03-22 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-03-22T10:00:05-04:00 New Revision: 9cf8f81ca45de198013f29442a7de6600b226d70 URL: https://github.com/llvm/llvm-project/commit/9cf8f81ca45de198013f29442a7de6600b226d70 DIFF: https://github.com/llvm/llvm-project/commit/9cf8f81ca45de198013f29442a7de6600b226d70.diff

[clang] 73c0d05 - [CGOpenMPRuntimeGPU] Remove uses of deprecated address constructor

2022-03-22 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-22T15:02:45+01:00 New Revision: 73c0d05e6a90612399de06a98201e9d6a9059797 URL: https://github.com/llvm/llvm-project/commit/73c0d05e6a90612399de06a98201e9d6a9059797 DIFF: https://github.com/llvm/llvm-project/commit/73c0d05e6a90612399de06a98201e9d6a9059797.diff

[PATCH] D122230: [clang-format] don't break up #-style comment sections

2022-03-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: All. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Follow-up from https://github.com/llvm/llvm-project/commit/36d13d3f8adb3d1a6bae71370afa23d11a94dc78. Restore the old

[PATCH] D122230: [clang-format] don't break up #-style comment sections

2022-03-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I hit something like this today with some code which was //#undef I'm not sure I think that // #undef or //# undef is what I want either Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122230/new/

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-22 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. In D120397#3398562 , @ChuanqiXu wrote: > Both `ast-dump` and `ast-dump=json` couldn't solve this. And I feel > `static_assert` is hard

[PATCH] D122179: Serialize PragmaAssumeNonNullLoc to support preambles

2022-03-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:748 +TEST(DiagnosticsTest, PreambleWithPragmaAssumeNonnull) { + Annotations Header(R"cpp( sammccall wrote: > sammccall wrote: > > This test seems to have a lot

[PATCH] D122179: Serialize PragmaAssumeNonNullLoc to support preambles

2022-03-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 417315. dgoldman marked 9 inline comments as done. dgoldman added a comment. Fixes for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122179/new/ https://reviews.llvm.org/D122179 Files:

[PATCH] D122189: [Clang][NeonEmitter] emit ret decl first for -Wdeclaration-after-statement

2022-03-22 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. Can you post a bit of the header diff before/after? I think I know what it looks like but just to be sure. Comment at: clang/test/Sema/arm-neon-decl-after-stmt.c:3 +// RUN: -Wdeclaration-after-statement -fsyntax-only -verify %s +// REQUIRES:

[PATCH] D122237: [clang][lex] Fix failures with Microsoft header search rules

2022-03-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `HeaderSearch` currently assumes `LookupFileCache` is eventually populated in `LookupFile`. However, that's not

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; LegalizeAdulthood wrote: > aaron.ballman wrote: > > LegalizeAdulthood wrote: > > > aaron.ballman wrote: > > > > I'm a

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417320. cor3ntin added a comment. - Add tests for _Thread_local, thread (these should be supported in c++23 constexpr function) - Change /declaration/definition/ in a diagnostic message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119721: [clang][lex] Use `ConstSearchDirIterator` in lookup cache

2022-03-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thanks for reporting this (also reported here: https://github.com/llvm/llvm-project/issues/54426). I have a fix up for review here: D122237 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd marked an inline comment as done. mgehre-amd added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">;

[PATCH] D122237: [clang][lex] Fix failures with Microsoft header search rules

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think this ends up being the same as what we came up with internally, so I think this LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122237/new/ https://reviews.llvm.org/D122237

[clang] 80e66a0 - [clang][NFC] Refactor logic for picking standard library on Apple

2022-03-22 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2022-03-22T12:35:47-04:00 New Revision: 80e66a05b6fad7d5f0ef71d5e0a74ce5ddc157a5 URL: https://github.com/llvm/llvm-project/commit/80e66a05b6fad7d5f0ef71d5e0a74ce5ddc157a5 DIFF: https://github.com/llvm/llvm-project/commit/80e66a05b6fad7d5f0ef71d5e0a74ce5ddc157a5.diff

[PATCH] D122232: [clang][NFC] Refactor logic for picking standard library on Apple

2022-03-22 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG80e66a05b6fa: [clang][NFC] Refactor logic for picking standard library on Apple (authored by ldionne). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. In D111400#3399876 , @cor3ntin wrote: > - Add tests for _Thread_local, thread > > (these should be supported in c++23 constexpr function) > > - Change /declaration/definition/ in a diagnostic

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; mgehre-amd wrote: >

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Lex/LiteralSupport.cpp:1232 + if (llvm::isPowerOf2_32(radix)) { +unsigned BitsPerDigit = llvm::Log2(radix); mgehre-amd wrote: > erichkeane wrote: > > Can you explain what is going on here? This

[clang] 4f5640c - [CGOpenMPRuntime] Remove some uses of deprecated Address ctor

2022-03-22 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-22T15:35:45+01:00 New Revision: 4f5640cad3e0cdff9ab8d6b63c9abd760c32832b URL: https://github.com/llvm/llvm-project/commit/4f5640cad3e0cdff9ab8d6b63c9abd760c32832b DIFF: https://github.com/llvm/llvm-project/commit/4f5640cad3e0cdff9ab8d6b63c9abd760c32832b.diff

[PATCH] D122111: [clang-tidy] Fix false positives in `misc-redundant-expression` check

2022-03-22 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! Please also add a release note for the fix when you land it. Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:605 +

[PATCH] D120134: [analyzer] refactor makeIntValWithPtrWidth, remove getZeroWithPtrWidth (NFC)

2022-03-22 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 417300. vabridgers added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120134/new/ https://reviews.llvm.org/D120134 Files:

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes ) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if (attrs.Range.getEnd().isValid()) +

[clang] cd6d9ae - [CGOpenMPRuntime] Remove some uses of deprecated Adddress ctor

2022-03-22 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-22T16:29:35+01:00 New Revision: cd6d9ae26313258d4dbf8a5db4d977434c03ed6a URL: https://github.com/llvm/llvm-project/commit/cd6d9ae26313258d4dbf8a5db4d977434c03ed6a DIFF: https://github.com/llvm/llvm-project/commit/cd6d9ae26313258d4dbf8a5db4d977434c03ed6a.diff

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; Can you explain the issue here?

[PATCH] D121916: [clang-format] [doc] Add script to automatically update help output in ClangFormat.rst.

2022-03-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/tools/dump_format_help.py:29 +def get_help_output(): +args = ["clang-format", "--help"] +cmd = subprocess.Popen(args, stdout=subprocess.PIPE, curdeius wrote: > sstwcw wrote: > > You

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes ) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if (attrs.Range.getEnd().isValid()) +

[PATCH] D120228: [RISCV] Add policy operand for masked compare and vmsbf/vmsif/vmsof IR intrinsics.

2022-03-22 Thread Zakk Chen 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 rG10fd2822b77e: [RISCV] Add policy operand for masked compare and vmsbf/vmsif/vmsof IR (authored by khchen). Herald added a subscriber: StephenFan.

[PATCH] D122232: [clang][NFC] Refactor logic for picking standard library on Apple

2022-03-22 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added a reviewer: egorzhdan. Herald added a project: All. ldionne requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Flip the logic around: always default to libc++ except on older platforms, instead of

[PATCH] D120134: [analyzer] refactor makeIntValWithPtrWidth, remove getZeroWithPtrWidth (NFC)

2022-03-22 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. ping! @steakhal accepted, should we wait for @NoQ before landing? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120134/new/ https://reviews.llvm.org/D120134 ___

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes ) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if

[PATCH] D107141: [Inline-asm] Add diagnosts for unsupported inline assembly arguments

2022-03-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:622 +if (InTy->isIntegerType() || InTy->isPointerType() || +InTy->isStructureType() || InTy->isConstantArrayType()) InputDomain = AD_Int; jyu2 wrote: > pengfei wrote: >

[PATCH] D107141: [Inline-asm] Add diagnosts for unsupported inline assembly arguments

2022-03-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 417303. pengfei added a comment. Address review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes ) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if (attrs.Range.getEnd().isValid()) +

[PATCH] D119721: [clang][lex] Use `ConstSearchDirIterator` in lookup cache

2022-03-22 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added subscribers: rnk, sberg. sberg added a comment. Herald added a project: All. I started to experience Clang crashing when building Firebird (as part of building LibreOffice) in clang-cl mode on Windows, and I think it is due to this change in combination with D2733

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd created this revision. mgehre-amd added reviewers: aaron.ballman, erichkeane. Herald added subscribers: luke957, s.egerton, mstorsjo, simoncook, fedor.sergeev, dschuff. Herald added a project: All. mgehre-amd requested review of this revision. Herald added subscribers: pcwang-thead,

[PATCH] D119063: [SemaCXX] Properly scope ArgumentPackSubstitutionIndex when expanding base types

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. Adding Erich as he's been staring at the template instantiation code recently and may have thoughts/opinions. To me, this seems like the correct approach though. Comment at:

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/include/clang/Sema/ParsedAttr.h:813 void takeAllFrom(AttributePool ) { takePool(pool); pool.Attrs.clear(); erichkeane wrote: > so: `assert( != this &&

[PATCH] D119063: [SemaCXX] Properly scope ArgumentPackSubstitutionIndex when expanding base types

2022-03-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think this patch makes sense to me. I Do like the ideas of making sure these instantiate properly though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119063/new/ https://reviews.llvm.org/D119063

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:69 +def note_constexpr_static_local : Note< + "control flows through the declaration of a %select{static|thread_local}0 variable">; def

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Comment at: clang/include/clang/Sema/Sema.h:1075-1077 /// WeakUndeclaredIdentifiers - Identifiers contained in /// \#pragma weak before declared. rare. may alias another /// identifier,

[PATCH] D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options

2022-03-22 Thread Alex Brachet via Phabricator via cfe-commits
abrachet updated this revision to Diff 417313. abrachet marked an inline comment as done. abrachet added a comment. Herald added subscribers: pmatos, asb, StephenFan. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121560/new/ https://reviews.llvm.org/D121560 Files:

[PATCH] D122232: [clang][NFC] Refactor logic for picking standard library on Apple

2022-03-22 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan accepted this revision. egorzhdan 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/D122232/new/ https://reviews.llvm.org/D122232

<    1   2   3