[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399917. kda marked an inline comment as done. kda added a comment. rename file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files: clang/include/clang/Basic/CodeGenO

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:362 + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel, + CGOpts.SanitizeMemoryParamRetval != 0})); vitalybuka wrote: > we use implicit cast mos

[PATCH] D117289: [clang-format] Fix namespace end comments fixer with anonymous namespaces.

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, a strange trailing comment was produced: namespace out { namespac

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-14 Thread Hyeongyu Kim via Phabricator via cfe-commits
hyeongyukim added a comment. @nathanchance Hi, I analyzed all four warnings. Warning #1: can be handled by x86-backend. filled issue #53118 Warning #2: bug in the kernel, fixed in the next version. Warning #3: same reason with #2 Warning #4: It

[PATCH] D117289: [clang-format] Fix namespace end comments fixer with anonymous namespaces.

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay 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/D117289/new/ https://reviews.llvm.org/D117289 ___

[PATCH] D117142: [clang-format] Fix short functions being considered as inline inside an indented namespace.

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay 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/D117142/new/ https://reviews.llvm.org/D117142 ___

[clang] a0458b5 - Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via cfe-commits
Author: Kevin Athey Date: 2022-01-14T00:41:28-08:00 New Revision: a0458b531cfc52fc1a93002f125b61842f6b30f7 URL: https://github.com/llvm/llvm-project/commit/a0458b531cfc52fc1a93002f125b61842f6b30f7 DIFF: https://github.com/llvm/llvm-project/commit/a0458b531cfc52fc1a93002f125b61842f6b30f7.diff L

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey 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 rGa0458b531cfc: Add -fsanitize-address-param-retval to clang. (authored by kda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 399922. MyDeveloperDay marked 10 inline comments as done. MyDeveloperDay added a comment. Make suggested improvements Add additional test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117197/new/ https://reviews.llvm.org/D117197 Files:

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius commandeered this revision. curdeius edited reviewers, added: aybassiouny; removed: curdeius. curdeius added a comment. This bug is not present in clang-format 13 (nor master), but was there in v12. I'll commandeer this revision to keep the regression tests. CHANGES SINCE LAST ACTION

[clang] bba729a - [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-14 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-01-14T10:05:47+01:00 New Revision: bba729af3ef803c35c082417f89a1ac89462e22b URL: https://github.com/llvm/llvm-project/commit/bba729af3ef803c35c082417f89a1ac89462e22b DIFF: https://github.com/llvm/llvm-project/commit/bba729af3ef803c35c082417f89a1ac89462e22b.diff LO

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-14 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbba729af3ef8: [clang-check] Adjust argument adjusters for clang-check to strip options… (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D116595: [clang][sema] Add missing diagnostic parameter

2022-01-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 399925. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116595/new/ https://reviews.llvm.org/D116595 Files: clang/lib/Sema/SemaModule.cpp clang/test/Modules/cxx20-export-import.cpp Index: clang/test/Modules/cxx20-export-import.cpp ===

[PATCH] D111617: [RISCV] Lazily add RVV C intrinsics.

2022-01-14 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng commandeered this revision. kito-cheng edited reviewers, added: HsiangKai; removed: kito-cheng. kito-cheng added a comment. @HsiangKai hand over this revision to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111617/new/ https://revie

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 399926. curdeius added a comment. Keep tests only. Clean up. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99031/new/ https://reviews.llvm.org/D99031 Files: clang/unittests/Format/FormatTest.cpp I

[PATCH] D116595: [clang][sema] Add missing diagnostic parameter

2022-01-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Modules/cxx20-export-import.cpp:1-2 + +// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -I%S/Inputs -stdlib=libc++ -verify %s +export import dummy; // expected-error {{export declaration

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. It seems that it is not committed on my behalf. Maybe you have forgotten to add me as the author? Sad : ( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116329/new/ https://reviews.llvm.org/D116329

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 reopened this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. I'll need to figure out how to efficiently replace the pointer arithmetic performed by `Preprocessor::LookupFile`, or go back to my first solution: keeping `std::vector` and updati

[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

2022-01-14 Thread Martin Probst via Phabricator via cfe-commits
mprobst added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3522 + if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) || + (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) && + Right.is(TT_JsTypeOperator)) ---

[PATCH] D117292: [Driver] Pass the flag -dI to cc1 invocation

2022-01-14 Thread Qichao Gu via Phabricator via cfe-commits
qichaogu created this revision. qichaogu added a reviewer: cfe-commits. qichaogu requested review of this revision. Hook up the flag -dI in the driver to pass it to cc1 invocation. https://reviews.llvm.org/D117292 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/preprocessor.c

[PATCH] D117293: enable noundef analysis with -fsanitize-memory-param-retval

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda created this revision. kda added a reviewer: vitalybuka. Herald added a subscriber: dang. kda requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Enable noundef analysis (-enable-noundef-analysis) via the -fsanitize-m

[PATCH] D117293: enable noundef analysis with -fsanitize-memory-param-retval

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399937. kda added a comment. add missing files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117293/new/ https://reviews.llvm.org/D117293 Files: clang/include/clang/Driver/Options.td clang/test/CodeGen/attr-n

[PATCH] D117294: [clangd] Better handling `\n` in the synthesized diagnostic message.

2022-01-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The newline-eof fix was rendered as "ins

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: rsmith, aaron.ballman. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As part of P1766R1 , allow unname

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Reading this again, it sounds like this is not expected to happen for C++20; I was using https://clang.llvm.org/cxx_status.html#cxx20 as guidance here. Repository: rG LLVM Github Mon

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. In D116736#3242623 , @junaire wrote: >> @junaire did you already get commit access or should I commit this change on >> your behalf? > > Yeah, I already

[clang] 717cd16 - [clang-format] Fix namespace end comments fixer with anonymous namespaces.

2022-01-14 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-01-14T11:41:14+01:00 New Revision: 717cd16e85faa6498cf6c46838241b0e7ddaaaba URL: https://github.com/llvm/llvm-project/commit/717cd16e85faa6498cf6c46838241b0e7ddaaaba DIFF: https://github.com/llvm/llvm-project/commit/717cd16e85faa6498cf6c46838241b0e7ddaaaba.diff

[PATCH] D117289: [clang-format] Fix namespace end comments fixer with anonymous namespaces.

2022-01-14 Thread Marek Kurdej 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 rG717cd16e85fa: [clang-format] Fix namespace end comments fixer with anonymous namespaces. (authored by curdeius). Repository: rG LLVM Github Monore

[PATCH] D117296: Document several clang-supported builtins

2022-01-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, rsmith. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Namely __builtin_alloca __builtin_alloca_with_align __builtin_call_with_st

[PATCH] D117142: [clang-format] Fix short functions being considered as inline inside an indented namespace.

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 399945. curdeius added a comment. Minor clean up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117142/new/ https://reviews.llvm.org/D117142 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/unitte

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-14 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. @MyDeveloperDay @curdeius I will land this patch if you have no more comments. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D117142: [clang-format] Fix short functions being considered as inline inside an indented namespace.

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 399946. curdeius added a comment. Rebase to fix Windows CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117142/new/ https://reviews.llvm.org/D117142 Files: clang/lib/Format/UnwrappedLineFormatter.cpp cl

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/docs/ClangFormatStyleOptions.rst:3398 +**RemoveBracesLLVM** (``Boolean``) :versionbadge:`clang-format 14` + Remove optional braces of control s

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-14 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3398 +**RemoveBracesLLVM** (``Boolean``) :versionbadge:`clang-format 14` + Remove optional braces of control statements (``if``, ``else``, ``for``, curdeius wrote: > owenpan wrot

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116439/new/ https://reviews.llvm.org/D116439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp:86-99 + // Data passed by nonconst reference should not be made const. + unsigned ArgNr = 0U; + if (const auto *CD = CE->getConstructor()) { +for

[PATCH] D117294: [clangd] Better handling `\n` in the synthesized diagnostic message.

2022-01-14 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/Diagnostics.cpp:635 + if (Code == "\n") { +OS << "\\n"; +return; or "newline"? Repository: rG LLV

[clang] cd3ab15 - [clang-format] Fix typos in test. NFC.

2022-01-14 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-01-14T13:24:16+01:00 New Revision: cd3ab156a74b57432f6337f6e0405fa7f207604e URL: https://github.com/llvm/llvm-project/commit/cd3ab156a74b57432f6337f6e0405fa7f207604e DIFF: https://github.com/llvm/llvm-project/commit/cd3ab156a74b57432f6337f6e0405fa7f207604e.diff

[PATCH] D117301: [clang][NFC] Wrap TYPE_SWITCH in "do while (0)" in the interpreter

2022-01-14 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: jfb, rsmith, RKSimon, nand. owenpan added a project: clang. owenpan requested review of this revision. Herald added a subscriber: cfe-commits. Wraps the expansion of TYPE_SWITCH of the constexpr interpreter in `do { ... } while (0)` so that

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! @Quuxplusone, you're still marked as requesting changes, are you okay with the way this has progressed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: thakis, rnk, majnemer. aaron.ballman added a comment. AFAIK, we don't support plugins on Windows. See: https://reviews.llvm.org/D16761#1441359 I don't think anything has changed in this regard. Based on that, I don't think this patch is necessary, but I'm adding s

[PATCH] D117304: [clang][dataflow] Remove TestingSupport's dependency on gtest

2022-01-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. ymandel requested review of this revision. Herald added a project: clang. Users outside of the clang repo may use different googletest versions. So, it's better not to depend on llvm's googletest. This patch removes the dependenc

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3243318 , @aaron.ballman wrote: > AFAIK, we don't support plugins on Windows. See: > https://reviews.llvm.org/D16761#1441359 I don't think anything has changed in > this regard. I can say that I successfully use cla

[PATCH] D117271: [AArch64] clang support for Armv8.8/9.3 MOPS

2022-01-14 Thread Sam Elliott via Phabricator via cfe-commits
lenary accepted this revision. lenary 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/D117271/new/ https://reviews.llvm.org/D117271 ___

[PATCH] D116190: Comment parsing: Don't recognize commands in single-line double quotation

2022-01-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked an inline comment as done. aaronpuchert added inline comments. Comment at: clang/lib/AST/CommentLexer.cpp:278 + +again: + size_t End = gribozavr2 wrote: > I'd suggest refactoring to a `while (true)` if you don't mind. I was imitating `lexVerb

[PATCH] D116186: Comment parsing: Simplify Lexer::skipLineStartingDecorations (NFC)

2022-01-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Ping @gribozavr2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116186/new/ https://reviews.llvm.org/D116186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D116966#3243346 , @ArcsinX wrote: > In D116966#3243318 , @aaron.ballman > wrote: > >> AFAIK, we don't support plugins on Windows. See: >> https://reviews.llvm.org/D16761#1441359

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. To be clear, I'm trying to figure out whether plugins are *actually* supported on Windows or whether they just so happen to work if the stars line up right for you. If they're supported, then awesome, let's go forward with this. If they're not supported, it's less

[clang-tools-extra] 1093b9f - Revert "[clangd] Elide even more checks in SelectionTree."

2022-01-14 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2022-01-14T14:32:43+01:00 New Revision: 1093b9f2e9842982d97534940a643e3a4657c60b URL: https://github.com/llvm/llvm-project/commit/1093b9f2e9842982d97534940a643e3a4657c60b DIFF: https://github.com/llvm/llvm-project/commit/1093b9f2e9842982d97534940a643e3a4657c60b.dif

[clang] 6a4957c - [clang-format] Add missing test for loops formatting. NFC.

2022-01-14 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-01-14T14:43:15+01:00 New Revision: 6a4957cbdff5d60de40639e6c9c8edd056b9a082 URL: https://github.com/llvm/llvm-project/commit/6a4957cbdff5d60de40639e6c9c8edd056b9a082 DIFF: https://github.com/llvm/llvm-project/commit/6a4957cbdff5d60de40639e6c9c8edd056b9a082.diff

[PATCH] D117218: [clang][dataflow] Add transfer functions for constructors

2022-01-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:105 - assert(SubExpr != nullptr); +if (S->getCastKind() == CK_LValueToRValue) { auto *SubExprVal = Env.getValue(*SubExpr, SkipPast::Reference

[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

2022-01-14 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3243374 , @aaron.ballman wrote: > To be clear, I'm trying to figure out whether plugins are *actually* > supported on Windows or whether they just so happen to work if the stars line > up right for you. If they're su

[clang] 8de0c1f - [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-14 Thread Jun Zhang via cfe-commits
Author: Jun Zhang Date: 2022-01-14T22:05:26+08:00 New Revision: 8de0c1feca28e3de49b4d1d1140703cb6f739969 URL: https://github.com/llvm/llvm-project/commit/8de0c1feca28e3de49b4d1d1140703cb6f739969 DIFF: https://github.com/llvm/llvm-project/commit/8de0c1feca28e3de49b4d1d1140703cb6f739969.diff LOG

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-14 Thread Jun Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8de0c1feca28: [Clang] Add __builtin_reduce_or and __builtin_reduce_and (authored by junaire). Changed prior to commit: https://reviews.llvm.org/D116736?vs=398838&id=399966#toc Repository: rG LLVM Git

[PATCH] D114235: [clang] Extend ParsedAttr to allow custom handling for type attributes

2022-01-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Thanks for the feedback! And no worries about the delay -- I know you've got a lot on your plate, and the proposed change is invasive. To make sure I understand correctly: The issue is that if a `Type` is replaced by an `AttributedType` in places where Clang does not (y

[PATCH] D117218: [clang][dataflow] Add transfer functions for constructors

2022-01-14 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 399968. sgatev marked an inline comment as done. sgatev added a comment. Address reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117218/new/ https://reviews.llvm.org/D117218 Files: clang/li

[PATCH] D117218: [clang][dataflow] Add transfer functions for constructors

2022-01-14 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:105 - assert(SubExpr != nullptr); +if (S->getCastKind() == CK_LValueToRValue) { auto *SubExprVal = Env.getValue(*SubExpr, SkipPast::Reference); ymandel wrote

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun, mgorny. balazske requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp:101 + functionDecl(returns(isConstQualified()), + anyOf(isDefinition(), cxxMethodDecl(isPure( + .bind("func"),

[PATCH] D117309: [clang] NFC: Remove unused `DirectoryLookup`

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: ahoppen. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch removes bitrotten/dead uses of `DirectoryLookup` in `InclusionRewriter.cpp`. Repository:

[PATCH] D117312: [clang][lex] NFC: Simplify calls to `LookupFile`

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: ahoppen. Herald added a subscriber: carlosgalvezp. jansvoboda11 requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. The `{HeaderSearch,Preprocessor}::LookupFil

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius commandeered this revision. curdeius edited reviewers, added: GoBigorGoHome; removed: curdeius. curdeius added a comment. Commandeering as it's stale.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D9495

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 399981. jansvoboda11 added a comment. This revision is now accepted and ready to land. Replace external uses of `const DirectoryLookup *` by an optional iterator. That's how they get treated by callers. Repository: rG LLVM Github Monorepo CHANGES SI

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 399982. curdeius added a comment. Add more tests. Fix missed cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 Files: clang/lib/Format/UnwrappedLineFormatter.cp

[clang] 7d941d6 - [clang][dataflow] Add transfer functions for constructors

2022-01-14 Thread Stanislav Gatev via cfe-commits
Author: Stanislav Gatev Date: 2022-01-14T14:58:01Z New Revision: 7d941d6d21e91e8466bf200da094d027338b92fa URL: https://github.com/llvm/llvm-project/commit/7d941d6d21e91e8466bf200da094d027338b92fa DIFF: https://github.com/llvm/llvm-project/commit/7d941d6d21e91e8466bf200da094d027338b92fa.diff LO

[PATCH] D117218: [clang][dataflow] Add transfer functions for constructors

2022-01-14 Thread Stanislav Gatev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d941d6d21e9: [clang][dataflow] Add transfer functions for constructors (authored by sgatev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117218/new/ http

[clang] 765dd8b - [CGBuiltin] Simplify code. NFCI.

2022-01-14 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2022-01-14T16:02:02+01:00 New Revision: 765dd8b8a44cd9689c87c0433739f421b9871061 URL: https://github.com/llvm/llvm-project/commit/765dd8b8a44cd9689c87c0433739f421b9871061 DIFF: https://github.com/llvm/llvm-project/commit/765dd8b8a44cd9689c87c0433739f421b9871061.dif

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 399987. curdeius added a comment. Assert + test for loop. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius marked 5 inline comments as done. curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:2181-2185 + EXPECT_EQ(Style.AllowShortBlocksOnASingleLine, FormatStyle::SBS_Never); + EXPECT_EQ(Style.AllowShortLoopsOnASingleLine, false); verifyForm

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Lex/HeaderSearch.h:415 StringRef Filename, SourceLocation IncludeLoc, bool isAngled, - const DirectoryLookup *FromDir, const DirectoryLookup **CurDir, + maybe_search_dir_iterator FromDir, maybe_s

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-01-14 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp:177-178 const auto &CurrentParam = *FunctionDecl->getParamDecl(Index); +if (IsExplicitTemplateSpecialization && Function != FunctionDecl) + continue;

[PATCH] D117315: [AIX][ZOS] Handle unsupported builtin function CFStringMakeConstantString

2022-01-14 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan created this revision. Jake-Egan 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/D117315 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Analysis/cfref_PR2519.

[PATCH] D116518: [ast-matchers] Add hasSubstatementSequence matcher

2022-01-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Sorry for the delay. Read through the whole thread today. I agree with Aaron -- we shouldn't add this until 1. we have a general interface 2. we're sure this serves a general audience As I mentioned in my previous reply, I have a working general interface that I shared

[PATCH] D116518: [ast-matchers] Add hasSubstatementSequence matcher

2022-01-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Clarification: I'm totally fine with it existing privately, my concerns were with a public implementation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116518/new/ https://reviews.llvm.org/D116518 ___ cfe-commits ma

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think this check belongs to `bugprone` module. How about `std::unique_ptr`? Comment at: clang-tools-extra/clang-tidy/misc/SharedPtrArrayMismatchCheck.cpp:1 +//===--- SharedPtrArrayMismatchCheck.cpp - clang-tidy +//--===// --

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-14 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone accepted this revision. Quuxplusone added a comment. This revision is now accepted and ready to land. @Sockke: Throughout, `trivially-copyable` should be `trivially copyable` (two words). Other than that, sure, I have no particular opinions at this point. Comment a

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 36. curdeius added a comment. Clean up tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/unittest

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

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:2209 + + FormatStyle ShortBlocks = getLLVMStyle(); + ShortBlocks.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Always; If wanted, I might commit the new tests without ForEachMa

[PATCH] D116174: [clang] support relative roots to vfs overlays

2022-01-14 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D116174#3242087 , @benlangmuir wrote: > Each VFS may have its own working directory, so it could be surprising if we > use the OS working directory instead of that. This is complicated by the > fact the VFS working directory m

[PATCH] D116673: [Clang][NVPTX]Add NVPTX intrinsics and builtins for CUDA PTX cvt sm80 instructions

2022-01-14 Thread Jack Kirk via Phabricator via cfe-commits
JackAKirk added a comment. In D116673#3241721 , @tra wrote: > In D116673#3237873 , @JackAKirk > wrote: > I can land the patch on your behalf. Are you OK to use the name/email in this patch or do you pr

[PATCH] D117293: enable noundef analysis with -fsanitize-memory-param-retval

2022-01-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka accepted this revision. vitalybuka added a comment. This revision is now accepted and ready to land. Nice! >> This completes the work found in: It's too late for this set of patches, but phabricator supports "Depends on" comments (I guess only of the first patch upload), and manual

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

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D117321: [clang] Remap file path in __PRETTY_FUNCTION__

2022-01-14 Thread Jyun-Yan You via Phabricator via cfe-commits
jyyou.tw created this revision. jyyou.tw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. __PRETTY_FUNCTION__ may have file path in template argument but -fmacro-prefix-map can't remap it. This patch tries to fix the problem. Repository:

[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3522 + if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) || + (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) && + Right.is(TT_JsTypeOperator))

[PATCH] D117293: enable noundef analysis with -fsanitize-memory-param-retval

2022-01-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Just noticed, -enable-noundef-analysis is missing tests undef llvm/llvm-project/clang/test/Driver/ Can you add few near maybe before llvm-project/clang/test/Driver/clang_f_opts.c:531 (just before discard-value-names tests) Repository: rG LLVM Github Monorepo CHA

[PATCH] D116174: [clang] support relative roots to vfs overlays

2022-01-14 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 48. rmaz added a comment. Add comment to describe relative root path behaviour Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116174/new/ https://reviews.llvm.org/D116174 Files: clang/test/VFS/Inputs/vfsover

[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

2022-01-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Looks ok from my side. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117197/new/ https://reviews.llvm.org/D117197 ___ cfe-commits mail

[PATCH] D116713: [clangd] Support configuration of inlay hints.

2022-01-14 Thread Jack Andersen via Phabricator via cfe-commits
jackoalan added a comment. Assuming origin/maain is a branch typo and is no longer being tracked, would you please delete the upstream one in https://github.com/llvm/llvm-project/branches? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116713/new/

[PATCH] D111400: [Clang] Implement P2242R3

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D111400#3172097 , @cor3ntin wrote: > Regression compared to the status quo: > This code no longer warns (as noted by Hubert above) > > auto f = [](bool b) { > if (b) return 42; > static int x = 0; > return x

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM go for it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D117293: enable noundef analysis with -fsanitize-memory-param-retval

2022-01-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D117293#3243772 , @vitalybuka wrote: > Just noticed, -enable-noundef-analysis is missing tests undef > llvm/llvm-project/clang/test/Driver/ > Can you add few near maybe before > llvm-project/clang/test/Driver/clang_f_opts

[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

2022-01-14 Thread Martin Probst via Phabricator via cfe-commits
mprobst added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3522 + if ((Left.is(TT_JsTypeOperator) && Right.isTypeOrIdentifier()) || + (Left.isTypeOrIdentifier() || Left.is(TT_TemplateCloser)) && + Right.is(TT_JsTypeOperator)) ---

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/test/Driver/fsanitize-memory-param-retval.c:8-9 + +// RUN: %clang -target aarch64-linux-gnu -fsyntax-only %s -fsanitize=memory -fsanitize-memory-param-retval -c -### 2>&1 | FileCheck --check-prefix=11 %s +// 11: "-fsanitize-mem

[PATCH] D114235: [clang] Extend ParsedAttr to allow custom handling for type attributes

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a subscriber: erichkeane. aaron.ballman added a comment. In D114235#3243429 , @mboehme wrote: > Thanks for the feedback! And no worries about the delay -- I know you've got > a lot on your p

[PATCH] D116190: Comment parsing: Don't recognize commands in single-line double quotation

2022-01-14 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/AST/CommentLexer.cpp:278 + +again: + size_t End = aaronpuchert wrote: > gribozavr2 wrote: > > I'd suggest refactoring to a

[PATCH] D114235: [clang] Extend ParsedAttr to allow custom handling for type attributes

2022-01-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Right, yeah, so there are a couple of problems with AttributedType. First, it gets lost almost as soon as you get out of SemaType about 90% of the time. Anything that does some level of canonicalization ends up losing it, so the AttributedType information is lost a

[PATCH] D116186: Comment parsing: Simplify Lexer::skipLineStartingDecorations (NFC)

2022-01-14 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Nice simplification, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116186/new/ https://reviews.llvm.org/D116186

[PATCH] D117296: Document several clang-supported builtins

2022-01-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for this new documentation! I'm by no means an expert in these builtins, so I had some questions on places we might want to expand things a bit more. Comment at: clang/docs/LanguageExtensions.rst:2183 +n * sizeof(fl

  1   2   >