[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-03-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. @sammccall ping. Updated as you mentioned in D97265#2581653 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97265/new/ https://reviews.llvm.org/D97265 ___ cfe-commits mail

[PATCH] D98688: [-Wcalled-once-parameter] Harden analysis in terms of block use

2021-03-17 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/SemaObjC/warn-called-once.m:861 // We consider captures by blocks as escapes - [self indirect_call:(^{ + [self indirect_call:(^{ // expected-note{{previous call is here}} callback(); NoQ wro

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-17 Thread JunMa via Phabricator via cfe-commits
junparser added a comment. In D98638#2630786 , @lxfind wrote: > Well, I guess another potential solution is to force emitting lifetime > intrinsics for this part of coroutine in the front-end. > Like this: > > diff --git a/clang/lib/CodeGen/CGDecl.cpp b

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

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 331469. RedDocMD added a comment. Added some more positive tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrChe

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

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. > Does the following test work? @NoQ, it seems to be working. > So you're saying that simply by always tracking the (final) raw pointer value > and checking whether the raw value is interesting upon .get() you dodge the > communication problem entirely I would not sa

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

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 331461. RedDocMD added a comment. Added a negative test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrChecker.cpp

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

2021-03-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. By tracking the call-expression you're basically tracking the raw pointer value because that's what operators `*` and `->` return. Of course operator `*` returns an lvalue reference rather than a pointer but we don't make a difference when it comes to `SVal` representation.

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Xun, great to see more improvements in this area. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:221 CGF.EmitBlock(RealSuspendBlock); + } else if (ForcestackStart) { +Builder.CreateCall( ChuanqiXu wrote: > lxfind wrote: > > Ch

[PATCH] D98741: [analyzer] Introduce common bug category "Unused code".

2021-03-17 Thread Artem Dergachev 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 rGc75b2261a0aa: [analyzer] Introduce common bug category "Unused code". (authored by dergachev.a). Herald added a project: clang. Repository: rG LLV

[clang] c75b226 - [analyzer] Introduce common bug category "Unused code".

2021-03-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2021-03-17T20:58:27-07:00 New Revision: c75b2261a0aada6bf7ddd91f91139c6f06a8e367 URL: https://github.com/llvm/llvm-project/commit/c75b2261a0aada6bf7ddd91f91139c6f06a8e367 DIFF: https://github.com/llvm/llvm-project/commit/c75b2261a0aada6bf7ddd91f91139c6f06a8e367.dif

[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen marked an inline comment as done. khchen added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:700 +for (auto Idx : CTypeOrder) { + if (Seen.count(Idx)) +PrintFatalError( craig.topper wrote: > You can use > > ``` > if

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG95c0125f2bc6: [Clang][RISCV] Add rvv vsetvl and vsetvlmax intrinsic functions. (authored by khchen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96843/new/

[clang] 95c0125 - [Clang][RISCV] Add rvv vsetvl and vsetvlmax intrinsic functions.

2021-03-17 Thread Zakk Chen via cfe-commits
Author: Zakk Chen Date: 2021-03-17T20:26:06-07:00 New Revision: 95c0125f2bc610d9c51d4fbdd1144fcab40f3b51 URL: https://github.com/llvm/llvm-project/commit/95c0125f2bc610d9c51d4fbdd1144fcab40f3b51 DIFF: https://github.com/llvm/llvm-project/commit/95c0125f2bc610d9c51d4fbdd1144fcab40f3b51.diff LOG

[PATCH] D97916: [Driver][RISCV] Support parsing multi-lib config from GCC.

2021-03-17 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 331448. kito-cheng added a comment. ChangeLog: - Add more verbose message during reading GCC multilib configuration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97916/new/ https://reviews.llvm.org/D97916

[PATCH] D98688: [-Wcalled-once-parameter] Harden analysis in terms of block use

2021-03-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great, thanks!! Comment at: clang/test/SemaObjC/warn-called-once.m:861 // We consider captures by blocks as escapes - [self indirect_call:(^{ + [self indirect_call:(^{ // expe

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-03-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. To be clear, what I'm trying to say is that — absent consensus that it's a major architecture shift is appropriate — we need to consider what functionality is reasonably achievable without it. I'm sure that covers most of what you're trying to do; it just may not incl

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-03-17 Thread Tiago Macarios via Phabricator via cfe-commits
tiagoma added a comment. Herald added a subscriber: shchenz. Can we get this in? I work in Microsoft Office and we have been using this checker and it works great! There are a couple of issues with it and I would like to contribute fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2631042 , @lebedev.ri wrote: > The ongoing special-casing of `X86_AMXTy` through the llvm due to the > inability of the existing backend passes to handle certain llvm ir constructs. We have bring up it to llvm-de

[clang] d672d52 - Revert "[CodeGenModule] Set dso_local for Mach-O GlobalValue"

2021-03-17 Thread Alex Lorenz via cfe-commits
Author: Alex Lorenz Date: 2021-03-17T17:27:41-07:00 New Revision: d672d5219a72d2e13dcc257116876d41955e36b2 URL: https://github.com/llvm/llvm-project/commit/d672d5219a72d2e13dcc257116876d41955e36b2 DIFF: https://github.com/llvm/llvm-project/commit/d672d5219a72d2e13dcc257116876d41955e36b2.diff L

[PATCH] D98458: Revert "[CodeGenModule] Set dso_local for Mach-O GlobalValue"

2021-03-17 Thread Alex Lorenz 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 rGd672d5219a72: Revert "[CodeGenModule] Set dso_local for Mach-O GlobalValue" (authored by arphaman). Changed prior to commit: https://reviews.llvm.

[clang] 3315bd0 - PR49619: Remove delayed call to noteFailed.

2021-03-17 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2021-03-17T17:25:18-07:00 New Revision: 3315bd0beb4cf23f838bd522a1f0e3fcc0a9fae2 URL: https://github.com/llvm/llvm-project/commit/3315bd0beb4cf23f838bd522a1f0e3fcc0a9fae2 DIFF: https://github.com/llvm/llvm-project/commit/3315bd0beb4cf23f838bd522a1f0e3fcc0a9fae2.diff

[PATCH] D98814: [CUDA][HIP] Mark device var used by host only

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:1102 + Info.D->isUsed() && !Info.D->hasAttr()) { +CGM.addCompilerUsedGlobal(Info.Var); + } Do we want to limit it further to only externally-visible variables? I think we

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D98783#2632244 , @yaxunl wrote: > In D98783#2632143 , @tra wrote: > >> Shouldn't the unused ASCs be eliminated by DCE? We seem to be cleaning up >> the consequences of a problem that happe

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331413. steveire added a comment. Herald added a subscriber: mgorny. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98775/new/ https://reviews.llvm.org/D98775 Files: clang/include/clang/Tooling/NodeIn

[PATCH] D98827: [AST] Ensure that an empty json file is generated if compile errors

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. 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/D98827 Files: clang/lib/Tooling/DumpTool/ASTSrc

[PATCH] D98824: [Tooling] Handle compilation databases with clang-cl commands generated by CMake 3.19+

2021-03-17 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/lib/Tooling/InterpolatingCompilationDatabase.cpp:181 + // ...including when the inputs are passed after -- + if (Opt.matches(OPT__DASH_DASH)) { +continue; You can leave out the braces on a one-line

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-17 Thread Richard Smith - zygoloid 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 rGa875721d8a2d: PR49585: Emit the jump destination for a for loop 'continue' from within the… (authored by rsmith). Repository: rG LLVM Github Monor

[clang] a875721 - PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-17 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2021-03-17T16:24:04-07:00 New Revision: a875721d8a2dacb894106a2cefa18828bf08f25d URL: https://github.com/llvm/llvm-project/commit/a875721d8a2dacb894106a2cefa18828bf08f25d DIFF: https://github.com/llvm/llvm-project/commit/a875721d8a2dacb894106a2cefa18828bf08f25d.diff

[PATCH] D98815: [OPENMP51]Initial support for the use clause

2021-03-17 Thread Mike Rice via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc615927c8e38: [OPENMP51]Initial support for the use clause. (authored by mikerice). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SI

[clang] c615927 - [OPENMP51]Initial support for the use clause.

2021-03-17 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2021-03-17T15:46:14-07:00 New Revision: c615927c8e38d8608d7b5fa294a25dc44df0eb68 URL: https://github.com/llvm/llvm-project/commit/c615927c8e38d8608d7b5fa294a25dc44df0eb68 DIFF: https://github.com/llvm/llvm-project/commit/c615927c8e38d8608d7b5fa294a25dc44df0eb68.diff LOG

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-17 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Well, that's certainly some bug. Patch LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98816/new/ https://reviews.llvm.org/D98816

[PATCH] D98824: [Tooling] Handle compilation databases with clang-cl commands generated by CMake 3.19+

2021-03-17 Thread Janusz Nykiel via Phabricator via cfe-commits
jnykiel created this revision. jnykiel added a reviewer: aganea. Herald added subscribers: usaxena95, kadircet, abidh. jnykiel requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. As of CMake commit https://gitlab.kitware.com/cmake

[PATCH] D74361: [Clang] Undef attribute for global variables

2021-03-17 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. This appears to have missed a case for openmp. Credit to @jdoerfert for the repro: https://godbolt.org/z/xWTYbv struct DST { long X; long Y; }; #pragma omp declare target DST G2 [[clang::loader_uninitialized, clang::address_space(5)]]; #prag

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG48ab9674b21b: [ASTMatchers][NFC] Use move semantics when passing matchers around. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98792

[clang] 48ab967 - [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2021-03-17T22:03:08Z New Revision: 48ab9674b21be2c6206ccc04602d4a3e4c812953 URL: https://github.com/llvm/llvm-project/commit/48ab9674b21be2c6206ccc04602d4a3e4c812953 DIFF: https://github.com/llvm/llvm-project/commit/48ab9674b21be2c6206ccc04602d4a3e4c812953.diff LOG:

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Note that this fixes a miscompile where we'd destroy a for loop condition variable twice when encountering a `continue` (once before the increment and again after). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98816/new/

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. rsmith requested review of this revision. Herald added a project: clang. The condition variable is in scope in the loop increment, so we need to emit the jump destination from wthin the scope of the condition variable. For GCC compa

[PATCH] D98814: [CUDA][HIP] Mark device var used by host only

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Add device variables to llvm.compiler.used if they are ODR-used by either host or device functions. This is necessary to prevent them from being eliminated by whole-program optimization where the

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-03-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D96033#2630978 , @v.g.vassilev wrote: >>> I'm nervous in general about the looming idea of declaration unloading, but >>> the fact that it's been working in Cling for a long time gives me some >>> confidence that we can do t

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-17 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. Before this patch, clang would happily ignore a `-ffree-form` flag. With this patch, none of `-Wno-error=unknown-argument`, `-Wno-unknown-argument` , `-Qunused-arguments` help to avoid clang from exiting with error: unknown argument: '-ffree-form' Why can't cl

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 331363. yaxunl added a comment. bug fix. only remove unused casts. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenModule.h clang/test

[PATCH] D98812: [OPENMP]Map data field with l-value reference types.

2021-03-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: jdoerfert, jyu2, mikerice. Herald added subscribers: guansong, yaxunl. ABataev requested review of this revision. Herald added subscribers: openmp-commits, sstefan1. Herald added projects: clang, OpenMP. Added initial support dfor the mapping

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:52 AST_MATCHER_P(NamedDecl, matchesAnyListedName, std::vector, NameList) { worth some comments on this. Comment at: clang-tools-extra/clan

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 331353. njames93 added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98792/new/ https://reviews.llvm.org/D98792 Files: clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1564 public: - PolymorphicMatcher(const ParamTypes &... Params) : Params(Params...) {} + PolymorphicMatcher(const ParamTypes &...Params) : Params(Params...) {}

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 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 aside from a small nit. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1564 public: - PolymorphicMatcher(const ParamTypes &... Params)

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Pinging @alexfh for opinions about the check (especially any concerns about true or false positive rates). I continue to think this is a good check that's worth moving forward on. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousC

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-17 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D97915#2632493 , @lxfind wrote: > I am not sure how this would work, maybe I am missing something. > But this patch tries to round up the frame pointer by looking at the > difference between the alignment of new and the alignment

[PATCH] D98493: [WoA][MSVC] Use default linker setting in MSVC-compatible driver

2021-03-17 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl accepted this revision. asl 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/D98493/new/ https://reviews.llvm.org/D98493 __

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-17 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan accepted this revision. kiranchandramohan added inline comments. This revision is now accepted and ready to land. Comment at: flang/include/flang/Frontend/FrontendOptions.h:60 + + /// Parse, run semantics and the dump symbol sources map + GetSymbolsSources ---

[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

2021-03-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM other than that one comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98388/new/ https://reviews.llvm.org/D98388

[PATCH] D98493: [WoA][MSVC] Use default linker setting in MSVC-compatible driver

2021-03-17 Thread Maxim Kuvyrkov via Phabricator via cfe-commits
maxim-kuvyrkov added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:582 + StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, + CLANG_DEFAULT_LINKER); + if (Linker.empty()) asl wrote: > How

[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

2021-03-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:700 +for (auto Idx : CTypeOrder) { + if (Seen.count(Idx)) +PrintFatalError( You can use ``` if (!Seen.insert(Idx).second) PrintFatalError ``` This avoids w

[PATCH] D98493: [WoA][MSVC] Use default linker setting in MSVC-compatible driver

2021-03-17 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:582 + StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, + CLANG_DEFAULT_LINKER); + if (Linker.empty()) How is CLANG_DEFAULT_LINKER

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 331340. njames93 added a comment. Fix PP guards erroneously using #ifdef Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98792/new/ https://reviews.llvm.org/D98792 Files: clang/include/clang/ASTMatchers/ASTMa

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D96843/new/ https://reviews.llvm.org/D96843 _

[PATCH] D98494: [NFC] Minor cleanup to use default setting of getLastArg()

2021-03-17 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl accepted this revision. asl added a comment. This revision is now accepted and ready to land. Looks trivial enough for post-commit review :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98494/new/ https://reviews.llvm.org/D98494 _

[PATCH] D93347: [Test] Fix undef var in attr-speculative-load-hardening.c

2021-03-17 Thread Thomas Preud'homme 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 rG2426b1fa66f9: [Test] Fix undef var in attr-speculative-load-hardening.c (authored by thopre). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[clang] 2426b1f - [Test] Fix undef var in attr-speculative-load-hardening.c

2021-03-17 Thread Thomas Preud'homme via cfe-commits
Author: Thomas Preud'homme Date: 2021-03-17T19:12:25Z New Revision: 2426b1fa66f95d2b6b874e422edceccdf6431162 URL: https://github.com/llvm/llvm-project/commit/2426b1fa66f95d2b6b874e422edceccdf6431162 DIFF: https://github.com/llvm/llvm-project/commit/2426b1fa66f95d2b6b874e422edceccdf6431162.diff

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-03-17 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. I am not sure how this would work, maybe I am missing something. But this patch tries to round up the frame pointer by looking at the difference between the alignment of new and the alignment of the frame. The alignment of new only gives you the guaranteed alignment for ne

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

2021-03-17 Thread Hongtao Yu via Phabricator via cfe-commits
hoy created this revision. Herald added a subscriber: wenlei. hoy requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. C functions may be declared and defined in different prototypes like below. This patch unifies the checks for mangling names

[PATCH] D97371: [clang][parser] Remove questionable ProhibitAttributes() call in objc parsing

2021-03-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D97371#2596643 , @tbaeder wrote: > They are being applied to the `@try` at least (`-ast-print` prints them) and > we do some error checking for missing call expressions in > `handleNoMergeAttr()` in `SemaStmtAttr.cpp`. I don'

[PATCH] D98798: Produce waring for performing pointer arithmetic on a null pointer.

2021-03-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I used formatting similar to the existing code, which is not what clang-format is expecting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D98798: Produce waring for performing pointer arithmetic on a null pointer.

2021-03-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added a reviewer: andrew.w.kaylor. jamieschmeiser requested review of this revision. Herald added a project: clang. Test and produce warning for subtracting a pointer from null or subtracting null from a pointer. Reuse existing warning that th

[PATCH] D98520: [OpenCL] Remove spurious atomic_fetch tablegen builtins

2021-03-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia 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/D98520/new/ https://reviews.llvm.org/D98520 __

[PATCH] D93347: [Test] Fix undef var in attr-speculative-load-hardening.c

2021-03-17 Thread Kristof Beyls via Phabricator via cfe-commits
kristof.beyls accepted this revision. kristof.beyls 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/D93347/new/ https://reviews.llvm.org/D93347 __

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-03-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Thanks, I have changed it to '.clcpp' and also replied in RFC: https://lists.llvm.org/pipermail/cfe-dev/2021-March/067936.html Let's wait a few days for some more feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96771/new/ https://reviews.llvm.org/D96

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-03-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 331317. Anastasia added a comment. Back to .clcpp! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96771/new/ https://reviews.llvm.org/D96771 Files: clang/include/clang/Basic/LangStandard.h clang/include/clang/Driver/Types.def clang/lib/Drive

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D98783#2632143 , @tra wrote: > Shouldn't the unused ASCs be eliminated by DCE? We seem to be cleaning up the > consequences of a problem that happened somewhere else. DCE does not eliminate these unused ASCs because normally th

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D98783#2632153 , @tra wrote: > I do not see any hanging ASCs in the generated IR with clang@HEAD: > https://godbolt.org/z/TE4Yhr > > What do I miss? The unused casts are invisible since they are not used by any visible IR's. To

[PATCH] D69218: [clang][AST] Add `CXXBaseSpecifier` matcher support

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added reviewers: steveire, njames93. steveire added a comment. Could you rebase this? Parts of it were common with another patch which was merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 _

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Ally Tiritoglu via Phabricator via cfe-commits
atirit added a comment. I've found yet another bug. When `AllowShortEnumsOnASingleLine` is `true` and a multiline enum is forced (by line length, trailing comma, etc.), multiple names for the enum are placed on separate lines. Example: enum { A, B, C, } ShortEnum1, ShortEnum2; Is refactored

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I do not see any hanging ASCs in the generated IR with clang@HEAD: https://godbolt.org/z/TE4Yhr What do I miss? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 ___ cfe-commits ma

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 4 inline comments as done. steveire added a comment. In D98774#2631898 , @thakis wrote: > Why were there two copies in the first place? What was the copy in the cmake > file good for, why wasn't the one written by generate_cxx_src_locs.py

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Shouldn't the unused ASCs be eliminated by DCE? We seem to be cleaning up the consequences of a problem that happened somewhere else. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 _

[PATCH] D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec

2021-03-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 331302. steakhal added a comment. Revert to the previous version and move to line 738 just before "ImportRecordTypeInFunc". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98707/new/ https://reviews.llvm.org/D9

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331300. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98774/new/ https://reviews.llvm.org/D98774 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/generat

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3679-3680 +if (remainingFile[whileIndex] != '\n' && +(remainingFile[whileIndex] == ' ' && + remainingFile[whileIndex - 1] == ' ')) { + remainingLineCharCount++

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, steveire. Herald added a subscriber: pengfei. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Changing matchers to use non-const members and adding r-

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 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 once the optional bits are fixed up. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them

[PATCH] D98558: [OPENMP51]Initial support for the interop directive

2021-03-17 Thread Mike Rice 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 rG410f09af09b9: [OPENMP51]Initial support for the interop directive. (authored by mikerice). Herald added a project: clang. Herald added a subscriber:

[clang] 410f09a - [OPENMP51]Initial support for the interop directive.

2021-03-17 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2021-03-17T09:42:07-07:00 New Revision: 410f09af09b9261f51663773bee01ec7b37e8fd4 URL: https://github.com/llvm/llvm-project/commit/410f09af09b9261f51663773bee01ec7b37e8fd4 DIFF: https://github.com/llvm/llvm-project/commit/410f09af09b9261f51663773bee01ec7b37e8fd4.diff LOG

[PATCH] D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec

2021-03-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I did not notice that `ImportVariables` is different than `ImportDecl`, I like the first version of the test better (with `ImportDecl`) (but the current is not wrong), can you change it back only at a different position (line 738 can be good, before test "ImportRecordT

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > flx wrote:

[PATCH] D97371: [clang][parser] Remove questionable ProhibitAttributes() call in objc parsing

2021-03-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. John, do you have any more comments on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97371/new/ https://reviews.llvm.org/D97371 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen marked an inline comment as done. khchen added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:169 +Builder.defineMacro("__rvv_e64", "3"); +Builder.defineMacro("__rvv_e128", "4"); + craig.topper wrote: > Are intending to support e128

[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:687 + +unsigned Skew = 0; +if (HasMaskedOffOperand) craig.topper wrote: > ``` > unsigned Skew = HasMaskedOffOperand ? 1 : 0; > ``` > > unless this needs to get more complica

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Why were there two copies in the first place? What was the copy in the cmake file good for, why wasn't the one written by generate_cxx_src_locs.py sufficient? But pulling it into its own file seems nicer than having it inline in python or cmake code. Another observation

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} ymandel wrote: > flx wrote: > > ymandel wrote:

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D98692#2631504 , @nullptr.cpp wrote: > The relevant rule is F.16: For "in" parameters, pass cheaply-copied types by > value and others by reference to const >

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl requested review of this revision. In device compilation, clang emit global variables in device or constant address space then cast them to default address space. If global variables are not used, there are invisible addre

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Ally Tiritoglu via Phabricator via cfe-commits
atirit added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3679-3680 +if (remainingFile[whileIndex] != '\n' && +(remainingFile[whileIndex] == ' ' && + remainingFile[whileIndex - 1] == ' ')) { + remainingLineCharCount++;

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 331267. khchen marked 2 inline comments as done. khchen added a comment. 1. address Craig's comments. 2. update test by using 2>&1 instead of 2>%t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96843/new/ https:/

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > nit: while

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-17 Thread Timm Bäder 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 rGd9ef6bc42643: [clang] Disable LTO and LLD on SystemZ for stage3 builds (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D8

[clang] d9ef6bc - [clang] Disable LTO and LLD on SystemZ for stage3 builds

2021-03-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2021-03-17T15:15:41+01:00 New Revision: d9ef6bc42643ae4feab3f9eca97864d72034f2ce URL: https://github.com/llvm/llvm-project/commit/d9ef6bc42643ae4feab3f9eca97864d72034f2ce DIFF: https://github.com/llvm/llvm-project/commit/d9ef6bc42643ae4feab3f9eca97864d72034f2ce.diff LO

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; whisperity wrote: > aaron.ballman w

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} ymandel wrote: > nit: while this change is not

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; ---

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; Question: would it make sense to

  1   2   >