[PATCH] D111866: [RISCV] Support Zfhmin extension

2021-10-25 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence updated this revision to Diff 382195. achieveartificialintelligence added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111866/new/ https://reviews.llvm.org/D111866 Files:

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review! I forgot to mention the Differential Revision in the commit message after pushing so this review stays open, is there any way I can add it now in some other way? I suppose we don't want force-push? CHANGES SINCE LAST ACTION

[clang-tools-extra] b43a2ae - [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2021-10-26T05:45:25Z New Revision: b43a2aee4ee946d8897880e824f4b09fe4c46143 URL: https://github.com/llvm/llvm-project/commit/b43a2aee4ee946d8897880e824f4b09fe4c46143 DIFF: https://github.com/llvm/llvm-project/commit/b43a2aee4ee946d8897880e824f4b09fe4c46143.diff

[PATCH] D112390: [AIX][ZOS] Disable tests due to lack of Objective-C support

2021-10-25 Thread Jake Egan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ff1bcab970a: [AIX][ZOS] Disable tests due to lack of Objective-C support (authored by Jake-Egan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112390/new/

[clang] 1ff1bca - [AIX][ZOS] Disable tests due to lack of Objective-C support

2021-10-25 Thread Jake Egan via cfe-commits
Author: Jake Egan Date: 2021-10-25T23:32:13-04:00 New Revision: 1ff1bcab970afaef49e2ab8ab7681a12d11ad17d URL: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d DIFF: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d.diff

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 382171. jdoerfert added a comment. Actually use the new wrapper for OpenMP offload targeting AMD (and the new RT) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112504/new/ https://reviews.llvm.org/D112504

[PATCH] D109506: [clangd] Print current request context along with the stack trace

2021-10-25 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D109506#3086183 , @thakis wrote: > This doesn't build on windows: http://45.33.8.238/win/47615/step_4.txt > > Please take a look and revert for now if it takes a while to fix. I pushed rGba94b8bdffb4

[clang-tools-extra] ba94b8b - [clangd] Attempt to fix buildbots

2021-10-25 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2021-10-25T20:16:59-07:00 New Revision: ba94b8bdffb4c65d5475746a6ba43d279683e5bd URL: https://github.com/llvm/llvm-project/commit/ba94b8bdffb4c65d5475746a6ba43d279683e5bd DIFF: https://github.com/llvm/llvm-project/commit/ba94b8bdffb4c65d5475746a6ba43d279683e5bd.diff

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108696#3086011 , @lewissbaker wrote: > So am I correct in understanding that the main issue with the chicken/egg > problem for updating both the compiler to use the new stdlib facilities and > updating the stdlib

[PATCH] D109506: [clangd] Print current request context along with the stack trace

2021-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This doesn't build on windows: http://45.33.8.238/win/47615/step_4.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109506/new/

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, tianshilei1992, jhuber6. Herald added subscribers: guansong, bollu, yaxunl. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added projects: clang, OpenMP. To support

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-25 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1059 +#undef strcasecmp +#undef strncasecmp + thakis wrote: > Why do we need this with bazel but not with other windows builds? I don't know how this never was hit by other

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. That sounds right. You can test that scenario in a debugger, by putting a breakpoint before BuryPointer in clang/tools/driver/driver.cpp and verifying that the TimerGroup still has a pointer to the deleted stack frames, after the CrashRecoveryContext has successfully

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1059 +#undef strcasecmp +#undef strncasecmp + Why do we need this with bazel but not with other windows builds? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112399/new/

Re: [clang] 2edb89c - Lex arguments for __has_cpp_attribute and friends as expanded tokens

2021-10-25 Thread Nico Weber via cfe-commits
Looks like the reason for this check was that https://github.com/llvm/llvm-project/blob/3b42fc8a07c37e47efae80c931eff7e63103e0e9/clang/include/clang/Basic/Attr.td#L1946 contains __unsafe_unretained despite it just being a macro here:

Re: [clang] 2edb89c - Lex arguments for __has_cpp_attribute and friends as expanded tokens

2021-10-25 Thread Nico Weber via cfe-commits
Was this reviewed anywhere? I'll note that some internal project apparently used to check `#if __has_attribute(__unsafe_unretained)`. That used to silently (and incorrectly I think) always return 0 as far as I can tell, but now it fails with: ``` $ out/gn/bin/clang -c foo.mm foo.mm:1:21: error:

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-25 Thread Richard Howell via Phabricator via cfe-commits
rmaz abandoned this revision. rmaz added a comment. @vsapsai i'll abandon this diff then, thanks for your extensive feedback on the approach. Is D110123 shippable already, or are there some more corner cases to cover? Repository: rG LLVM Github Monorepo

[PATCH] D110092: [clang][NFC] encapsulate global method list in GlobalMethodPool

2021-10-25 Thread Richard Howell via Phabricator via cfe-commits
rmaz abandoned this revision. rmaz added a comment. Abandoning in favor of D110123 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110092/new/ https://reviews.llvm.org/D110092

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D112498#3086029 , @aganea wrote: > This Timer is actually the test coverage for that commit. Ah, our issue is that it runs in production as well as in the tests. Each time the parser sees the crash pragma it dumps a bunch

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2021-10-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 382155. void added a comment. Count sub/super registers as "uses" in terminating instructions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files:

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. This Timer is actually the test coverage for that commit. If we don’t want it here, I guess you could move it to the Support unit tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112498/new/

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker added a comment. So am I correct in understanding that the main issue with the chicken/egg problem for updating both the compiler to use the new stdlib facilities and updating the stdlib facilities is that we don't want to issue warnings about using `` and telling users to use ``

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: kadircet, aganea. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This seems to be temporary code for testing 28ad9fc20823678881baa0d723834b88ea9e8e3a

[clang-tools-extra] aa1ac2a - [clangd] Flush stderr after signal handlers run, so we always get the full stack/crash info

2021-10-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2021-10-26T01:08:36+02:00 New Revision: aa1ac2ae451e54dfa19dce2794800bbd034e2194 URL: https://github.com/llvm/llvm-project/commit/aa1ac2ae451e54dfa19dce2794800bbd034e2194 DIFF: https://github.com/llvm/llvm-project/commit/aa1ac2ae451e54dfa19dce2794800bbd034e2194.diff

[PATCH] D109506: [clangd] Print current request context along with the stack trace

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG045695f85cb8: [clangd] Print current request context along with the stack trace (authored by 0x1eaf, committed by sammccall). Changed prior to commit:

[clang-tools-extra] 045695f - [clangd] Print current request context along with the stack trace

2021-10-25 Thread Sam McCall via cfe-commits
Author: Emma Blink Date: 2021-10-26T00:58:09+02:00 New Revision: 045695f85cb8cdf9b8373123749efe1781f337b4 URL: https://github.com/llvm/llvm-project/commit/045695f85cb8cdf9b8373123749efe1781f337b4 DIFF: https://github.com/llvm/llvm-project/commit/045695f85cb8cdf9b8373123749efe1781f337b4.diff

[PATCH] D112271: [clang][Fuchsia] Add additional unit test for availability attr

2021-10-25 Thread Haowei Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG07bed3ae52b0: [clang][Fuchsia] Add additional unit test for availability attr (authored by haowei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 07bed3a - [clang][Fuchsia] Add additional unit test for availability attr

2021-10-25 Thread Haowei Wu via cfe-commits
Author: Haowei Wu Date: 2021-10-25T15:40:30-07:00 New Revision: 07bed3ae52b0a94d9de7f12ca5f2a92589c6c4b6 URL: https://github.com/llvm/llvm-project/commit/07bed3ae52b0a94d9de7f12ca5f2a92589c6c4b6 DIFF: https://github.com/llvm/llvm-project/commit/07bed3ae52b0a94d9de7f12ca5f2a92589c6c4b6.diff

[PATCH] D112447: [clangd] IncludeCleaner: Support macros

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:140 +// locations for the found macros. +void findReferencedMacros(ParsedAST , ReferencedLocations ) { + auto Tokens = can you add a trace for this and verify that it's not

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-10-25 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 382143. yonghong-song added a comment. - fix clang-format warnings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99/new/ https://reviews.llvm.org/D99 Files: clang/include/clang/Basic/Attr.td

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:182 +def FeatureExtZve32x +: SubtargetFeature<"experimental-zve32x", "HasStdExtZve32x", "true", frasercrmck wrote: > Do we need to define distinct `SubtargetFeature`s for each

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:184 Builder.defineMacro("__riscv_v_min_vlen", Twine(MinVLen)); +Builder.defineMacro("__riscv_v_max_eew", Twine(MaxEew)); +Builder.defineMacro("__riscv_v_max_eew_fp", Twine(MaxEewFp));

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:141 + // either v or zve* suppaort v instructions + bool hasStdExtV() const { return HasStdExtV || HasStdExtZve32x; } + bool hasStdExtZve32x() const { return HasStdExtZve32x; }

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State, LHS, BO_NE, Zero); if

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2021-10-25 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3034616 , @nickdesaulniers wrote: > We'll probably need to investigate code gen a little. > > A mainline linux kernel defconfig built with `CONFIG_ZERO_CALL_USED_REGS=y` > enabled doesn't boot, for example. I consider

[PATCH] D112493: [OpenMP][NFCI] Record the location string as part of the ident_t

2021-10-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: tianshilei1992, jhuber6, JonChesterfield. Herald added subscribers: ormris, guansong, bollu, hiraditya, yaxunl. jdoerfert requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald added

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State, LHS, BO_NE, Zero); if (!State)

[PATCH] D112403: [clangd] Respect diagnostic suppression during preamble build

2021-10-25 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6a971b1baec: [clangd] Respect diagnostic suppression during preamble build (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112403/new/

[clang-tools-extra] e6a971b - [clangd] Respect diagnostic suppression during preamble build

2021-10-25 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2021-10-25T17:39:32-04:00 New Revision: e6a971b1baecbeab612600337c1d2f06e3dea702 URL: https://github.com/llvm/llvm-project/commit/e6a971b1baecbeab612600337c1d2f06e3dea702 DIFF: https://github.com/llvm/llvm-project/commit/e6a971b1baecbeab612600337c1d2f06e3dea702.diff

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State =

[PATCH] D112353: [bazel] fixes for windows build

2021-10-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: utils/bazel/llvm-project-overlay/llvm/config.bzl:63 # MSVC specific -"stricmp=_stricmp", -"strdup=_strdup", +#"stricmp=_stricmp", +#"strdup=_strdup", GMNGeoffrey wrote: > Just commenting these out

[PATCH] D112492: [HIP] Do not use kernel handle for MSVC target

2021-10-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Currently Visual Studio 2019 has a linker issue which causes linking error when a template kernel is instantiated in different compilation units. On the other hand, it is unnecessary to prefix

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 4 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16669 +ExprResult Sema::SemaBuiltinElementwiseMath(CallExpr *TheCall, +ExprResult CallResult) { + if

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 382128. fhahn marked an inline comment as done. fhahn added a comment. Address comments @aaron.ballman, thanks! The most notable changes are using `UsualArithmeticConversions` for argument conversion and checking the canonical types. Also added a bunch of

[PATCH] D112353: [bazel] fixes for windows build

2021-10-25 Thread Geoffrey Martin-Noble via Phabricator via cfe-commits
GMNGeoffrey added a subscriber: chandlerc. GMNGeoffrey added a comment. Thanks for upstreaming your fixes :-) It looks like this has some overlap with https://reviews.llvm.org/D112399 and https://reviews.llvm.org/D111930. Let's let those land and then see what's still necessary here

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-25 Thread James King via Phabricator via cfe-commits
jcking1034 created this revision. jcking1034 added reviewers: ymandel, aaron.ballman. jcking1034 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This provides better support for `LambdaCapture`s, and implements several

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast.ll:158 ; CHECK-NEXT:vmv.x.s a0, v8 +; CHECK-NEXT:lui a1, 1048560 +; CHECK-NEXT:or a0, a0, a1 frasercrmck wrote: > What's going on here, do you know? I

[clang] da47ec3 - Basic: Stop using expectedToOptional() in FileManagerTest, NFC

2021-10-25 Thread Duncan P. N. Exon Smith via cfe-commits
Author: Duncan P. N. Exon Smith Date: 2021-10-25T13:44:45-07:00 New Revision: da47ec3ca076477b994a5fdd7b777aed9b8cbdf4 URL: https://github.com/llvm/llvm-project/commit/da47ec3ca076477b994a5fdd7b777aed9b8cbdf4 DIFF:

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-25 Thread Geoffrey Martin-Noble via Phabricator via cfe-commits
GMNGeoffrey accepted this revision. GMNGeoffrey added inline comments. This revision is now accepted and ready to land. Comment at: utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h:78 /* Define if we have sys/resource.h (rlimits) */ -#define

[PATCH] D112481: [Sema] fix nondeterminism in ASTContext::getDeducedTemplateSpecializationType

2021-10-25 Thread Igor Sugak via Phabricator via cfe-commits
sugak updated this revision to Diff 382109. sugak added a comment. apply clang-format suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112481/new/ https://reviews.llvm.org/D112481 Files: clang/lib/AST/ASTContext.cpp Index:

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG593814a10cb4: [clangd] IncludeCleaner: Complicated rules for enum usage (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112209/new/

[PATCH] D112221: Mark ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT as deprecated

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 382092. aaron.ballman added a comment. Rebased and hopefully fixes the CI pipeline failures. I find it very odd that Linux was failing but Windows was not... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112221/new/

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-10-25 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 382088. yonghong-song added a comment. - removed AttributedBTFType subclass. Instead of using corresponding *TypeLoc to retrieve string argument for btf_type_tag attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D112481: [Sema] fix nondeterminism in ASTContext::getDeducedTemplateSpecializationType

2021-10-25 Thread Igor Sugak via Phabricator via cfe-commits
sugak created this revision. sugak added a reviewer: rsmith. Herald added a subscriber: mgrang. sugak requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `DeducedTemplateSpecializationTypes` is a `llvm::FoldingSet` [1], where

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D112101: [AST] Fix the EndLoc calculation for ObjCObjectPointer

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Do you need someone to commit on your behalf? If so, let me know what name and email address you would like me to use for patch attribution and I can land it after giving

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D111457: [clang][test] Add lit helper for windows paths

2021-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: rnk. mstorsjo added a comment. In D111457#3085273 , @keith wrote: > Yep this makes sense. I would rather not scope that into this if that's ok. > Since this test was already invalid and broken (actual fix in >

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16673-16678 + Expr *A = TheCall->getArg(0); + Expr *B = TheCall->getArg(1); + QualType TyA = A->getType(); + QualType TyB = B->getType(); + + if (TyA != TyB) fhahn wrote: >

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D112334#3085119 , @tra wrote: > Is there a way to annotate the builtin vars in the header to let clang-tidy > know explicitly that the code must be handled in a special way? That

[PATCH] D110357: [Analyzer] Extend ConstraintAssignor to handle remainder op

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1618-1627 +const SymbolRef LHS = Sym->getLHS(); +const llvm::APSInt = +Builder.getBasicValueFactory().getValue(0, Sym->getType()); +// a % b != 0

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State, LHS, BO_NE, Zero); if

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-25 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D109632#3085187 , @dexonsmith wrote: > But another benefit of not double-storing transitively imported methods is > that it makes the PCMs more independent, tacking slightly closer to > "ImmediateDep1.pcm" being reproducible

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D112406: [Driver][AArch64]Add driver support for neoverse-512tvb target

2021-10-25 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. This one might get a `VScaleForTuning`: https://reviews.llvm.org/D112459 Do you need this as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112406/new/ https://reviews.llvm.org/D112406

[PATCH] D74130: [clang] fix consteval call in default arguments

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D74130#3079630 , @Tyker wrote: > In D74130#3073271 , @aaron.ballman > wrote: > >> @Tyker -- are you planning to pick this review back up again sometime in the >> near future? If

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-25 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 382075. mbenfield added a comment. rebase and rerun tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/ https://reviews.llvm.org/D111833 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D111457: [clang][test] Add lit helper for windows paths

2021-10-25 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. In D111457#3082398 , @mstorsjo wrote: > In D111457#3073726 , @keith wrote: > >> In D111457#3066508 , @mstorsjo >> wrote: >> >>> Wouldn't this one

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D109175: [openmp] Emit deferred diag only when device compilation presents

2021-10-25 Thread Wei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb283d55c90dd: [openmp] Emit deferred diag only when device compilation presents (authored by weiwang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] b283d55 - [openmp] Emit deferred diag only when device compilation presents

2021-10-25 Thread Wei Wang via cfe-commits
Author: Wei Wang Date: 2021-10-25T11:19:18-07:00 New Revision: b283d55c90dd0b9495c9e91a76c2c62e587eb9b6 URL: https://github.com/llvm/llvm-project/commit/b283d55c90dd0b9495c9e91a76c2c62e587eb9b6 DIFF: https://github.com/llvm/llvm-project/commit/b283d55c90dd0b9495c9e91a76c2c62e587eb9b6.diff

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 382065. kbobyrev added a comment. Delete duplicate tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112209/new/ https://reviews.llvm.org/D112209 Files: clang-tools-extra/clangd/IncludeCleaner.cpp

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-25 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D109632#3081580 , @vsapsai wrote: > We are targeting the use case where in impl.m we have > > @import ImmediateDep1; > @import ImmediateDep2; > ... > @import ImmediateDepN; > > and each of ImmediateDep has `@import

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:38 bool VisitTagType(TagType *TT) { +// For enumerations we will require only the definition if it's present and +// the underlying type is not specified.

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 382063. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve review & offline comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112209/new/ https://reviews.llvm.org/D112209

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1302 // in case the function pointer is referenced somewhere. - if (FD->isInlineBuiltinDeclaration() && Fn) { + if (Fn) { std::string FDInlineName = (Fn->getName() +

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Is there a way to annotate the builtin vars in the header to let clang-tidy know explicitly that the code must be handled in a special way? That would avoid the guesswork. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112334/new/ https://reviews.llvm.org/D112334

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 6 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16673-16678 + Expr *A = TheCall->getArg(0); + Expr *B = TheCall->getArg(1); + QualType TyA = A->getType(); + QualType TyB = B->getType(); + + if (TyA != TyB)

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen: a dyn_cast -> cast instance + clang-tidy fixes

2021-10-25 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. The description is a bit misleading. The dyn_cast->cast appears to be a minor part of this patch. I'd separate clang-tidy cleanups into a separate patch or would just describe all of these changes

[PATCH] D111047: CUDA/HIP: Allow __int128 on the host side

2021-10-25 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM. This could be useful for other types. E.g. `long double` is technically not supported by NVPTX. We current demote it to double, so host-side does not cause errors, but ideally it should be treated similar to what you propose for i128 here. Comment

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Bumping for an update here. We can tolerate a build breakage for our older kernels over the weekend, but we should really try to get this resolved by EOW, otherwise we need to look into reverting: - 3d6f49a56995b845c40be5827ded5d1e3f692cec

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Also: - Please add a unit test. You, can probably re-use the corresponding `bugprone` test and tell it to add the `cert-err33-c` check as well. If they are too different I suppose it's fine to create it's own standalone test? - Mention this new check in the

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 382038. carlosgalvezp added a comment. Move CUDA built-in declarations to a separate header, and create a macro to define the variables just like it's done in the real version. Back to named namespace. CHANGES SINCE LAST ACTION

[PATCH] D111854: [OPENMP51]Initial parsing/sema for append_args clause for 'declare variant'

2021-10-25 Thread Mike Rice via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd8699391a431: [OPENMP51]Initial parsing/sema for append_args clause for declare variant (authored by mikerice). Herald added projects: clang, Flang.

[clang] d869939 - [OPENMP51]Initial parsing/sema for append_args clause for 'declare variant'

2021-10-25 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2021-10-25T09:38:50-07:00 New Revision: d8699391a431af5730fe36ac4b05840020c42203 URL: https://github.com/llvm/llvm-project/commit/d8699391a431af5730fe36ac4b05840020c42203 DIFF: https://github.com/llvm/llvm-project/commit/d8699391a431af5730fe36ac4b05840020c42203.diff

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:45-50 +// The following functions are +// deliberately excluded because they can +// be called with NULL argument and in +// this case the check is not applicable: +// mblen,

[clang] 2e94c2b - [RISCV] Remove always_inline and nodebug attributes from RISCV vector intrinsic header.

2021-10-25 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-10-25T09:29:37-07:00 New Revision: 2e94c2bd75367a8a26ac71560963ecb9f0bf6bea URL: https://github.com/llvm/llvm-project/commit/2e94c2bd75367a8a26ac71560963ecb9f0bf6bea DIFF: https://github.com/llvm/llvm-project/commit/2e94c2bd75367a8a26ac71560963ecb9f0bf6bea.diff

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/builtins-elementwise-math.c:42 + // expected-error@-1 {{argument types do not match, 'float4' (vector of 4 'float' values) != 'int3' (vector of 3 'int' values)}} +} aaron.ballman wrote: > fhahn

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-err33-c.rst:7 +Warns on unused function return values. +This check corresponds to (a part of) CERT C Coding Standard rule `ERR33-C. +Detect and handle standard library errors

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16661 +Sema ) { + if (!Ty->getAs() && !ConstantMatrixType::isValidElementType(Ty)) { +S.Diag(Loc, diag::err_elementwise_math_invalid_arg_type) << Ty;

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. This check is likely to generate many warnings on a "random" open-source project because many of these functions are usually not checked. But the rule contains this list and if a project wants to conform this check can be useful. Repository: rG LLVM Github Monorepo

[clang] 16ceb44 - [clang] Use llvm::{count,count_if,find_if,all_of,none_of} (NFC)

2021-10-25 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-10-25T09:14:45-07:00 New Revision: 16ceb44e62c3e7e2077198bb0211fc89d5770bc4 URL: https://github.com/llvm/llvm-project/commit/16ceb44e62c3e7e2077198bb0211fc89d5770bc4 DIFF: https://github.com/llvm/llvm-project/commit/16ceb44e62c3e7e2077198bb0211fc89d5770bc4.diff

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112334#3084668 , @carlosgalvezp wrote: > Thanks for the review! > > I'm not super happy with the commit in the sense that it feels more like a > workaround than a proper fix, with the hardcoded name `__cuda_built_in`

[PATCH] D112102: [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude.

2021-10-25 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe2b7aabb57d5: [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude. (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] e2b7aab - [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude.

2021-10-25 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-10-25T09:03:59-07:00 New Revision: e2b7aabb57d50a9b16fe71c1f80b983dd61d3fbd URL: https://github.com/llvm/llvm-project/commit/e2b7aabb57d50a9b16fe71c1f80b983dd61d3fbd DIFF: https://github.com/llvm/llvm-project/commit/e2b7aabb57d50a9b16fe71c1f80b983dd61d3fbd.diff

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks, this looks good to me! However, please wait for clang-tidy owners' approval. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112409/new/ https://reviews.llvm.org/D112409

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review! I'm not super happy with the commit in the sense that it feels more like a workaround than a proper fix, with the hardcoded name `__cuda_built_in` and so on. But honestly I don't know how implement it more properly, for example check if

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 382012. carlosgalvezp marked an inline comment as done. carlosgalvezp added a comment. Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112334/new/ https://reviews.llvm.org/D112334 Files:

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 5 inline comments as done. fhahn added a comment. Thanks for taking a look! Comment at: clang/lib/Sema/SemaChecking.cpp:16659-16660 +// false. +static bool checkMathBuiltinElementType(SourceLocation Loc, QualType Ty, +Sema )

  1   2   >