[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Please note: I have a patch that disables warnings from system macros for all clang-tidy warnings, it would be good to review it so we don't need to implement the same mechanism in all 400+ checks :) https://reviews.llvm.org/D116378 Repository: rG LLVM Github

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. In D115921#3224329 , @jrtc27 wrote: > In D115921#3224324 , @zixuan-wu > wrote: > >> In D115921#3224284 , @jrtc27 wrote: >> >>> but also with RI

[PATCH] D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap

2022-01-05 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. I haven't read this whole patch with full scrutiny but it sure looks lovely. I now also see what the problem is with non-static strings in call descriptions. Repository: rG LLVM Github Monorepo

[PATCH] D116597: [analyzer] Don't track function calls as control dependencies

2022-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Interesting. Might it be that in this scenario in order to be of interest to the user the condition value has to be trackable back to the current stack frame? > the popular feedback we hear from some of our users, namely that they can > never have too much information The

[PATCH] D116636: [WIP] Enable `-Wstrict-calls-without-prototype` by default

2022-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ooof you fixed a lot of static analyzer tests. If you ever get tired of this, feel free to `-w` them entirely because the driver's `--analyze` flag implies `-w` anyway. Hmm, maybe we should even change `%clang_analyze_cc1` to include `-w`. Repository: rG LLVM Github Mon

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2022-01-05 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Herald added a reviewer: Szelethus. Herald added a subscriber: steakhal. FWIW, ASTUnit seems to save an effective triple while the current AST uses the nominal triple. (for example, `armv7a-xx-xx-eabihf` vs `armv7a-xx-xx-eabi`). I'm not sure if there is a good solution oth

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:61 {"zvlsseg", RISCVExtensionVersion{0, 10}}, +//{"zvlsseg", RISCVExtensionVersion{0, 7}}, This one too?.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115921/new/

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D115921#3224324 , @zixuan-wu wrote: > In D115921#3224284 , @jrtc27 wrote: > >> but also with RISC-V extensions not being changed once ratified any more >> (changes mean new extensions e

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:48 {"v", RISCVExtensionVersion{0, 10}}, +//{"v", RISCVExtensionVersion{0, 7}}, {"zba", RISCVExtensionVersion{1, 0}}, jrtc27 wrote: > Don't do this This nit will be remove

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. In D115921#3224284 , @jrtc27 wrote: > but also with RISC-V extensions not being changed once ratified any more > (changes mean new extensions entirely, not new versions) I don't think so. Or why is there version in RISC-V spec

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2022-01-05 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. ping again, thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108694/new/ https://reviews.llvm.org/D108694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

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

2022-01-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 397783. owenpan added a comment. Fixing a couple of major bugs found by running check-clang plus minor bug fixes and cleanup: - In `parseLevel()`, `HasOpeningBrace` and `case tok::r_brace:` don't necessarily mean the tokens are `{` and `}`, respectively. -

[PATCH] D116722: [clang] Verify ssp buffer size is a valid integer

2022-01-05 Thread Alex via Phabricator via cfe-commits
alextsao1999 created this revision. alextsao1999 added a reviewer: compnerd. alextsao1999 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds to verify whether the ssp buffer size is a legal integer and a new diagnostic driver

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. I'm unconvinced about landing something like this until there's an actual use case in the tree. How do we know this will actually work the way we want it to if there's nothing proving it? It's still unclear to me how exactly this is going to be represented in the target

[PATCH] D115921: [RISCV] Refactor the RISCV ISA extension info and target features to support multiple extension version

2022-01-05 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. ping... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115921/new/ https://reviews.llvm.org/D115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D116721: [Tooling] When transferring compile commands between files, always use '--'

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. sammccall requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. "driver -- " is a particularly convenient for

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 39. alxu added a comment. Sort test defines orthographically, not chronologically. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocesso

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2022-01-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. > But I suspect it is the Assignment of the `PreviousLine` since this is not > existent every time. Yep! > So I see the following solutions: > > 1. Only name `NextLine`, and use `I[-1]`. > 2. `const auto HasPreviousLine = I != AnnotatedLines.begin(); const auto > &Prev

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-01-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 397767. OikawaKirie added a comment. To make it work on Windows, Linux, and Mac OS, using `echo` to create the external function map, and using AST file for CTU analysis. Tested on Windows, Linux, and Mac OS under x64. CHANGES SINCE LAST ACTION https:

[PATCH] D116513: [clang-tidy] Fix bugs in misc-unused-parameters for Constructors calls site

2022-01-05 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. Thanks @aaron.ballman for the review! Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-unused-parameters.cpp:157-159 // CHECK-FIXES: C() {} C(int i) {} // CHECK-MESSAGES: :[[@LINE-1]]:9: warning aaron.ballman wrote:

[PATCH] D116717: [CodeCompletion] Complete designators for fields in anonymous structs/unions

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added a subscriber: usaxena95. sammccall requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/836 Reposit

[PATCH] D116512: [clang-tidy] Limit non-Strict mode to public functions

2022-01-05 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst:43 + a human reader, and there's basically no place for a bug to hide. On the other + hand for non-public functions, all the call-sites are visible and the pa

[PATCH] D116351: Update Bug report URL to Github Issues

2022-01-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 397763. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs/CommandGuide/clang.rst clang/www/c_status

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D116256#3215801 , @thakis wrote: > Thanks for the patch! This looks roughly right to me. > > Maybe the list of ESTs that are allowed to be mismatched should be opt-in > instead of opt-out? (i.e. instead of checking for "not ES

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 397760. akhuang marked an inline comment as done. akhuang added a comment. Fix warning behavior Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116256/new/ https://reviews.llvm.org/D116256 Files: clang/include

[PATCH] D115183: [clang][HeaderSearch] Support framework includes in suggestPath...

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, test seems sensible. I remain unconvinced that the umbrella stuff belongs here. Maybe pull it out of this patch and send it separately if you want to discuss further, or get more opinions? Comment at: clang/lib/Lex/HeaderSearch.cpp:1962 +

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declara

[PATCH] D114908: [clang] Don't call inheritDefaultTemplateArguments() on CXXDeductionGuideDecl's template parameters

2022-01-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Friendly ping for a modules CTAD bugfix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114908/new/ https://reviews.llvm.org/D114908 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: nridge, hokein. Herald added subscribers: usaxena95, kadircet, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The idea is th

[PATCH] D116615: [Clang] Extract availability mapping from VersionMap for watchOS/tvOS

2022-01-05 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 rG809c6a5a1d2f: [Clang] Extract availability mapping from VersionMap for watchOS/tvOS (authored by egorzhdan, committed by arphaman). Repository: rG

[clang] 809c6a5 - [Clang] Extract availability mapping from VersionMap for watchOS/tvOS

2022-01-05 Thread Alex Lorenz via cfe-commits
Author: Egor Zhdan Date: 2022-01-05T17:00:03-08:00 New Revision: 809c6a5a1d2f4366ab0e602c9d963b73f380b74e URL: https://github.com/llvm/llvm-project/commit/809c6a5a1d2f4366ab0e602c9d963b73f380b74e DIFF: https://github.com/llvm/llvm-project/commit/809c6a5a1d2f4366ab0e602c9d963b73f380b74e.diff LO

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Sema/warn-calls-without-prototype.c:39 + return a + b +c; +} + delcypher wrote: > delcypher wrote: > > delcypher wrote: > > > @NoQ Any ideas about this? It seems kind of weird that when merging > > > `not_a_pro

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

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) eugenis wrote: > vitalybuka wrote: > > vitalybuka wrote: > > > @eugenis W

[PATCH] D116599: Simplify AttrBuilder storage for target dependent attributes

2022-01-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D116599#3221724 , @nikic wrote: > LG from my side, but I'd like a second opinion for the "require LLVMContext > in AttrBuilder" part of the change, as that's the main API impact. I think every non-toy frontend for LLVM probably u

[PATCH] D115183: [clang][HeaderSearch] Support framework includes in suggestPath...

2022-01-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:782 if (IsIncludeeInFramework) { - NewInclude += ToFramework.str().drop_back(10); // drop .framework - NewInclude += "/"; + NewInclude += ToIncludeSpelling; + NewInclude += ">"; --

[PATCH] D115183: [clang][HeaderSearch] Support framework includes in suggestPath...

2022-01-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 397733. dgoldman marked 4 inline comments as done. dgoldman added a comment. Herald added a subscriber: ormris. Fixes for review - update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115183/new/ https://

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 397728. nickdesaulniers added a comment. - don't bother checking if a Val is Initialized Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116059/new/ https://reviews.llvm.org/D116059 Files: clang/lib/An

[PATCH] D116550: [clang-tidy] Recognize transformer checks as providing fixits

2022-01-05 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd7b6574c3bf6: [clang-tidy] Recognize transformer checks as providing fixits (authored by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11

[clang-tools-extra] d7b6574 - [clang-tidy] Recognize transformer checks as providing fixits

2022-01-05 Thread via cfe-commits
Author: Richard Date: 2022-01-05T16:13:52-07:00 New Revision: d7b6574c3bf671d70acd751a8c85d3a062dcc7c6 URL: https://github.com/llvm/llvm-project/commit/d7b6574c3bf671d70acd751a8c85d3a062dcc7c6 DIFF: https://github.com/llvm/llvm-project/commit/d7b6574c3bf671d70acd751a8c85d3a062dcc7c6.diff LOG:

[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

2022-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 397719. mstorsjo marked 2 inline comments as done. mstorsjo added a comment. Add testcases for using the new option with clang-cl, use `--target=` everywhere. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1165

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-05 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/test/Sema/warn-calls-without-prototype.c:39 + return a + b +c; +} + delcypher wrote: > delcypher wrote: > > @NoQ Any ideas about this? It seems kind of weird that when merging > > `not_a_prototype3` prototype

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-05 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5530 + "calling function %0 with arguments when function has no prototype">, InGroup< + DiagGroup<"strict-calls-without-prototype">>, DefaultIgnore; def warn_missing_variable_declara

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

2022-01-05 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) vitalybuka wrote: > vitalybuka wrote: > > @eugenis Would be better to

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397712. alxu added a comment. Try -p1 compatible diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/predefined-macros.c Index: c

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declara

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1022 +Builder.defineMacro("__NO_MATH_ERRNO__"); + if (LangOpts.FastMath || LangOpts.FiniteMathOnly) aaron.ballman wrote: > Does GCC gate on `-ffast-math`? My testing sugges

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397708. alxu added a comment. In D116337#3217955 , @aaron.ballman wrote: > Thanks for this! I'm adding some more reviewers to the list to help get this > reviewed. > > The patch doesn't seem to apply cleanly, so precom

[PATCH] D116701: Respect -fsanitize-memory-param-retval flag.

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda created this revision. kda added a reviewer: vitalybuka. kda requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Implementation of flag introduced in https://reviews.llvm.org/D116633 Repository: rG LLVM Github Monorepo https://reviews.

[PATCH] D116699: [clangd] Polish clangd/inlayHints and expose them by default.

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: kadircet, nridge. Herald added subscribers: usaxena95, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This means it's a "rea

[PATCH] D115049: Fall back on Android triple w/o API level for runtimes search

2022-01-05 Thread Nico Weber 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 rG7e08a1208889: [clang] Fall back on Android triple w/o API level for runtimes search (authored by collinbaker, committed by thakis). Changed prior to

[clang] 7e08a12 - [clang] Fall back on Android triple w/o API level for runtimes search

2022-01-05 Thread Nico Weber via cfe-commits
Author: Collin Baker Date: 2022-01-05T16:00:48-05:00 New Revision: 7e08a1208889756bb7c44121f63a1b32f6c87ea5 URL: https://github.com/llvm/llvm-project/commit/7e08a1208889756bb7c44121f63a1b32f6c87ea5 DIFF: https://github.com/llvm/llvm-project/commit/7e08a1208889756bb7c44121f63a1b32f6c87ea5.diff

[PATCH] D115670: Implement some constexpr vector unary operators, fix boolean-ops

2022-01-05 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. In D115670#3220052 , @erichkeane wrote: > Should be fixed here: 2edc21e8566be8fa9b20e0bb71a83af90ec9aa97 > > > Thanks! Thanks so much for the fix Erich! I

[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

2022-01-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM this is something we have a use case for this in Fuchsia as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116503/new/ https://reviews.llvm.org/D116503 __

[PATCH] D115049: Fall back on Android triple w/o API level for runtimes search

2022-01-05 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. lg! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115049/new/ https://reviews.llvm.org/D115049 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D116328: [ast-matchers] Add hasSubstatement() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D116328#3223299 , @aaron.ballman wrote: > In D116328#3223268 , > @LegalizeAdulthood wrote: > >> In D116328#3221995 , >> @aaron.bal

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

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5435-5442 +/// Matches two consecutive statements within a compound statement. +/// +/// Given +/// \code +/// { if (x > 0) return true; return false; } +/// \endcode +/// compoun

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

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5435-5442 +/// Matches two consecutive statements within a compound statement. +/// +/// Given +/// \code +/// { if (x > 0) return true; return false; } +/// \endcode +/// compoun

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declaration

[PATCH] D116328: [ast-matchers] Add hasSubstatement() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: sammccall. aaron.ballman added a subscriber: sammccall. aaron.ballman added a comment. In D116328#3223268 , @LegalizeAdulthood wrote: > In D116328#3221995 , @aaron.ballman > wrote

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-01-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/AST/Type.h:6481 + // cv-qualifiers or a ref-qualifier, or a reference type + const Type &Self = **this; + if (Self.isObjectType() || Self.isReferenceType()) aaron.ballman wrote: > This is unsafe --

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declara

[PATCH] D116272: [Clang][Sema] Avoid crashing for va_arg expressions with bool argument

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a subscriber: tstellar. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for the fix! I think this would also be a reasonable candidate for a 13.0.X release, in case you wanted to file an iss

[PATCH] D116328: [ast-matchers] Add hasSubstatement() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2022-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. In D116328#3221995 , @aaron.ballman wrote: >> Previously if you wanted to match the statement associated with a case, >> default, or labelled statement, you had to us

[PATCH] D114601: Read path to CUDA from env. variable CUDA_PATH on Windows

2022-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Ping. @mojca, do you need help landing the patch? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114601/new/ https://reviews.llvm.org/D114601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Generally LGTM, just a testing request. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void ar

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

2022-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM overall. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:405 +TARGET_BUILTIN(__nvvm_ff2v2bf_rn, "ZUiff", "", AND(SM_80,PTX70)) +TARGET_BUILTIN(__nvvm_ff2v2bf_rn_relu, "ZUiff", "", AND(SM_80,PTX70)) Nit: `ff2v2bf` is a bit har

[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

2022-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/diagnostics.c:2 // Parse diagnostic arguments in the driver // PR12181 If you are going to update comments, remove this PR12181. It says an issue about `-Werror=unused-command-line-argument` but yo

[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

2022-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/diagnostics.c:34 +// there's no diagnostic. +// RUN: %clang -target x86_64-apple-darwin10 -fsyntax-only \ +// RUN: --start-no-unused-arguments -lfoo --end-no-unused-arguments \ You may change some `x8

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

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 397648. kda added a comment. trying again 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/CodeGenOptions.def clang/include/clang/Driv

[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

2022-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. I forwarded this to some groups who want this functionality. Jannik2099 from Gentoo likes the change. But make sure to wait a bit to see what others think. Comment at: cl

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

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "eager param-retval uninitialized use detection in MemorySanitizer">>, +Group; vitalybuka wrote: > Maybe "Detect initialized param

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88833#3223077 , @estan wrote: > That did the trick, thanks @aaron.ballman. Glad that worked! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88833/new/ https://reviews.llvm

[PATCH] D115249: Clang-Tidy implicit bool conversion check use upercase suffixes

2022-01-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Something stylistic like this should likely be configurable. Lowercase literals are a part of the language and there is likely a codebase out there that explicitly prefers them Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 397647. kda marked an inline comment as done. kda added a comment. updated help text and dropped implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files: c

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. That did the trick, thanks @aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88833/new/ https://reviews.llvm.org/D88833 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. Ah yes I had a hunch it had to be "clang;clang-tools-extra" so running a build with that now. Almost done. It crashed at the very end due to OOM while linking, but reduced parallelism now and running again. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88833#3223055 , @estan wrote: > @aaron.ballman A bit off topic, but I followed > https://github.com/llvm/llvm-project/blob/main/README.md#getting-the-source-code-and-building-llvm > to build and install llvm-project mai

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp:65 void ProBoundsArrayToPointerDecayCheck::registerMatchers(MatchFinder *Finder) { - // The only allowed array to pointer decay + // We only allowed a

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. @aaron.ballman A bit off topic, but I followed https://github.com/llvm/llvm-project/blob/main/README.md#getting-the-source-code-and-building-llvm to build and install llvm-project main branch as follows: git clone https://github.com/llvm/llvm-project.git cd llvm-proje

[PATCH] D116583: Change the default optimisation level of PTXAS from -O0 to -O3. This makes the optimisation levels of PTXAS and the ptxjitcompiler equal (ptxjitcompiler defaults to -O3).

2022-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:433 } else { -// If no -O was passed, pass -O0 to ptxas -- no opt flag should correspond -// to no optimizations, but ptxas's default is -O3. -CmdArgs.push_back("-O0"); +// If no -O was

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

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:149-151 + const auto *ReceivingCallExpr = dyn_cast(ReceivingExpr); + const auto *ReceivingConstructExpr = + dyn_cast(ReceivingExpr); ---

[PATCH] D116675: [OpenMP] Search for static libraries in offload linker tool

2022-01-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, gregrodgers, JonChesterfield, ronlieb. Herald added subscribers: guansong, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch adds support f

[PATCH] D115960: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-05 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Not sure what happened here but this change added back a whole bunch of old code. I reverted this in 085f078307bac264301b07f6e47e2a04e90a6f1d . Please carefully check `git diff origin/main` before comm

[PATCH] D115960: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay reopened this revision. MaskRay added a subscriber: ldionne. MaskRay added a comment. (CC @ldionne @smeenai) The revert 859ebca744e634dcc89a2294ffa41574f947bd62 included many unintended changes. Repository: rG LLV

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88833#3222828 , @fiesh wrote: >> My expectation was that @fiesh would be updating the review if they wanted >> this to land. If they indicate they're no longer interested in working on >> the patch, then I think it's fi

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. And there he is :) I've never worked on LLVM / clang-tidy but could have a look at making it opt-in. Now we know the status at least. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88833/new/ https://reviews.llvm.org/D88833

[PATCH] D115425: [clangd] Generate ConfigFragment/YAML/docs from one tablegen source

2022-01-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D115425#3222782 , @njames93 wrote: > For the website, we use tags to specify the clangd version that the option > was first supported in. > I'd suggest that we also add a `Version` field to the `Field` class. > This could al

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. Sounds good @aaron.ballman, let's wait for @fiesh. Though I realize now that the scope of this patch is probably not enough to solve a problem we have in our code base. The check will warn about (for example) things like this: In a third party lib outside our control:

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-05 Thread fiesh via Phabricator via cfe-commits
fiesh added a comment. > My expectation was that @fiesh would be updating the review if they wanted > this to land. If they indicate they're no longer interested in working on the > patch, then I think it's fine for you to commandeer the patch. But you should > give them a chance to speak up in

[PATCH] D115960: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Herald added a subscriber: JDevlieghere. I believe you landed the wrong commit. rG859ebca744e634dcc89a2294ffa41574f947bd62 looks like the previous versions of this diff, where lots of extraneous chang

[PATCH] D115960: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-05 Thread David Salinas 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 rG859ebca744e6: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`." (authored by david-salinas). Herald added subscribers: cfe-commits, libc

[PATCH] D115106: [clang-tidy] Fix `readability-static-accessed-through-instance` false negative for static methods

2022-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D115106#3218117 , @sammccall wrote: > In D115106#3218000 , @aaron.ballman > wrote: > >>> I think `anyRedeclaration(functionDecl(isStaticStorageClass))`is too >>> difficult to ge

[PATCH] D115425: [clangd] Generate ConfigFragment/YAML/docs from one tablegen source

2022-01-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. For the website, we use tags to specify the clangd version that the option was first supported in. I'd suggest that we also add a `Version` field to the `Field` class. This could also cause problem down the line if we ever wanted to remove a config option. Repository:

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

2022-01-05 Thread Jack Kirk via Phabricator via cfe-commits
JackAKirk created this revision. JackAKirk added reviewers: Naghasan, tra, hiraditya, yaxunl. JackAKirk added projects: clang, LLVM. Herald added subscribers: asavonic, jholewinski. JackAKirk requested review of this revision. Herald added a subscriber: jdoerfert. Adds NVPTX intrinsics and builtin

[clang] 7df2371 - Add codegen for allocate directive's 'align' clause

2022-01-05 Thread Aaron Ballman via cfe-commits
Author: David Pagan Date: 2022-01-05T12:40:58-05:00 New Revision: 7df2371bc6518a63bdbe5f3c44bd064940808e35 URL: https://github.com/llvm/llvm-project/commit/7df2371bc6518a63bdbe5f3c44bd064940808e35 DIFF: https://github.com/llvm/llvm-project/commit/7df2371bc6518a63bdbe5f3c44bd064940808e35.diff L

[PATCH] D116670: [ASan] Driver changes to always link-in asan_static library.

2022-01-05 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov created this revision. kstoimenov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This enables the changes from D116182 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D116670

Re: [PATCH] D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0

2022-01-05 Thread Andrey Mishchenko via cfe-commits
That's what happens when you hit the column limit, when there is a column limit. But do we really want every one-symbol import to wrap to 3 lines when `ColumnLimit: 0`? Slash to force the user to unwrap every import, even 20-symbol 300-column imports, to a single line? On Wed, Jan 5, 2022 at 12:13

[PATCH] D116182: [ASan] Moved optimized callbacks into a separate library.

2022-01-05 Thread Kirill Stoimenov 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 rG027ffb173a68: [ASan] Moved optimized callbacks into a separate library. (authored by kstoimenov). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D116182: [ASan] Moved optimized callbacks into a separate library.

2022-01-05 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 397613. kstoimenov added a comment. Removed driver part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116182/new/ https://reviews.llvm.org/D116182 Files: compiler-rt/lib/asan/CMakeLists.txt compiler-rt

[PATCH] D116596: [clang][dataflow] Add transfer functions for assignment

2022-01-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:36 +/// FIXME: Consider replacing this with a model that is more aligned with C++ +/// value categories. +enum class SkipPast { ymandel wrote: > I'm not

  1   2   3   >