[PATCH] D112453: [Sema] When dereferencing a pointer of dependent type, infer the result type.

2021-10-25 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. As per the comment in BuiltinTypes.def (see below), `Dependent` is allowed in context where the type is deducible, but is there any reason **not** to deduce the type if we can do it cheaply in some cases ? // This represents the type of an expression whose type is //

[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 381992. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Resolve review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112209/new/ https://reviews.llvm.org/D112209 Files: clang-

[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. sammccall

[PATCH] D111870: [clangd] Add a way to enable IncludeCleaner through config

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Mostly dumb nitpicks because this is user-facing magic strings... let's chat before doing another round so I'm not wasting your time. --- You've done some renaming from UnusedInclude -> UnusedHeaders. I feel bad because I did say in the last round > "Unused headers"

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 381997. pengfei added a comment. Address review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112413/new/ https://reviews.llvm.org/D112413 Files: clang/include/clang/Driver/Options.td clang/lib/Dr

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:99 +cl::desc("Skips setting up the RAX register when SSE is disabled and there " + "are no variable arguments passed in vector registers."), +cl::Hidden); joer

[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. This revision is now accepted and ready to land. In D112334#3081213 , @carlosgalvezp wrote: > Btw, regarding this `CHECK-MESSAGES-NOT`, how does it work? I can't find it > in `check_cl

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

2021-10-25 Thread Emma Blink via Phabricator via cfe-commits
0x1eaf added a comment. Are there any blockers to landing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109506/new/ https://reviews.llvm.org/D109506 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D112459: [AArch64] Enablement of Cortex-X2

2021-10-25 Thread Mubashar Ahmad via Phabricator via cfe-commits
mubashar_ created this revision. mubashar_ added reviewers: lenary, dmgreen. Herald added subscribers: hiraditya, kristof.beyls. mubashar_ requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Enables support for Cortex-X2 cores

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

2021-10-25 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto updated this revision to Diff 382004. CarolineConcatto added a comment. - remove neoverse-512tvb from Host.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112406/new/ https://reviews.llvm.org/D112406 Files: clang/test/Driver/a

[PATCH] D111434: [PowerPC] PPC backend optimization on conditional trap intrustions

2021-10-25 Thread Victor Huang via Phabricator via cfe-commits
NeHuang added a comment. gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111434/new/ https://reviews.llvm.org/D111434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] a543584 - [HIP][OpenMP] Fix assertion in deferred diag

2021-10-25 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2021-10-25T11:07:40-04:00 New Revision: a5435844f0e67c70963a1a743fef41b1a8eac4d3 URL: https://github.com/llvm/llvm-project/commit/a5435844f0e67c70963a1a743fef41b1a8eac4d3 DIFF: https://github.com/llvm/llvm-project/commit/a5435844f0e67c70963a1a743fef41b1a8eac4d3.dif

[PATCH] D112235: [HIP][OpenMP] Fix assertion in deferred diag due to incomplete class definition

2021-10-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGa5435844f0e6: [HIP][OpenMP] Fix assertion in deferred diag (authored by yaxunl). Herald added a project: cla

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

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall 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. kbobyrev

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

2021-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks for fixing this, LGTM! (This also reminds me that we should probably invalidate preambles on config changes one day) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D111224: [clang] Traverse enum integer-base specifiers in RAV

2021-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet closed this revision. kadircet marked an inline comment as done. kadircet added a comment. Landed as https://github.com/llvm/llvm-project/commit/4e4511df8d33a6fc02d5e46c681855db495187cd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111224/

[PATCH] D111120: [clangd] Find explicit references in the base-specifier of an enum decl

2021-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet resigned from this revision. kadircet added a comment. Herald added a subscriber: kadircet. I suppose this is obseleted by https://reviews.llvm.org/D111260 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20/new/ https://reviews.llvm.org/

[PATCH] D112459: [AArch64] Enablement of Cortex-X2

2021-10-25 Thread Dave Green via Phabricator via cfe-commits
dmgreen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:689 + "Cortex-X2 ARM processors", [ + FeatureFuseAES, + FeaturePostRAScheduler]>; Acco

[PATCH] D111120: [clangd] Find explicit references in the base-specifier of an enum decl

2021-10-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge abandoned this revision. nridge added a comment. Yep, thanks very much for the more complete fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20/new/ https://reviews.llvm.org/D20 ___ cfe

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

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D109506#3059313 , @0x1eaf wrote: > I've instrumented preamble building, but haven't instrumented background > indexing which is outside of `TUScheduler.cpp` and would require exposing > `crashDump*` helpers and preferably m

[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 &S

[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: clang-tools-extra/clang-tidy/reada

[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 the

[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 _

[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] 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 https://reviews.ll

[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` a

[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 L

[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

[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 &S) { + 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 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/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 wr

[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] 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, mbr

[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 LOG

[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

[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 https://reviews.llvm

[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 clang-

[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] 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] 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 a

[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] 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] 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() + ".inline").str();

[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 Files

[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. sammccall

[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 S

[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 clan

[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 LOG:

[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 https://reviews.llvm.org/D109175/n

[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() + ".inline").str(

[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 a

[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] 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 n

[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] 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 ev

[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() + ".inline").str();

[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 (!Stat

[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 &Zero = +Builder.getBasicValueFactory().getValue(0, Sym->getType()); +// a % b != 0 im

[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 wou

[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: > aaro

[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 > https://review

[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() + ".inline").str(

[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 a

[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() + ".inline").str();

[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 `FoldingSetNod

[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() + ".inline").str(

[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 https://rev

[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/ https://reviews.llvm.org/D

[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/ ht

[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: clang/lib/AS

[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 CLANG_HAVE_RLIMI

[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: https://github.com/llvm/llvm-project/commit/da47ec3ca076477b994a5fdd7b777aed9b8c

[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 b

[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 `LambdaCapture`-relat

[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] 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 addi

[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 (checkArgCount(*this,

[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 ker

[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 isn'

[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 = RCM.assumeSymRel(State,

[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] 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/

[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] 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 projec

[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 t

[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 (!Stat

[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] 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/RISCV.td:182 +def FeatureExtZve32x +: SubtargetFeature<"experimental-zve32x", "HasStdExtZve32x", "true", frasercrmck wrote: > Do we need to define distinct `SubtargetFeature`s for each of

[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] 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 &AST, ReferencedLocations &Result) { + auto Tokens = can you add a trace for this and verify tha

[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 LOG

[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 https://reviews.llvm.org/D112271/new/

[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 LO

[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: https://reviews.llvm.org/D109506?vs=379124&id=38214

<    1   2