[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-06-02 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added inline comments. Comment at: clang/lib/Lex/HeaderMap.cpp:265 + } + return ReverseMap.lookup(DestPath); +} bruno wrote: > How about something along the lines of: > > ``` > ... > StringRef Key; > for (unsigned i = 0; i != NumBuckets; ++i) {

[PATCH] D103028: [llvm][ARM] Add CPU defs for arm2/3/6/7m

2021-06-02 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett updated this revision to Diff 349221. DavidSpickett added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of adding CPUs to llvm, remove them from clang. If anyone was using them they weren't making any difference, apart from generating

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103440#2792814 , @NoQ wrote: > Our pre-commit testing shows that the new tests fail, eg.: > > https://buildkite.com/llvm-project/premerge-checks/builds/41391#b557c86c-0587-4aee-a06b-8a4de6d771c4 > > Failed Tests (1): >

[PATCH] D102914: [analyzer] Make checker silencing work for non-pathsensitive bug reports

2021-06-02 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. This makes sense, and looks good to me! Though, my review confidence is weak. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102914/new/ https://reviews.llvm.org/D102914

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. > I understand it's a little bit confusing here, but I was simply trying to > match GCC's behavior (please see the example in my last comment) unless I > misunderstood its output. I definitely agree having consistent behaviors > between Arm and Aarch64 in Clang

[PATCH] D103511: [clang-tidy] Special member functions check should allow sole dtors by default

2021-06-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: aaron.ballman, njames93, steveire. Herald added subscribers: martong, kbarton, xazax.hun, whisperity, nemanjai. steakhal requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits.

[PATCH] D103028: [clang][ARM] Remove arm2/3/6/7m CPU names

2021-06-02 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added inline comments. Comment at: clang/test/Misc/target-invalid-cpu-note.c:4 // ARM: note: valid target CPU values are: -// ARM-SAME: arm2 +// ARM-SAME: arm8 Despite the triple being armv5, clang just prints every CPU it knows about. The arm8

[PATCH] D101554: [clangd] Add support for the `defaultLibrary` semantic token modifier

2021-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:436 + if (HB.inDefaultLibrary(D->getLocation())) +return HighlightingModifier::DefaultLibrary;

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. $ cat /tmp/test.s irg x0, x0 $ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a /tmp/test.s -o /dev/null /tmp/test.s: Assembler messages: /tmp/test.s:1: Error: selected processor does not support `irg x0,x0' GAS is also taking the

[PATCH] D102492: [clang][AST] Add support for BindingDecl to ASTImporter.

2021-06-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I like it, though I've found a nit. Comment at: clang/lib/AST/ASTImporter.cpp:2301 + ToD->setLexicalDeclContext(LexicalDC); + DC->addDeclInternal(ToD); + ToD->setBinding(ToType, ToBinding); Should we use rather `addDeclToContexts` ?

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1155-1156 -// TODO: Support SymbolCast. Support IntSymExpr when/if we actually -// start producing them. vsavchenko wrote: > Do we actually produce

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-02 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/test/Analysis/constant-folding.c:282 + if (a == UINT_MAX && b == UINT_MAX) { +clang_analyzer_eval((a + b) >= 0); // expected-warning{{FALSE}} + } manas wrote: > xazax.hun wrote: > > I think `UINT_MAX +

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-06-02 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 349199. DmitryPolukhin added a comment. Updated HeaderMapImpl::reverseLookupFilename according to the review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103142/new/

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. This revision is now accepted and ready to land. > This required adding quite a few additional includes, as many files were > relying on various things pulled in by ArrayRef.h. This is a _good_ thing btw! Thank you for driving this!

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf49cae278b4: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable (authored by mbenfield, committed by george.burgess.iv). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

RE: [EXTERNAL] [PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

2021-06-02 Thread Ten Tzen via cfe-commits
Hi, Alexandre Thank you for reporting this . From the callstack it does not seem related to this patch. Could you share the repro case @__compile.rsp temp.i with me? Thanks, --Ten -Original Message- From: Alexandre Ganea via Phabricator Sent: Tuesday, June 1, 2021 12:44 PM To: Ten

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. Thanks for dealing with this @nikic For this refactor, keeping the implementation as close to the existing one makes more sense; also personally I'd prefer the missing include fixups to be committed first as NFCs but its up to you.

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. I think there is a false positive with this @george.burgess.iv: In [this)(https://searchfox.org/mozilla-central/source/mozglue/baseprofiler/core/platform-linux-android.cpp#222-227) we have the warning triggered:

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D100581#2792854 , @Abpostelnicu wrote: > I think there is a false positive with this @george.burgess.iv: > In this >

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: llvm/include/llvm/ADT/ArrayRef.h:595-600 + if (RHS.data() == getEmptyKey().data()) +return LHS.data() == getEmptyKey().data(); + if (RHS.data() == getTombstoneKey().data()) +return LHS.data() ==

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/include/llvm/ADT/ArrayRef.h:595-600 + if (RHS.data() == getEmptyKey().data()) +return LHS.data() == getEmptyKey().data(); + if (RHS.data() == getTombstoneKey().data()) +return LHS.data() ==

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Chris Lattner via Phabricator via cfe-commits
lattner added inline comments. Comment at: llvm/include/llvm/ADT/ArrayRef.h:595-600 + if (RHS.data() == getEmptyKey().data()) +return LHS.data() == getEmptyKey().data(); + if (RHS.data() == getTombstoneKey().data()) +return LHS.data() ==

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1155-1156 -// TODO: Support SymbolCast. Support IntSymExpr when/if we actually -// start producing them. vsavchenko wrote: > ASDenysPetrov wrote: > >

[PATCH] D101741: [clangd] Improve resolution of static method calls in HeuristicResolver

2021-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice! Thanks for the reminder on this one, I lost track of it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101741/new/

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-02 Thread Gerhard Gappmeier via Phabricator via cfe-commits
gergap updated this revision to Diff 349269. gergap added a comment. add new test for checking pointer alignment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103245/new/ https://reviews.llvm.org/D103245 Files: clang/docs/ReleaseNotes.rst

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Hello! There are still some false positives, for example this one is breaking the libc++ CI: https://buildkite.com/llvm-project/libcxx-ci/builds/3530#8679608a-200b-4a48-beb4-a9e9924a8848 Would it be possible to either fix this quickly or revert the change until the

[PATCH] D102822: [Clang][CodeGen] Set the size of llvm.lifetime to unknown for scalable types.

2021-06-02 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102822/new/ https://reviews.llvm.org/D102822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. The following things are now done: - `trackExpressionValue` must receive a callback - The callback must be passed to a visitor (`ReturnVisitor` for now) I still don't know a good way to test the following: - Tests to verify that `ReturnVisitor` actually does what we

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D100581#2793775 , @ldionne wrote: > Hello! There are still some false positives, for example this one is breaking > the libc++ CI: >

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-02 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo added a comment. Thanks folks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103087: [clang-tidy] performances-unnecessary-* checks: Extend isOnlyUsedAsConst to expressions and catch const methods returning non-const references/pointers.

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I have some concerns about the cost of this checks as it used matching over entire contexts quite extensively. At this point, the facilities involved seem quite close to doing dataflow analysis and I wonder if you might be better off with a very different

[PATCH] D103526: [clang][deps] Mark modular deps to file deps if they come from PCH

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a translation unit uses a PCH and imports the same modules, we'd prefer to resolve

[PATCH] D102782: Add support for Warning Flag "-Wstack-usage="

2021-06-02 Thread Ryan Santhirarajan via Phabricator via cfe-commits
rsanthir.quic updated this revision to Diff 349274. rsanthir.quic added a comment. Updated Release Notes and rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102782/new/ https://reviews.llvm.org/D102782 Files: clang/docs/ReleaseNotes.rst

[PATCH] D103131: support debug info for alias variable

2021-06-02 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D103131#2792364 , @dblaikie wrote: > I will say, as the person who implemented DW_TAG_imported_declaration support > in Clang - it's a bit not great/unfortunate (in part because we currently > have to emit them for all

[PATCH] D103039: [AST] fully-qualify template args of outer types in getFullyQualifiedType

2021-06-02 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine accepted this revision. saugustine added a comment. This revision is now accepted and ready to land. This is a long-standing bug that needed to be fixed. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103039/new/

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103317#2793781 , @ASDenysPetrov wrote: > In D103317#2793658 , @vsavchenko > wrote: > >> But the problem it is generally not one-to-one relationship, so `x -> y1 + >> 1`, `x ->

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Thanks for adding the tests.  Comment at: clang/unittests/Format/FormatTest.cpp:15095 + Alignment)); + // variables are aligned at their name, pointers are at the right most + // position Nit: Comments should

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno 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/D103142/new/ https://reviews.llvm.org/D103142 ___

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D103317#2793658 , @vsavchenko wrote: > But the problem it is generally not one-to-one relationship, so `x -> y1 + > 1`, `x -> y2 + 2`, ... , `x -> yN + N`. In my approach it can't be more then one binding for one

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 349295. RedDocMD added a comment. trackExpressionValue recieving callback, passing it to ReturnVisitor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103434/new/ https://reviews.llvm.org/D103434 Files:

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349299. feg208 added a comment. I am of the view that this is complete. Or at a minimum all the tests that have been requested pass and I would be surprised if there were gross errors or other major things I have missed Repository: rG LLVM Github Monorepo

[PATCH] D102849: [flang][driver] Add support for the "-init-only" option

2021-06-02 Thread Stuart Ellis via Phabricator via cfe-commits
stuartellis updated this revision to Diff 349307. stuartellis added a comment. Address review comments Renaming InitializationOnly to InitOnly Add missing line in init-only.f90 Updating commit message with init-only/test-io comparison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D100581#2793926 , @dblaikie wrote: > In D100581#2793775 , @ldionne wrote: > >> Hello! There are still some false positives, for example this one is >> breaking the libc++ CI: >>

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-02 Thread Gerhard Gappmeier via Phabricator via cfe-commits
gergap added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14921 + verifyFormat("unsigned int *a;\n" + "int*b;\n" "unsigned int Const *c;\n" curdeius wrote: > HazardyKnusperkeks wrote: > >

[PATCH] D103527: [Clang][RISCV] Implement vlseg and vlsegff.

2021-06-02 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai created this revision. HsiangKai added reviewers: frasercrmck, craig.topper, rogfer01. Herald added subscribers: StephenFan, vkmr, dexonsmith, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones,

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D103317#2793797 , @vsavchenko wrote: > Hmm, Okay, but what about situations if you have: `a = a1 + a2` and `a = a3 + > a4 + a5` are you going to throw away one of these constraints? And if so, how > do you want to

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:657-667 + // Certain kinds unfortunately need to be side-stepped for canonical type + // matching. + if (LType->getAs() || RType->getAs()) { +//

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103317#2793911 , @ASDenysPetrov wrote: > In D103317#2793797 , @vsavchenko > wrote: > >> Hmm, Okay, but what about situations if you have: `a = a1 + a2` and `a = a3 >> + a4 + a5`

[PATCH] D102782: Add support for Warning Flag "-Wstack-usage="

2021-06-02 Thread Ryan Santhirarajan via Phabricator via cfe-commits
rsanthir.quic added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102782/new/ https://reviews.llvm.org/D102782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Nice! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D101554: [clangd] Add support for the `defaultLibrary` semantic token modifier

2021-06-02 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:436 + if (HB.inDefaultLibrary(D->getLocation())) +return HighlightingModifier::DefaultLibrary; const DeclContext *DC =

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:97 + // Search the whole function body for decl statements of the initialization + // variable not just the current block statement. auto Matches =

[clang] 369c648 - [clang] Implement the using_if_exists attribute

2021-06-02 Thread Louis Dionne via cfe-commits
Author: Erik Pilkington Date: 2021-06-02T10:30:24-04:00 New Revision: 369c64839946d89cf5697550b6feeea031b2f270 URL: https://github.com/llvm/llvm-project/commit/369c64839946d89cf5697550b6feeea031b2f270 DIFF:

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-02 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 349225. manas added a comment. Fixed test cases expecting wrong assertions and added few more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files:

[PATCH] D103461: [clang][deps] NFC: Do not adjust the original action

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 349229. jansvoboda11 added a comment. Fix whitespace around fixme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103461/new/ https://reviews.llvm.org/D103461 Files:

[PATCH] D103461: [clang][deps] NFC: Do not adjust the original action

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D103461#2791760 , @dexonsmith wrote: > Is there (or could there be) a mode where `clang-scan-deps` prints out the > command-lines it sends to the dependency scanning action (maybe instead of > actually scanning), so

[PATCH] D103511: [clang-tidy] Special member functions check should allow sole dtors by default

2021-06-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D103511#2793291 , @aaron.ballman wrote: > I think the C++ Core Guideline wording is... confusing. The rule title is > `C.21: If you define or =delete any copy, move, or destructor function, > define or =delete them all`,

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Have you tried running this over any large C++ code bases to see how often the diagnostics trigger and whether there are false positives? If not, you should probably do so -- one concern I have is with a private virtual destructor; I could imagine people using

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14921 + verifyFormat("unsigned int *a;\n" + "int*b;\n" "unsigned int Const *c;\n" HazardyKnusperkeks wrote: > MyDeveloperDay

[PATCH] D103511: [clang-tidy] Special member functions check should allow sole dtors by default

2021-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think the C++ Core Guideline wording is... confusing. The rule title is `C.21: If you define or =delete any copy, move, or destructor function, define or =delete them all`, which I take literally. Using `= default` defines the function, so: struct S {

[PATCH] D103516: [clang][deps] Customize PCM path via -build-dir argument

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Dependency scanning currently performs an implicit build. When testing that the

[PATCH] D102488: [clang][deps] Prune unused header search paths

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:374 + /// (potentially modified) context hash. + std::string constructPCMPath(const ModuleDeps ) const { +const std::string = MD.ImplicitModulePCMPath; This

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Returning to the discussion raised in D102696 , I'd like to share my vision. I think we can use much easier approach to use valid constraints at any point of time. The main idea is lazy-reasoning of the ranges. This approach: -

[clang] 61c65d8 - Fix comments in test cuda-kernel-call.cu

2021-06-02 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2021-06-02T10:21:26-04:00 New Revision: 61c65d8e4a29610bd1ab498eba8f892ffc0af023 URL: https://github.com/llvm/llvm-project/commit/61c65d8e4a29610bd1ab498eba8f892ffc0af023 DIFF:

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1155-1156 -// TODO: Support SymbolCast. Support IntSymExpr when/if we actually -// start producing them. ASDenysPetrov wrote: > vsavchenko wrote: > > Do

[PATCH] D103082: [AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics

2021-06-02 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 349241. bsmith retitled this revision from "[AArch64][SVE] Optimize svbool dupq ACLE intrinsic to fixed predicate patterns" to "[AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics". bsmith edited the summary of this revision. bsmith added a comment.

[PATCH] D102180: [Clang][OpenMP] Emit dependent PreInits before directive.

2021-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102180/new/ https://reviews.llvm.org/D102180

[PATCH] D101554: [clangd] Add support for the `defaultLibrary` semantic token modifier

2021-06-02 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 349259. dgoldman marked an inline comment as done. dgoldman added a comment. Add `isDefaultLibrary(const Type *)` and support auto/decl types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101554/new/

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-02 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 349261. martong marked 3 inline comments as done. martong added a comment. - Add isEqualTo and simplify members to EquivalenceClass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103314/new/

[PATCH] D103524: [clang][deps] Handle precompiled headers' AST files

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `PreprocessOnlyAction` doesn't support loading the AST file of a

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-02 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1559 + // absolute minimum. + LLVM_NODISCARD ProgramStateRef simplifyEquivalenceClass( + ProgramStateRef State, EquivalenceClass

[clang-tools-extra] 2f951ca - [clangd] Add support for the `defaultLibrary` semantic token modifier

2021-06-02 Thread David Goldman via cfe-commits
Author: David Goldman Date: 2021-06-02T10:24:29-04:00 New Revision: 2f951ca98b7a12fed7ac4ebf790a0fbabc02d80b URL: https://github.com/llvm/llvm-project/commit/2f951ca98b7a12fed7ac4ebf790a0fbabc02d80b DIFF: https://github.com/llvm/llvm-project/commit/2f951ca98b7a12fed7ac4ebf790a0fbabc02d80b.diff

[PATCH] D101554: [clangd] Add support for the `defaultLibrary` semantic token modifier

2021-06-02 Thread David Goldman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. dgoldman marked an inline comment as done. Closed by commit rG2f951ca98b7a: [clangd] Add support for the `defaultLibrary` semantic token modifier (authored by

[PATCH] D99459: [OpenMP] Implement '#pragma omp unroll'.

2021-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:907 + /// \param C Context of the AST. + /// \param Loc Location of the 'full' identifier. + static OMPFullClause *Create(const ASTContext , SourceLocation StartLoc, Fix

[PATCH] D90188: Add support for attribute 'using_if_exists'

2021-06-02 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG369c64839946: [clang] Implement the using_if_exists attribute (authored by erik.pilkington, committed by ldionne). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1155-1156 -// TODO: Support SymbolCast. Support IntSymExpr when/if we actually -// start producing them. ASDenysPetrov wrote: > vsavchenko wrote: > >

[PATCH] D103519: [clang][deps] Support object files

2021-06-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: mgorny. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a project uses PCH with explicit modules, the

[PATCH] D102175: [clang-tidy] performance-unnecessary-copy-initialization: Remove the complete statement when the copied variable is unused.

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:541 Orig.constMethod(); + UnnecessaryCopy.constMethod(); }

[PATCH] D103317: [Analyzer][engine][solver] Simplify complex constraints

2021-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103317#2793557 , @ASDenysPetrov wrote: > Returning to the discussion raised in D102696 > , I'd like to share my vision. > I think we can use much easier approach to use valid constraints

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: ahatanak. rjmccall added a comment. Hmm. CC'ing Akira. Akira, do you know why we're building a fake FunctionDecl as part of emitting these helper functions? Is it something we can avoid? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103476: [clangd] TUScheduler uses last active file for file-less queries

2021-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks, and sorry for the long journey to get here :-) Comment at: clang-tools-extra/clangd/TUScheduler.cpp:1542 Semaphore ) { +

[PATCH] D103028: [clang][ARM] Remove arm2/3/6/7m CPU names

2021-06-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D103028/new/ https://reviews.llvm.org/D103028

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-06-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I don't know know why these fake FunctionDecls are needed, but it looks like it's okay to avoid creating them. I see a few debug info tests failing if `GlobalDecl()` instead of a fake function is passed to `StartFunction`, but it looks like the test check strings

[PATCH] D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. I think this may need to be about the last thing to actually land. It shouldn't land before building the runtime reliably works without error, and I think we should land any refactoring

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D98799#2794366 , @ahatanak wrote: > I don't know know why these fake FunctionDecls are needed, but it looks like > it's okay to avoid creating them. I see a few debug info tests failing if > `GlobalDecl()` instead of a fake

[clang] 8beaca8 - Remove unused function from a previous iteration of unique-stable-name

2021-06-02 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2021-06-02T12:15:16-07:00 New Revision: 8beaca8c1493f576431c3687329860e918616cd9 URL: https://github.com/llvm/llvm-project/commit/8beaca8c1493f576431c3687329860e918616cd9 DIFF: https://github.com/llvm/llvm-project/commit/8beaca8c1493f576431c3687329860e918616cd9.diff

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. > As for supporting it in DWARF, probably with a custom attribute > (DW_AT_BTF_annotation? (or "LLVM" instead of "BTF" perhaps, I'm not sure)) > with a standard form (DW_FORM_strp/strxN/etc - the usual way we emit strings). This is a good idea. Could you give

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd0e159334f9d: Add matchers for gtests ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL (authored by zhaomo, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] d0e1593 - Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-06-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: Zhaomo Yang Date: 2021-06-02T17:28:14Z New Revision: d0e159334f9d1285ec35cf71465358c47141618c URL: https://github.com/llvm/llvm-project/commit/d0e159334f9d1285ec35cf71465358c47141618c DIFF: https://github.com/llvm/llvm-project/commit/d0e159334f9d1285ec35cf71465358c47141618c.diff LOG:

[PATCH] D103538: [clangd] Run code completion on each token coverd by --check-lines

2021-06-02 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. In --check mode we do not run code completion because it is

[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)

2021-06-02 Thread Chris Lattner via Phabricator via cfe-commits
lattner added inline comments. Comment at: llvm/include/llvm/ADT/ArrayRef.h:595-600 + if (RHS.data() == getEmptyKey().data()) +return LHS.data() == getEmptyKey().data(); + if (RHS.data() == getTombstoneKey().data()) +return LHS.data() ==

[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD marked 7 inline comments as done. RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:258 + const Decl *D = DS->getSingleDecl(); + assert(D && "DeclStmt should have at least one Decl"); + const auto *VD =

[PATCH] D100308: [clangd] Drop optional on ExternalIndexSpec

2021-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Sorry about delay. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:555 + case Config::ExternalIndexSpec::None: +

[PATCH] D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, charco. leonardchan added a project: Sanitizers. Herald added subscribers: mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This allows for hwasan to be built

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, charco. leonardchan added a project: Sanitizers. Herald added subscribers: mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This disables use of hwasan

[PATCH] D103495: [static initializers] Don't put ordered dynamic initializers of static variables into global_ctors

2021-06-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: aeubanks, hans, rsmith. rnk added a comment. +@rsmith @hans @aeubanks I think this would be an unfortunate code size and startup time regression for Itanium C++ inline variables. The existing code was written under the assumption that vague linkage (GVA_DiscardableODR)

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: compiler-rt/lib/hwasan/CMakeLists.txt:45 +if (NOT FUCHSIA) + append_list_if(COMPILER_RT_HWASAN_WITH_INTERCEPTORS HWASAN_WITH_INTERCEPTORS=1 HWASAN_DEFINITIONS) +else() It might be better to force the value of

[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. Important question from @vsavchenko: > I have two major questions about this implementation: > > - Why don't we need an actual check for `IfStmt`? Won't it trigger on `bool > unused = !pointer;`? And if so it won't mean **constrained**. > - Why do we only care about

[PATCH] D99540: [clangd] Preserve diags between tweak enumeration and execution

2021-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry I've lost my context - did we decide to move forward with this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99540/new/ https://reviews.llvm.org/D99540 ___

[PATCH] D103547: Don't delete the module you're inspecting

2021-06-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: steven_wu, arphaman. beanz requested review of this revision. Herald added a project: clang. Prior to this patch when you used `clang -module-file-info` clang would delete the module on completion because the module was treated as an output

  1   2   >