[PATCH] D94355: [SimplifyCFG] Add relative switch lookup tables

2021-01-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D94355#2531504 , @gulfem wrote: > In D94355#2530225 , @lebedev.ri > wrote: > >> Can you please add an explanation to the patch's description as to why >> we don't want to instead conv

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-30 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM. Could you please give us a link to the failing test in Polly? May be GitHub or buildbot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92257/new/ https://reviews.llvm.org/D92257 ___

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#2532071 , @curdeius wrote: > LGTM. Could you please give us a link to the failing test in Polly? May be > GitHub or buildbot. No problem: http://lab.llvm.org:8011/#builders/10/builds/2294 Repository: rG

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. My advice leave it out of the release, the next release comes round pretty quickly. This gives us 6 months of people who use the snapshots to iron out any issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/

Re: [PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-30 Thread MyDeveloper Day via cfe-commits
I have a script that runs clang-format -n on various directories in clang that are clang format clean, polly is one of them because they have clang format as a unit test I use this to ensure I don’t regress behaviour Maybe we should formalise this with some sort of clang-format-check cmake rule

[PATCH] D95532: [clang][cli] Use variadic macros for parsing/generating

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Reverted this, because we're hitting weird preprocessor behavior in MSVC 2017. `__VA_ARGS__` form a single preprocessing token that cannot be expanded into the original arguments, in our case `PREFIX_TYPE`, `NAME`, `ID`, etc. Repository: rG LLVM Github Monorepo

[PATCH] D94355: [SimplifyCFG] Add relative switch lookup tables

2021-01-30 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. First of all, I find this patch to be nearly impossible to read. It seems to mix a lot of refactoring with a functional change, making it very hard to focus on the core. The main difference to the jump table logic is that the latter knows that all referenced addresses ar

[PATCH] D95735: [ASTMatchers] Fix matching after generic top-level matcher

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With a matcher like expr(anyOf(integerLiteral(equals(42)), unless(expr( and code such as st

[clang] 7912508 - [ASTMatchers] Fix traversal below range-for elements

2021-01-30 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-01-30T13:47:14Z New Revision: 79125085f16540579d27c7e4987f63eef9c4aa23 URL: https://github.com/llvm/llvm-project/commit/79125085f16540579d27c7e4987f63eef9c4aa23 DIFF: https://github.com/llvm/llvm-project/commit/79125085f16540579d27c7e4987f63eef9c4aa23.diff LOG:

[PATCH] D95562: [ASTMatchers] Fix traversal below range-for elements

2021-01-30 Thread Stephen Kelly 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 rG79125085f165: [ASTMatchers] Fix traversal below range-for elements (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] bb57a34 - Fix traversal with hasDescendant into lambdas

2021-01-30 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-01-30T13:57:41Z New Revision: bb57a3422a09dcdd572ccb42767a0dabb5f966dd URL: https://github.com/llvm/llvm-project/commit/bb57a3422a09dcdd572ccb42767a0dabb5f966dd DIFF: https://github.com/llvm/llvm-project/commit/bb57a3422a09dcdd572ccb42767a0dabb5f966dd.diff LOG:

[PATCH] D95607: Fix traversal with hasDescendant into lambdas

2021-01-30 Thread Stephen Kelly 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 rGbb57a3422a09: Fix traversal with hasDescendant into lambdas (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-01-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added a reviewer: aaron.ballman. whisperity added projects: clang, clang-tools-extra. Herald added subscribers: martong, gamesh411, Szelethus, rnkovacs, xazax.hun. whisperity requested review of this revision. The base patch only deals with strict (cano

[PATCH] D95655: [AArch64] Adding Neon Sm3 & Sm4 Intrinsics

2021-01-30 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea accepted this revision. labrinea added a comment. This revision is now accepted and ready to land. LGTM, thanks @rsanthir.quic ! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95655/new/ https://reviews.llvm.org/D95655 ___ cfe-commits

[PATCH] D95737: [NFC][Docs] Fix RAVFrontendAction doc's CMakelists.txt for Shared build

2021-01-30 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta created this revision. xgupta added reviewers: awarzynski, stephenkelly. xgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Example tutorial giving undefine reference error wh

[PATCH] D93800: [clangd][WIP] Add caching behaviour for clang-format config

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 320301. njames93 added a comment. Refactor alot of the implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93800/new/ https://reviews.llvm.org/D93800 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D95739: [ASTMatchers] Add matchers for decomposition decls

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95739 Files: clang/include/clang/A

[PATCH] D95740: [ASTMatchers] Ignore parts of BindingDecls which are not spelled in source

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, alexfh. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95740 Files: clang/include/clang/A

[clang] b10d445 - [ASTMatchers] Fix definition of decompositionDecl

2021-01-30 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-01-30T16:29:40Z New Revision: b10d445307a0f3c7e5522836b4331090aacaf349 URL: https://github.com/llvm/llvm-project/commit/b10d445307a0f3c7e5522836b4331090aacaf349 DIFF: https://github.com/llvm/llvm-project/commit/b10d445307a0f3c7e5522836b4331090aacaf349.diff LOG:

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I wonder if we should consider suggesting a different type of tool for clang `clang-reformat` A place where changes such as this and east/west fixer could be actively encouraged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-01-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:995 TEST_F(FormatTest, ForEachLoops) { verifyFormat("void f() {\n" + " foreach (Item *item, itemlist) {\n" GoBigorGoHome wrote: > MyDeveloperDay wrote: > >

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-01-30 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 320306. arnamoy10 added a comment. Addressing reviewers' comments, adding `-module-dir` as the default option instead of `-J` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95448/new/ https://reviews.llvm.org/D95448 Files: clang/include/clang/D

[PATCH] D95714: clang-tidy: modernize-use-nullptr mistakenly fixes rewritten spaceship operator comparisons

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thanks for looking at this, its been on my todo list for long time. Regarding the hasGrandparent idea, that could be recreated with `hasParent(expr(hasParent(cxxRewrittenBinaryOperator(` Though looking at the (trimmed) AST I'm not sure that's enough. Appears to have

[PATCH] D95726: clang-tidy: modernize-use-nullptr mistakenly fixes rewritten spaceship operator comparisons - hasGrandparent version

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 requested changes to this revision. njames93 added a comment. This revision now requires changes to proceed. Not a fan of this approach, as pointed out in D95714 the `hasGrandparent` functionality can be achieved by chaining `hasParent` calls. Reposit

[PATCH] D93800: [clangd] Add caching behaviour for clang-format config

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 320309. njames93 added a comment. Tests pass on my machine, rebasing on main and trigger a fresh rebuild. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93800/new/ https://reviews.llvm.org/D93800 Files: clan

[PATCH] D95726: clang-tidy: modernize-use-nullptr mistakenly fixes rewritten spaceship operator comparisons - hasGrandparent version

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire requested changes to this revision. steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3451 +internal::TypeList> +hasGrandparent; + I agree with @njames93 that we shouldn't introduce this matcher. Reposito

[PATCH] D95726: clang-tidy: modernize-use-nullptr mistakenly fixes rewritten spaceship operator comparisons - hasGrandparent version

2021-01-30 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. Thanks for the quick feedback everyone. I agree too, withdrawing this in favor of https://reviews.llvm.org/D95714. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95726/new/ https://reviews.llvm.org/D95726

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Hmm, interesting idea. Do you have anything more precise in mind? Would it be an "augmented" clang-format? I.e. it will have all its options and some additional ones? Or rather more independent tool? Or clang-format's experimental field? Repository: rG LLVM Github

[PATCH] D95583: Frontend: Add -f{, no-}implicit-modules-uses-lock and -Rmodule-lock

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/Modules/implicit-modules-use-lock.m:21 + +// CHECK-NO-LOCKS-NOT: remark: +// CHECK-LOCKS: remark: locking '{{.*}}.pcm' to build module

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 320315. jansvoboda11 added a comment. Create proper diagnostics, add remark tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files: clang/include/clang/Basi

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:684-685 + if (!GeneratedStringsEqual) +llvm::report_fatal_error("Mismatch between arguments generated during " + "round-trip"); + dexonsmith

[PATCH] D95745: Support unwinding from inline assembly

2021-01-30 Thread Paul via Phabricator via cfe-commits
cynecx created this revision. cynecx added reviewers: LLVM, clang. cynecx added projects: LLVM, clang. Herald added a reviewer: deadalnix. Herald added subscribers: dexonsmith, hiraditya. cynecx requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin. I have

[PATCH] D95745: Support unwinding from inline assembly

2021-01-30 Thread Paul via Phabricator via cfe-commits
cynecx added a comment. Tests are missing right now. But I'd like to get some feedback first whether this approach goes in the right direction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95745/new/ https://reviews.llvm.org/D95745 _

[PATCH] D95746: clang: Exclude efi_main from -Wmissing-prototypes

2021-01-30 Thread Daan De Meyer via Phabricator via cfe-commits
DaanDeMeyer created this revision. DaanDeMeyer added a reviewer: clang. DaanDeMeyer added a project: clang. DaanDeMeyer requested review of this revision. Herald added a subscriber: cfe-commits. When compiling UEFI applications, the main function is named efi_main() instead of main(). Let's exclud

[PATCH] D93800: [clangd] Add caching behaviour for clang-format config

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 320319. njames93 added a comment. Hopefully fix the build failing. ASAN said it was a use-after-scope issue which seemed suspicious. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93800/new/ https://reviews.ll

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95168#2532258 , @MyDeveloperDay wrote: > I wonder if we should consider suggesting a different type of tool for clang > > `clang-reformat` > > A place where changes such as this and east/west fixer could be actively > encour

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. The idea has been floated to create a new different tool for changes like this (see eg D95168 ). I don't think this should be done. These kinds of things should be in clang-format. One of the advantages of this and east/west const being

[PATCH] D95665: [Builtins][FIX] Allow targets to opt-out of `long double` builtins

2021-01-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. I guess this doesn't work then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95665/new/ https://reviews.llvm.org/D95665 ___ cfe-commits mail

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D95168#2532410 , @steveire wrote: > In D95168#2532258 , @MyDeveloperDay > wrote: > >> I wonder if we should consider suggesting a different type of tool for clang >> >> `clang-reformat`

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-01-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D95168#2532458 , @curdeius wrote: > In D95168#2532410 , @steveire wrote: > >> In D95168#2532258 , @MyDeveloperDay >> wrote: >> >>> I wonder if w

[PATCH] D95714: [clang-tidy] fix modernize-use-nullptr false positive with spaceship operator comparisons

2021-01-30 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc updated this revision to Diff 320330. poelmanc added a comment. Thanks to the great feedback, changed `unless(hasAncestor(cxxRewrittenBinaryOperator()))` to `unless(hasParent(expr(hasParent(cxxRewrittenBinaryOperator()` and added a test to verify the improvement (and removed an ext

[PATCH] D95714: [clang-tidy] fix modernize-use-nullptr false positive with spaceship operator comparisons

2021-01-30 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. @njames93 Thank you so much for the quick feedback, I made your suggested changes and added a test that it properly converts `result = (a1 > (ptr == 0 ? a1 : a2));` to `result = (a1 > (ptr == nullptr ? a1 : a2));` now. In these examples so far, checking the grandparent

[PATCH] D93800: [clangd] Add caching behaviour for clang-format config

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 320333. njames93 added a comment. Small fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93800/new/ https://reviews.llvm.org/D93800 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd

[PATCH] D95753: [CoverageMapping] Don't absolutize source paths

2021-01-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: vsk, davidxl. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We currently always absolutize paths in coverage mapping. This is problematic for reproducibility and it poses a prob

[PATCH] D95753: [CoverageMapping] Don't absolutize source paths

2021-01-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @vsk @davidxl I'd be interested in your opinion. I've made this change unconditionally to match the compiler behavior in cases like debug info or `__FILE__` expansion, but I'm also happy to conditionalize it on a flag (for example `-f[no]-coverage-mapping-abspath`) if yo

[PATCH] D95702: [AIX] Improve option processing for mabi=vec-extabi and mabi=vec=defaul

2021-01-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95702/new/ https://reviews.llvm.org/D95702

[PATCH] D95714: [clang-tidy] fix modernize-use-nullptr false positive with spaceship operator comparisons

2021-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D95714#2532516 , @poelmanc wrote: > @njames93 Thank you so much for the quick feedback, I made your suggested > changes and added a test that it properly converts `result = (a1 > (ptr == 0 > ? a1 : a2));` to `result = (a1 > (

[PATCH] D93023: Replace deprecated %T in 2 tests.

2021-01-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93023/new/ https://reviews.llvm.org/D93023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-01-30 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar requested review of this revision. Herald added a project: clang. Previously, -fshow-overloads=best always showed 4 candidates. The problem is, when this isn't enough, you're kind of up a creek; the only option available is to recompile with different flags.