[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-21 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp requested changes to this revision. carlosgalvezp added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/readability-duplicate-include/readability-duplicate-include.h:1 +#if

[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/LanguageExtensions.rst:549 + T __builtin_elementwise_add_sat(T x, T y) return the sum of x and y, clamped to the range of signed or integer types + values representable by

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2022-01-21 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 402180. lichray added a comment. - Flip the default and set EntireContentsOfLargeArray off only in diagnosis Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115031/new/ https://reviews.llvm.org/D115031 Files:

[PATCH] D117913: [Clang][RISCV] Guard vmulh, vsmul correctly

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:1321 ListSeparator LS(" && "); + // Full multiplies for EEW=64 require V. + if (PredefinedMacros & RISCVPredefinedMacro::V) It's not as useful here. Should put it on line

[PATCH] D117881: [X86] Remove avx512f integer and/or/xor/min/max reduction intrinsics and use generic equivalents

2022-01-21 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/D117881/new/ https://reviews.llvm.org/D117881

[PATCH] D117881: [X86] Remove avx512f integer and/or/xor/min/max reduction intrinsics and use generic equivalents

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D117881#3263152 , @pengfei wrote: > What's the difference between `__builtin_reduce_and` and generating a > `Intrinsic::vector_reduce_and` in code? If this is just a simplification, why > can't be applied to `add` too?

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:3978 for (StringRef F : ReqFeatures) { -if (TI.hasFeature(F)) - continue; - -// If the feature is 64bit, alter the string so it will print better in -// the diagnostic. -if (F

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan added a comment. In D117854#3263206 , @eopXD wrote: > Maybe change the title to address more specifically of what this patch does? Done, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117854: [RISCV] Refactor Zve* extensions.

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. Maybe change the title to address more specifically of what this patch does? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/ https://reviews.llvm.org/D117854 ___

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD abandoned this revision. eopXD added a comment. In D117920#3263202 , @jacquesguan wrote: > I did some similar change in my revision https://reviews.llvm.org/D117854. Yeah I guess we can do that all in one commit. Thank you for doing it.

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan added a comment. I did some similar change in my revision https://reviews.llvm.org/D117854. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117920/new/ https://reviews.llvm.org/D117920 ___

[PATCH] D117854: [RISCV] Refactor Zve* extensions.

2022-01-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 402173. jacquesguan added a comment. Herald added a subscriber: jdoerfert. Fix test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/ https://reviews.llvm.org/D117854 Files:

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It's also make sense to mention `isLanguageVersionSupported`. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:79 +`Sphinx `_ and enable it in the CMake configuration. +To save build time of

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402172. eopXD added a comment. Update code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117920/new/ https://reviews.llvm.org/D117920 Files: llvm/lib/Support/RISCVISAInfo.cpp

[PATCH] D117881: [X86] Remove avx512f integer and/or/xor/min/max reduction intrinsics and use generic equivalents

2022-01-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. What's the difference between `__builtin_reduce_and` and generating a `Intrinsic::vector_reduce_and` in code? If this is just a simplification, why can't be applied to `add` too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402170. eopXD added a comment. Update code: adjust testcase due to change of implication. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117920/new/ https://reviews.llvm.org/D117920 Files:

[PATCH] D117605: [time-trace] Add optimizer and codegen regions to NPM

2022-01-21 Thread Wei Wang 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 rG55d887b83364: [time-trace] Add optimizer and codegen regions to NPM (authored by weiwang). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 55d887b - [time-trace] Add optimizer and codegen regions to NPM

2022-01-21 Thread Wei Wang via cfe-commits
Author: Wei Wang Date: 2022-01-21T19:17:57-08:00 New Revision: 55d887b833646baeea0e3371fd2cbbd7550a8d4d URL: https://github.com/llvm/llvm-project/commit/55d887b833646baeea0e3371fd2cbbd7550a8d4d DIFF: https://github.com/llvm/llvm-project/commit/55d887b833646baeea0e3371fd2cbbd7550a8d4d.diff

[PATCH] D117854: [RISCV] Refactor Zve* extensions.

2022-01-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan added a comment. In D117854#3261659 , @craig.topper wrote: > In D117854#3261618 , @eopXD wrote: > >> A question that bothers me is that we need to specify a specific feature to >> enable the

[PATCH] D117854: [RISCV] Refactor Zve* extensions.

2022-01-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 402166. jacquesguan added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/

[PATCH] D117746: [CMake] Pass CMAKE_C/CXX_COMPILER_LAUNCHER down to cross-compile and runtime build

2022-01-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 402162. ychen added a comment. - Add one more place this is needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117746/new/ https://reviews.llvm.org/D117746 Files: clang/runtime/CMakeLists.txt

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2022-01-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D114095#3261073 , @jansvoboda11 wrote: > @vsapsai do you have any further concerns? My only intended change at this > point is Duncan's suggestion. My understanding was that we were going with ID vectors approach and not

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Headers/float.h:40-41 # undef LDBL_MANT_DIG -# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) ||

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. More comments may follow, but didn't want to delay the first one. Comment at: clang/lib/Headers/float.h:20-21 */ -#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \ -__STDC_HOSTED__ && __has_include_next()

[PATCH] D117605: [time-trace] Add optimizer and codegen regions to NPM

2022-01-21 Thread Min-Yih Hsu via Phabricator via cfe-commits
myhsu accepted this revision. myhsu added a comment. This revision is now accepted and ready to land. LGTM I think this is neat. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117605/new/ https://reviews.llvm.org/D117605

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 402156. hubert.reinterpretcast edited the summary of this revision. hubert.reinterpretcast added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Refresh with full context Repository: rG LLVM Github Monorepo

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 402153. LegalizeAdulthood added a comment. Spelling CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117939/new/ https://reviews.llvm.org/D117939 Files: clang-tools-extra/docs/clang-tidy/Contributing.rst Index:

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-21 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. Thank you very much to both of you for having a look at the patch. Yes, I agree it is a large patch, and I could have done a better job splitting it up into more manageable chunks. One reason this change is so big is because I set myself an ambitious target

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: alexfh, aaron.ballman, ymandel, njames93. LegalizeAdulthood added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. LegalizeAdulthood requested review of this revision. - Mention pp-trace - CMake

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-21 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402149. psigillito added a comment. - revert bad changes and arclint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: clang/lib/Format/FormatToken.h

[PATCH] D116048: [clang][CodeGen][UBSan] VLA size checking for unsigned integer parameter

2022-01-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D116048#3261573 , @alexfh wrote: > We've started seeing some tests dying with SIGILL (illegal instruction) after > this patch. I'm working on a reduced repro, but please take a look, if you > can find any issues yourself.

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-21 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402142. psigillito added a comment. - revert to corner case handling with private Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint

[PATCH] D117937: [VFS] Add a "redirecting-with" field to overlays

2022-01-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added a comment. Note: I am in no way attached to the name I came up with and would be very open to something better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117937/new/ https://reviews.llvm.org/D117937

[PATCH] D117937: [VFS] Add a "redirecting-with" field to overlays

2022-01-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham created this revision. bnbarham added reviewers: akyrtzi, dexonsmith, keith, JDevlieghere. Herald added a subscriber: hiraditya. bnbarham requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Extend "fallthrough" to

[PATCH] D117929: [XRay] Add support for RISCV

2022-01-21 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. 1. Please upload patches with full context 2. You should not need to have separate xray_riscv32/64.cpp, a single shared file with a small amount of XLEN-based conditions should suffice and reduce a whole load of code duplication. Possibly also applies to the trampoline

[PATCH] D117730: [DNM][VFS] Do not overwrite the path when nesting RedirectingFileSystems

2022-01-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/test/VFS/directory.c:2 // RUN: rm -rf %t -// RUN: mkdir -p %t/Underlying -// RUN: mkdir -p %t/Overlay -// RUN: mkdir -p %t/Middle -// RUN: echo '// B.h in Underlying' > %t/Underlying/B.h -// RUN: echo '#ifdef NESTED' >>

[PATCH] D117730: [DNM][VFS] Do not overwrite the path when nesting RedirectingFileSystems

2022-01-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham updated this revision to Diff 402130. bnbarham added a comment. Modified `directory.c` to make the test difference clearer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117730/new/ https://reviews.llvm.org/D117730 Files:

[clang] 10d0d8c - [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-21 Thread John Ericson via cfe-commits
Author: John Ericson Date: 2022-01-21T23:58:08Z New Revision: 10d0d8c0c1db57b7ff465df7ced78a42a20d592d URL: https://github.com/llvm/llvm-project/commit/10d0d8c0c1db57b7ff465df7ced78a42a20d592d DIFF: https://github.com/llvm/llvm-project/commit/10d0d8c0c1db57b7ff465df7ced78a42a20d592d.diff LOG:

[PATCH] D117419: [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-21 Thread John Ericson via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG10d0d8c0c1db: [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs (authored by Ericson2314).

[PATCH] D117419: [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. I will land this next as part of my great D99484 bisect. Now that I have in fact found the issue, I am more confident this part, which is analogous to all the parts that have gone in fine, is harmless. Repository: rG LLVM

[PATCH] D116910: [OpenMP][3/3] Introduce the KernelEnvironment into Clang tests

2022-01-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LGTM if it passes all the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116910/new/ https://reviews.llvm.org/D116910

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Pre-merge check failure with clang-format complaints :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117809/new/ https://reviews.llvm.org/D117809 ___ cfe-commits mailing list

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/include/clang/Driver/Types.def:103 TYPE("hip-fatbin", HIP_FATBIN, INVALID, "hipfb", phases::Compile, phases::Backend, phases::Assemble, phases::Link) +TYPE("api-information", API_INFO,

[PATCH] D117746: [CMake] Pass CMAKE_C/CXX_COMPILER_LAUNCHER down to cross-compile and runtime build

2022-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. Sure, seems reasonable to me. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117746/new/ https://reviews.llvm.org/D117746

[PATCH] D117931: [Clang] Support `address_space` attribute in `#pragma clang attribute

2022-01-21 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. egorzhdan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change adds support for type attributes (for example,

[PATCH] D117746: [CMake] Pass CMAKE_C/CXX_COMPILER_LAUNCHER down to cross-compile and runtime build

2022-01-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Hi @dexonsmith, sorry for the quick ping. Does this look good to you? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117746/new/ https://reviews.llvm.org/D117746 ___

[PATCH] D117730: [DNM][VFS] Do not overwrite the path when nesting RedirectingFileSystems

2022-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/VFS/directory.c:2 // RUN: rm -rf %t -// RUN: mkdir -p %t/Underlying -// RUN: mkdir -p %t/Overlay -// RUN: mkdir -p %t/Middle -// RUN: echo '// B.h in Underlying' > %t/Underlying/B.h -// RUN: echo '#ifdef NESTED' >>

[PATCH] D117730: [DNM][VFS] Do not overwrite the path when nesting RedirectingFileSystems

2022-01-21 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/test/VFS/directory.c:2 // RUN: rm -rf %t -// RUN: mkdir -p %t/Underlying -// RUN: mkdir -p %t/Overlay -// RUN: mkdir -p %t/Middle -// RUN: echo '// B.h in Underlying' > %t/Underlying/B.h -// RUN: echo '#ifdef NESTED' >>

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron marked an inline comment as done. Izaron added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5223 +/// matches the declaration of foo and bar. +AST_MATCHER(VarDecl, isConstinit) { return Node.hasAttr(); } + aaron.ballman

[PATCH] D117730: [DNM][VFS] Do not overwrite the path when nesting RedirectingFileSystems

2022-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @keith, any thoughts on this? IIRC, you'd found a few other bugs while you were in there which you'd left for later; not sure if this is related to them or not. Comment at: clang/test/VFS/directory.c:2 // RUN: rm -rf %t -// RUN: mkdir -p

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 402111. Izaron added a comment. Fix: accept only keyword, not the attribute itself Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117846/new/ https://reviews.llvm.org/D117846 Files:

[PATCH] D117929: [XRay] Add support for RISCV

2022-01-21 Thread Ashwin Poduval via Phabricator via cfe-commits
ashwin98 created this revision. ashwin98 added reviewers: dberris, asb. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D117569: Constexpr not supported with __declspec(dllimport).

2022-01-21 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. @majnemer I did take an example completely different with no use of the constexpr in order to understand (at least for me) when the _imp prefix is generated with CL. This is sample.cpp: #include __declspec(dllexport) void PrintHello() { std::cout << "hello" <<

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Victoria Mitchell via Phabricator via cfe-commits
QuietMisdreavus added inline comments. Comment at: clang/include/clang/Driver/Types.def:103 TYPE("hip-fatbin", HIP_FATBIN, INVALID, "hipfb", phases::Compile, phases::Backend, phases::Assemble, phases::Link) +TYPE("api-information", API_INFO,

[clang] 653b007 - [CodeComplete] fix nullptr crash in 612f5ed8823120

2022-01-21 Thread via cfe-commits
Author: Sam McCall Date: 2022-01-21T23:18:23+01:00 New Revision: 653b007dc186845699d330c66dc9dfb3aaf396df URL: https://github.com/llvm/llvm-project/commit/653b007dc186845699d330c66dc9dfb3aaf396df DIFF: https://github.com/llvm/llvm-project/commit/653b007dc186845699d330c66dc9dfb3aaf396df.diff

[PATCH] D117830: [HeaderSearch] Track framework name in LookupFile

2022-01-21 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Cyndy and Jan, hopefully ya'll are the right reviewers here? We're using this Framework information to know to compute framework style includes in https://reviews.llvm.org/D117056 for clangd, please LMK if this is a bad idea and we should do something else.

[PATCH] D117924: [compiler_rt] Add a seperate runtime for Mac Catalyst

2022-01-21 Thread Byoungchan Lee via Phabricator via cfe-commits
bc-lee created this revision. Herald added a subscriber: mgorny. bc-lee requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Mac Catalyst has different platform fields in build_version_command, so it's natural to create a

[PATCH] D117611: [Sema] Warn about printf %n on Android and Fuchsia

2022-01-21 Thread Alex Brachet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd4e600f5f5c: [Sema] Warn about printf %n on Android and Fuchsia (authored by abrachet). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[clang] cd4e600 - [Sema] Warn about printf %n on Android and Fuchsia

2022-01-21 Thread Alex Brachet via cfe-commits
Author: Alex Brachet Date: 2022-01-21T21:00:39Z New Revision: cd4e600f5f5cedd092c8ff19c208897034494f3d URL: https://github.com/llvm/llvm-project/commit/cd4e600f5f5cedd092c8ff19c208897034494f3d DIFF: https://github.com/llvm/llvm-project/commit/cd4e600f5f5cedd092c8ff19c208897034494f3d.diff LOG:

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402085. eopXD added a comment. Update code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117920/new/ https://reviews.llvm.org/D117920 Files: llvm/lib/Support/RISCVISAInfo.cpp Index:

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402080. eopXD added a comment. Update code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117920/new/ https://reviews.llvm.org/D117920 Files: clang/lib/Basic/Targets/RISCV.cpp

[PATCH] D117920: [RISCV] Decouple V and Zve64*

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD created this revision. eopXD added reviewers: craig.topper, asb. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-21 Thread ksyx via Phabricator via cfe-commits
ksyx added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:134 + OperateIndex + 1 < Lines.size()) { +// UnwrappedLineParser's recognition of free-standing macro like +// Q_OBJECT may also recognize some uppercased type names

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-21 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 402078. ksyx marked an inline comment as done. ksyx added a comment. Apply review suggestions of renaming. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117520/new/ https://reviews.llvm.org/D117520 Files:

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > Won't that end up producing a warning on ALL code built on any Linux distro > with a GCC toolchain older than 12.1? That would be terrible. Good point. Yes, so should be something like: IsDistroWithNewToolchain = ( Distro.IsRedhat() && Distro >= Distro::RHEL9 ||

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-21 Thread ksyx via Phabricator via cfe-commits
ksyx marked an inline comment as done. ksyx added inline comments. Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:47 llvm::StringRef ExpectedCode = "") { ::testing::ScopedTrace t(File, Line, ::testing::Message() <<

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 402074. zixuw added a comment. - Remove unrelated whitespace change - Remove unnecessary code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117809/new/ https://reviews.llvm.org/D117809 Files:

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5223 +/// matches the declaration of foo and bar. +AST_MATCHER(VarDecl, isConstinit) { return Node.hasAttr(); } + This isn't quite correct -- there are two forms of

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 402071. LegalizeAdulthood added a comment. - Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/ https://reviews.llvm.org/D7982 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D7982#3260403 , @carlosgalvezp wrote: > LGTM! Had some nits that can be fixed without review. I think you need to do "Accept Revision" in phabricator. It's in the "Add Action..." dropdown on the bottom of the review

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-21 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/readability-duplicate-include/readability-duplicate-include.h:1 +#if !defined(READABILITY_DUPLICATE_INCLUDE_H) +#define READABILITY_DUPLICATE_INCLUDE_H

[PATCH] D117913: [Clang][RISCV] Guard vmulh, vsmul correctly

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:812 RISCVPredefinedMacros |= RISCVPredefinedMacro::RV64; +if (Extension == "FullMultiply" && +(RISCVPredefinedMacros & RISCVPredefinedMacro::VectorMaxELen64))

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:134 + OperateIndex + 1 < Lines.size()) { +// UnwrappedLineParser's recognition of free-standing macro like +// Q_OBJECT may also recognize some uppercased

[PATCH] D117894: [clang-format] Space between attribute closing parenthesis and qualified type colon.

2022-01-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. At least a semicolon as the attribute can be at the end of a declaration. I don't know all possible contexts of attributes TBH. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117894/new/ https://reviews.llvm.org/D117894

[PATCH] D117894: [clang-format] Space between attribute closing parenthesis and qualified type colon.

2022-01-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Is there any case where we want not a space after such paren (except it is also a paren)? if (Left.is(TT_AttributeParen)) return Right.isNot(TT_attributeParen); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added inline comments. Comment at: clang/lib/Driver/ToolChains/PPCLinux.cpp:50 + if (!SupportIEEEFloat128(D, Triple, Args)) { +if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) { + StringRef ABIName = A->getValue(); Seems that this will be

[PATCH] D117913: [Clang][RISCV] Guard vmulh, vsmul correctly

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. I changed the test commands in `vmul.c` and `vsmul.c` to use `zve64d` to make sure I don't miss anything I should move to the created files - `vmul-eew64.c` and `vsmul-eew64.c` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117830: [HeaderSearch] Track framework name in LookupFile

2022-01-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall resigned from this revision. sammccall added subscribers: jansvoboda11, cishida. sammccall added a comment. Thanks for splitting this out from the other patch. This feels subtle and I don't think I know enough about frameworks to review. @cishida made a recent change here which

[PATCH] D117181: [PowerPC] Use IEEE long double in proper toolchain

2022-01-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D117181#3261396 , @jsji wrote: > So, the proposal is we change the default on Linux, so we will not change > the default based on the gcc version, it is based on OS and clang version > only. > but will emit warning if we

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-01-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Looks good overall. Please do check that the generated PTX does get assembled by ptxas. There are few newer variants of these instructions that appear to be missing. E.g. `{min/max}.xorsign.abs`. If you only intended to add instructions available in PTX-7.0, which, based

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

2022-01-21 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D116966#3261479 , @beanz wrote: > Have you looked at the impact on binary size? PLUGIN_TOOL _should_ cause the > plugins to link against the copy of LLVM & Clang in the tool target binary > which reduces the binary size of

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2431 {frontend::PrintDependencyDirectivesSourceMinimizerOutput, - OPT_print_dependency_directives_minimized_source}, }; ributzka wrote: > This looks like an

[PATCH] D117860: [RISCV] Remove experimental prefix from rvv-related extensions.

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. In D117860#3261453 , @frasercrmck wrote: > Thanks for the patch! Not sure the best way to review this. The tests are > passing, which is a good sign. One option could be to split the "meaningful" > changes into a separate diff

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2022-01-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be great to finalize patch and close issue #37603. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56644/new/ https://reviews.llvm.org/D56644 ___ cfe-commits mailing

[clang] e6ceec9 - [Clang][RISCV] Restrict rvv builtins with zve macros

2022-01-21 Thread via cfe-commits
Author: eopXD Date: 2022-01-21T10:39:16-08:00 New Revision: e6ceec9c1d190cdd465548161df6c8ebbb327739 URL: https://github.com/llvm/llvm-project/commit/e6ceec9c1d190cdd465548161df6c8ebbb327739 DIFF: https://github.com/llvm/llvm-project/commit/e6ceec9c1d190cdd465548161df6c8ebbb327739.diff LOG:

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtins with zve macros

2022-01-21 Thread Yueh-Ting Chen 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 rGe6ceec9c1d19: [Clang][RISCV] Restrict rvv builtins with zve macros (authored by eopXD). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtins with zve macros

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added a comment. In D112986#3261933 , @frasercrmck wrote: > LGTM too. Though the commit title and message has hyphens in places I > wouldn't expect them. `macros` and `builtins` is fine. Thank you to also drop by and take a look :)

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtin-s with zve macro-s

2022-01-21 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added a comment. LGTM too. Though the commit title and message has hyphens in places I wouldn't expect them. `macros` and `builtins` is fine. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:797 // Init RISC-V extensions for (const auto : OutInTypes) {

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtin-s with zve macro-s

2022-01-21 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/D112986/new/ https://reviews.llvm.org/D112986

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtin-s with zve macro-s

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402036. eopXD marked an inline comment as done. eopXD added a comment. Cleanup unused enum. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112986/new/ https://reviews.llvm.org/D112986 Files:

[PATCH] D117860: [RISCV] Remove experimental prefix from rvv-related extensions.

2022-01-21 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 402034. eopXD added a comment. Cleanup redundant code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117860/new/ https://reviews.llvm.org/D117860 Files: clang/test/CodeGen/RISCV/riscv-attr-builtin-alias-err.c

[PATCH] D112986: [Clang][RISCV] Restrict rvv builtin-s with zve macro-s

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:144 Basic = 0, F = 1 << 1, D = 1 << 2, Drop F and D here? Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:1319 ListSeparator LS(" && "); -

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2022-01-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. The asm variable used by rocm aomp is zero overhead, needs no compiler support and works exactly as one would wish under inlining or code elimination. The main argument against that approach seems to be it's an abi break, much like this patch was, and that it

[PATCH] D117860: [RISCV] Remove experimental prefix from rvv-related extensions.

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:429 StringRef ExtName = Feature; +dbgs() << ExtName << "\n"; bool Experimental = false; Drop this? Or wrap it in LLVM_DEBUG Repository: rG LLVM Github Monorepo

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-21 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka accepted this revision. ributzka added a comment. This revision is now accepted and ready to land. LGTM. Just a few minor nits. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7082 CmdArgs.push_back(Args.MakeArgString(OutputFilename)); +} else if

[PATCH] D117137: [Driver] Add CUDA support for --offload param

2022-01-21 Thread Daniele Castagna via Phabricator via cfe-commits
dcastagna updated this revision to Diff 402031. dcastagna added a comment. Rebase on ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117137/new/ https://reviews.llvm.org/D117137 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D107290: [PoC][RISCV] Add support for the vscale_range attribute

2022-01-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp:101 + } else { +RVVBitsMin = RVVVectorBitsMinOpt; +RVVBitsMax = RVVVectorBitsMaxOpt; frasercrmck wrote: > frasercrmck wrote: > > craig.topper wrote: > > > If

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2022-01-21 Thread Jeff Sandoval via Phabricator via cfe-commits
sandoval added a comment. I don't see a clear explain the motivation for this change - can you confirm my understanding or provide clarification? It looks like the issue is that D110337 caused a regression for cases when user code directly calls a device

[PATCH] D98574: [Sparc] Don't define __sparcv9 and __sparcv9__ when targeting V8+

2022-01-21 Thread Fangrui Song 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 rG5061eb6b0121: [Sparc] Dont define __sparcv9 and __sparcv9__ when targeting V8+ (authored by glaubitz, committed by MaskRay). Repository: rG LLVM

[clang] 5061eb6 - [Sparc] Don't define __sparcv9 and __sparcv9__ when targeting V8+

2022-01-21 Thread Fangrui Song via cfe-commits
Author: John Paul Adrian Glaubitz Date: 2022-01-21T09:57:17-08:00 New Revision: 5061eb6b0121af11a784d92e2dee5996858d04cd URL: https://github.com/llvm/llvm-project/commit/5061eb6b0121af11a784d92e2dee5996858d04cd DIFF:

  1   2   >