[PATCH] D127742: [analyzer][NFC] Prefer using isa<> instead getAs<> in conditions

2022-06-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Why not replace all `getAs`? I suppose you picked conditions because `isa` can have variadic parameters. If we are about to keep `getAs` then why not replace only those occurrences where we see the benefit of the variadic `isa`? Repository: rG LLVM Github Monorepo

[PATCH] D127732: [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions

2022-06-14 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM Do we have a tool to automatically discover unused member functions? (There might be so many of them in CSA...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D126127: [analyzer][NFC] Relocate unary transfer functions

2022-06-14 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong 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/D126127/new/ https://reviews.llvm.org/D126127 _

[PATCH] D127734: [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions

2022-06-14 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:447 case nonloc::ConcreteIntKind: -return val.castAs().evalMinus(*this); +return makeIntVal(-X.cas

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126984#3581829 , @xbolva00 wrote: > I was thinking about this again and I am more and more unsure about this > feature. -Os/-Oz is something more than just some attribute. That's not stopped us from exposing attributes

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-14 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. LGTM (with one minor) - @efriedma any more feedback? Comment at: llvm/utils/TableGen/IntrinsicEmitter.cpp:82 // Emit code to translate GCC builtins into LLVM intrinsics. EmitIntrinsicToBuiltinMap(Ints, true, OS); "Clang buil

[PATCH] D127684: [NFC] Use `https` instead of `http` in the `LLVM.org` URLs

2022-06-14 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere requested changes to this revision. JDevlieghere added a comment. This revision now requires changes to proceed. +1 on breaking this down per sub-project and creating separate patches for review. I sampled the patch and about a quarter or so of the links I tried didn't work, even b

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> That's not stopped us from exposing attributes like minsize (and you >> proposed optsize as well) which get described in the same terms as -Os/-Oz >> in our documentation, so this ship has somewhat sailed. Well, there is no promise that attribute matches -O flag in

[PATCH] D127684: [NFC] Use `https` instead of `http` in the `LLVM.org` URLs

2022-06-14 Thread Shao-Ce SUN via Phabricator via cfe-commits
sunshaoce abandoned this revision. sunshaoce added a comment. Thanks for comments! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127684/new/ https://reviews.llvm.org/D127684 ___ cfe-commits mailing list

[PATCH] D125931: [clang][dataflow] Add support for correlated branches to optional model

2022-06-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:288 +bool isEngagedOptionalValue(const Value &OptionalVal, const Environment &env) { + auto *HasValueVal =

[PATCH] D125723: [MSVC] Add support for MSVC pragma optimize

2022-06-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I would like to hear quite strong motivating words. From https://reviews.llvm.org/D127565, Aaron mentioned "we have > 400 semantic attributes already and the support matrix for their combinations is pretty bad. ". Yes, this is a real good motivation why to rework th

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman created this revision. Herald added a project: All. Codesbyusman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D127759 Files: clang/include/clang/Basic/Diagno

[PATCH] D127745: [clang][dataflow] Rename `getPointeeLoc` to `getReferencePointeeLoc` and `getPointerPointeeLoc` respectively for ReferenceValue and PointerValue.

2022-06-14 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added a comment. On a high level, what's wrong with having `getPointeeLoc` members with different return types in `ReferenceValue` and `PointerValue`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127745/new/ https://reviews.llvm.org/D12774

[clang] 671eb7d - [clang] AST/Print: honor AlwaysIncludeTypeForTemplateArgument policy

2022-06-14 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-06-14T18:18:24+02:00 New Revision: 671eb7dc1e69fec251e115f4f49865895a43513a URL: https://github.com/llvm/llvm-project/commit/671eb7dc1e69fec251e115f4f49865895a43513a DIFF: https://github.com/llvm/llvm-project/commit/671eb7dc1e69fec251e115f4f49865895a43513a.dif

[PATCH] D126620: [clang] AST/Print: honor AlwaysIncludeTypeForTemplateArgument policy

2022-06-14 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG671eb7dc1e69: [clang] AST/Print: honor AlwaysIncludeTypeForTemplateArgument policy (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1266

[PATCH] D127745: [clang][dataflow] Rename `getPointeeLoc` to `getReferencePointeeLoc` and `getPointerPointeeLoc` respectively for ReferenceValue and PointerValue.

2022-06-14 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 436816. wyt added a comment. Modified renaming: getPointeeLoc of ReferenceValue is modified to getReferentLoc, getPointeeLoc remains unchanged for PointerValue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127745/n

[PATCH] D127746: [clang][dataflow] Convert `PointeeLoc` of PointerValue from reference to pointer. This allows PointeeLoc to be empty in the case of `nullptr`

2022-06-14 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 436817. wyt added a comment. Update naming of getPointeeLoc with respect to change in parent Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127746/new/ https://reviews.llvm.org/D127746 Files: clang/include/clang/

[PATCH] D127745: [clang][dataflow] Rename `getPointeeLoc` to `getReferentLoc` for ReferenceValue.

2022-06-14 Thread weiyi via Phabricator via cfe-commits
wyt added a comment. In D127745#3582085 , @sgatev wrote: > On a high level, what's wrong with having `getPointeeLoc` members with > different return types in `ReferenceValue` and `PointerValue`? IMO, it would be nice to distinguish the type of Value we

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 436821. steakhal marked an inline comment as done. steakhal added a comment. Use `getOriginRegion()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127306/new/ https://reviews.llvm.org/D127306 Files: clang/

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D127306#3581814 , @martong wrote: > In D127306#3580981 , @steakhal > wrote: > >> - Modify the `GenericTaintChecker::isStdin()` to look through //derived >> symbols//, to mitigate the

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-06-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: paulwalker-arm, aaron.ballman, aemerson, t.p.northover. Herald added subscribers: jdoerfert, kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber

[PATCH] D127763: [analyzer] Relax constraints on const qualified regions

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, martong, xazax.hun. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. Herald added a reviewer: Szelethus. Herald added a project: All. steak

[PATCH] D127742: [analyzer][NFC] Prefer using isa<> instead getAs<> in conditions

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D127742#3581874 , @martong wrote: > Why not replace all `getAs`? That's a massive change. I actually experimented with it and I see no advantage with that. > I suppose you picked conditions because `isa` can have variadic p

[PATCH] D127732: [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D127732#3581883 , @martong wrote: > LGTM > > Do we have a tool to automatically discover unused member functions? (There > might be so many of them in CSA...) I don't :( The closest I found on the web is this: https://gith

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. No other comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127460/new/ https://reviews.llvm.org/D127460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] cfc9151 - [analyzer][NFC] Relocate unary transfer functions

2022-06-14 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-06-14T18:56:43+02:00 New Revision: cfc915149c98ef1e791d20f1757df4b2c1e8655b URL: https://github.com/llvm/llvm-project/commit/cfc915149c98ef1e791d20f1757df4b2c1e8655b DIFF: https://github.com/llvm/llvm-project/commit/cfc915149c98ef1e791d20f1757df4b2c1e8655b.diff

[clang] 40940fb - [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions

2022-06-14 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-06-14T18:56:43+02:00 New Revision: 40940fb2a63d76d8eea601f9e6893aa24cbb0ad9 URL: https://github.com/llvm/llvm-project/commit/40940fb2a63d76d8eea601f9e6893aa24cbb0ad9 DIFF: https://github.com/llvm/llvm-project/commit/40940fb2a63d76d8eea601f9e6893aa24cbb0ad9.diff

[PATCH] D126127: [analyzer][NFC] Relocate unary transfer functions

2022-06-14 Thread Balázs Benics 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 rGcfc915149c98: [analyzer][NFC] Relocate unary transfer functions (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D127734: [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions

2022-06-14 Thread Balázs Benics 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 rG40940fb2a63d: [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions (authored by steakhal). Repository: rG LLVM Github Monor

[PATCH] D126192: [Driver] Improve linking options for target AVR

2022-06-14 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. We are seeing Clang driver test failures after this patch. On Fuchsia's mac clang builder, `Clang :: Driver/avr-ld.c` and `Clang :: Driver/avr-toolchain.c` are failing. Failed build task: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-mac-x64/b8811424

[PATCH] D127707: [Clang] Simplify unifying target features

2022-06-14 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:153 +if (UsedFeatures.insert(Feature.drop_front()).second) + UnifiedFeatures.push_back(Feature); } --

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

2022-06-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1750 +#undef TRANSFORM_TYPE_TRAIT_DEF +if (NextToken().is(tok::less)) { + Tok.setKind(tok::identifier); rsmith wrote: > Here you're checking for `trait<` and treating it as an identifi

[PATCH] D126308: cmake: use llvm dir variables for clang/utils/hmaptool

2022-06-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D126308#3581240 , @dyung wrote: > Can you take a look? Hi @dyung , thanks for the report and sorry for the trouble! Can you help me try to reproduce it? Which version of Visual Studio, and what preset are you using? Reposi

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-14 Thread Kees Cook via Phabricator via cfe-commits
kees accepted this revision. kees added a comment. This revision is now accepted and ready to land. Are the presubmit build failures unrelated? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 ___ cfe

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

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:3099-3100 + + { int a[T(__is_same(remove_pointer_t, int))]; } + { int a[T(__is_same(remove_pointer_t, S))]; } +} cjdb wrote: > cjdb wrote: > > rsmith wrote: > > > It seems stra

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-14 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. If the GCC developers split this into two distinct flags, should we land something we're just going to have to turn around and modify to match the new flags/semantics they've created? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://re

[clang] cf078ad - [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions

2022-06-14 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-06-14T19:15:20+02:00 New Revision: cf078adc90f02ad5c06162ad871035d970f072aa URL: https://github.com/llvm/llvm-project/commit/cf078adc90f02ad5c06162ad871035d970f072aa DIFF: https://github.com/llvm/llvm-project/commit/cf078adc90f02ad5c06162ad871035d970f072aa.diff

[PATCH] D127732: [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions

2022-06-14 Thread Balázs Benics 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 rGcf078adc90f0: [analyzer][NFC] Remove unused ExprEngine::evalBinOp functions (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-14 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. In D126864#3582360 , @nickdesaulniers wrote: > If the GCC developers split this into two distinct flags, should we land > something we're just going to have to turn around and modify to match the new > flags/semantics they've crea

[clang] 18a1fc8 - [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder

2022-06-14 Thread Petr Hosek via cfe-commits
Author: Petr Hosek Date: 2022-06-14T17:26:25Z New Revision: 18a1fc8459b7fa8ca639d53e4aa5e5f5d68e8407 URL: https://github.com/llvm/llvm-project/commit/18a1fc8459b7fa8ca639d53e4aa5e5f5d68e8407 DIFF: https://github.com/llvm/llvm-project/commit/18a1fc8459b7fa8ca639d53e4aa5e5f5d68e8407.diff LOG: [C

[PATCH] D115674: [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder

2022-06-14 Thread Petr Hosek 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 rG18a1fc8459b7: [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D127746: [clang][dataflow] Convert `PointeeLoc` of PointerValue from reference to pointer. This allows PointeeLoc to be empty in the case of `nullptr`

2022-06-14 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Value.h:189 public: - explicit PointerValue(StorageLocation &PointeeLoc) + explicit PointerValue(StorageLocation *PointeeLoc) : Value(Kind::Pointer), PointeeLoc(PointeeLoc) {} -

[clang] 21ff652 - [analyzer][NFC] Replace getLastArg with hasArg when applicable

2022-06-14 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-06-14T19:28:44+02:00 New Revision: 21ff652de9fc9fe7338a83e2e405aa6c5d824479 URL: https://github.com/llvm/llvm-project/commit/21ff652de9fc9fe7338a83e2e405aa6c5d824479 DIFF: https://github.com/llvm/llvm-project/commit/21ff652de9fc9fe7338a83e2e405aa6c5d824479.diff

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked 3 inline comments as done. steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:978 +assert(!Ty.isNull()); +if (Ty.isConstQualified() && Ty->isArithmeticType()) { // TODO: We could walk the complex types here and s

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. I'm open to tabling this and just implementing support for an empty optimization list for the pragma (i.e. `#pragma optimize("", on | off)`). For our use case, at the moment, we only see the pragma being used this way. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, erichkeane, xgupta. aaron.ballman added a comment. Thank you for looking into this! I'm adding a few more reviewers for awareness. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion">,

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126984#3582508 , @steplong wrote: > I'm open to tabling this and just implementing support for an empty > optimization list for the pragma (i.e. `#pragma optimize("", on | off)`). For > our use case, at the moment, we

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion"

[PATCH] D127182: [Clang][Modules] Merge availability attributes on imported decls

2022-06-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno 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/D127182/new/ https://reviews.llvm.org/D127182 ___ c

[PATCH] D127182: [Clang][Modules] Merge availability attributes on imported decls

2022-06-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Should we add a FIXME saying we need to handle other kinds of attributes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127182/new/ https://reviews.llvm.org/D127182 ___ cfe-

[PATCH] D126308: cmake: use llvm dir variables for clang/utils/hmaptool

2022-06-14 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D126308#3582337 , @mizvekov wrote: > In D126308#3581240 , @dyung wrote: > >> Can you take a look? > > Hi @dyung , thanks for the report and sorry for the trouble! > Can you help me try to

[PATCH] D127771: [HIP] fix long double size

2022-06-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kosarev, kerbowa, tpr, jvesely. Herald added a project: All. yaxunl requested review of this revision. For amdgpu target long double type is the same as double type. The width and align of long double type was in

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. > I appreciate your patience while we figure out the right approach here; we > don't usually have this many false starts when working through a feature > review. :-) No worries, I appreciate the community doing the due diligence. Repository: rG LLVM Github Monorepo

[PATCH] D127641: [clang-cl][MSVC] Add default /Zc conformance arguments

2022-06-14 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436860. steplong added a comment. Herald added a subscriber: MaskRay. - Only enable /Zc:alignedNew and /Zc:sizedDealloc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127641/new/ https://reviews.llvm.org/D12764

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-06-14 Thread Stephen Long via Phabricator via cfe-commits
steplong added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6641 // by default. if (Arg *A = Args.getLastArg(options::OPT_faligned_allocation, options::OPT_fno_aligned_allocation, There's a check here fo

[PATCH] D127528: [Clang] Let the linker choose shared or static libunwind unless specified

2022-06-14 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a subscriber: srhines. phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1477 if (Args.hasArg(options::OPT_shared_libgcc)) return LibGccType::SharedLibGcc; - // The Android NDK only provides libunwind.a, not libunwind.so. -

[PATCH] D127771: [HIP] fix long double size

2022-06-14 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. AFAICT, the test case you've added works fine with the compiler at HEAD: https://cuda.godbolt.org/z/q3xYMfdeb I guess it only shows up in assertion-enabled builds. Can you check what happens if you

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-14 Thread Javier Alvarez via Phabricator via cfe-commits
Javier-varez updated this revision to Diff 436871. Javier-varez marked 2 inline comments as done. Javier-varez added a comment. Address review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127593/new/ https://reviews.llvm.org/D127593 File

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-14 Thread Javier Alvarez via Phabricator via cfe-commits
Javier-varez added a comment. Thanks again for having another look at the changes! I do not have commit access since this is my first change to LLVM. I would appreciate if you could merge it. here's my username and email: Javier Alvarez And let me know if there's anything else you'd like to mo

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Also note that there is a '#pragma GCC optimize' pragma. After this patch, it should be hard to implement it. https://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D127771: [HIP] fix long double size

2022-06-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127771#3582640 , @tra wrote: > AFAICT, the test case you've added works fine with the compiler at HEAD: > https://cuda.godbolt.org/z/q3xYMfdeb > I guess it only shows up in assertion-enabled builds. Can you check what > happe

[PATCH] D117977: [cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore

2022-06-14 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 436874. Ericson2314 added a comment. Rebase again, to try to figure out if last round of errors were spurious Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117977/new/ https://reviews.llvm.org/D117977 File

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-14 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:387 -/// GCCBuiltin - If this intrinsic exactly corresponds to a GCC builtin, this +/// ClangBuiltin - If this intrinsic exactly corresponds to a GCC builtin, this /// specifies the name of the builti

[PATCH] D127528: [Clang] Let the linker choose shared or static libunwind unless specified

2022-06-14 Thread Stephen Hines via Phabricator via cfe-commits
srhines added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1477 if (Args.hasArg(options::OPT_shared_libgcc)) return LibGccType::SharedLibGcc; - // The Android NDK only provides libunwind.a, not libunwind.so. phosek wrote: > mst

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-14 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez updated this revision to Diff 436876. GuillaumeGomez added a comment. - Update #define name as well - Rename `IsGCC` function parameter into `IsClang` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127460/new/ https://reviews.llvm.org

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-14 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez marked an inline comment as done. GuillaumeGomez added a comment. Fixed @spatel's comment. Comment at: llvm/include/llvm/IR/Intrinsics.td:387 -/// GCCBuiltin - If this intrinsic exactly corresponds to a GCC builtin, this +/// ClangBuiltin - If this intrinsic ex

[clang] 9d63795 - [clang][NFC][AST] rename the ImportError to ASTImportError

2022-06-14 Thread via cfe-commits
Author: phyBrackets Date: 2022-06-15T00:40:32+05:30 New Revision: 9d637956b79282aa0980e859b9128cf09a83dda6 URL: https://github.com/llvm/llvm-project/commit/9d637956b79282aa0980e859b9128cf09a83dda6 DIFF: https://github.com/llvm/llvm-project/commit/9d637956b79282aa0980e859b9128cf09a83dda6.diff L

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-06-14 Thread Shivam Rajput via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d637956b792: [clang][NFC][AST] rename the ImportError to ASTImportError (authored by phyBrackets). Changed prior to commit: https://reviews.llvm.org/D125340?vs=428508&id=436881#toc Repository: rG LL

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > This patch adds all the language-level function attributes defined in: > > https://github.com/ARM-software/acle/pull/188 This pull request has not yet been merged, so what are the chances that it gets rejected or altered? > LLVM support for these attributes will

[PATCH] D126131: [Clang][AST] BindingDecl ASTDump for tuple like structure

2022-06-14 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcaf2767c47c3: [Clang][AST] Fixed BindingDecl AST-dump for tuple like structures (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[clang] caf2767 - [Clang][AST] Fixed BindingDecl AST-dump for tuple like structures

2022-06-14 Thread via cfe-commits
Author: isuckatcs Date: 2022-06-14T21:13:04+02:00 New Revision: caf2767c47c3808538c82b6ea2b24d8e95b11ee7 URL: https://github.com/llvm/llvm-project/commit/caf2767c47c3808538c82b6ea2b24d8e95b11ee7 DIFF: https://github.com/llvm/llvm-project/commit/caf2767c47c3808538c82b6ea2b24d8e95b11ee7.diff LOG

[clang] 6ccc273 - Update ASTImportError.h

2022-06-14 Thread via cfe-commits
Author: Shivam Date: 2022-06-15T00:45:07+05:30 New Revision: 6ccc2733e72017999a94c10147a71ff595286080 URL: https://github.com/llvm/llvm-project/commit/6ccc2733e72017999a94c10147a71ff595286080 DIFF: https://github.com/llvm/llvm-project/commit/6ccc2733e72017999a94c10147a71ff595286080.diff LOG: U

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion">

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion">,

[PATCH] D124753: [HLSL] Set main as default entry.

2022-06-14 Thread Justin Bogner via Phabricator via cfe-commits
bogner added inline comments. Comment at: clang/test/CodeGenHLSL/entry_default.hlsl:14 +// CHECK-NOT: "dx.shader"="compute" +// CHECK-SAM: } +[numthreads(1, 1, 1)] void main() { typo, should be `CHECK-SAME` Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion">,

[PATCH] D124753: [HLSL] Set main as default entry.

2022-06-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 436898. python3kgae added a comment. Fix typo in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124753/new/ https://reviews.llvm.org/D124753 Files: clang/include/clang/Driver/Options.td clang/test

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-06-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: luken-google. rnk added a comment. +@luken-google Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6497 + options::OPT_fno_aligned_allocation) && +LanguageStandard == "-std=c++17") + CmdArgs.push_back("-faligned-allo

[PATCH] D124753: [HLSL] Set main as default entry.

2022-06-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/entry_default.hlsl:14 +// CHECK-NOT: "dx.shader"="compute" +// CHECK-SAM: } +[numthreads(1, 1, 1)] void main() { bogner wrote: > typo, should be `C

[PATCH] D127759: [Diagnostic] Clarify -Winfinite-recursion message

2022-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:63 def warn_infinite_recursive_function : Warning< - "all paths through this function will call itself">, + "In order to understand recursion, you must first understand recursion"

[clang] c4a2674 - [Clang] Simplify unifying target features

2022-06-14 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-14T15:58:16-04:00 New Revision: c4a2674e21c4f5ffd46f90982ce3c3d952018e66 URL: https://github.com/llvm/llvm-project/commit/c4a2674e21c4f5ffd46f90982ce3c3d952018e66 DIFF: https://github.com/llvm/llvm-project/commit/c4a2674e21c4f5ffd46f90982ce3c3d952018e66.diff

[PATCH] D127707: [Clang] Simplify unifying target features

2022-06-14 Thread Joseph Huber 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 rGc4a2674e21c4: [Clang] Simplify unifying target features (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D127707?vs=436621

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-06-14 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: mlir/include/mlir/Transforms/CommutativityUtils.h:211 +template +class SortCommutativeOperands : public OpRewritePattern { + using OpRewritePattern::OpRewritePattern; Can we make this not a template? This will be a

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-14 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson accepted this revision. royjacobson added a comment. This revision is now accepted and ready to land. Thank you! LGTM. I see the CI still has those OpenMP failures - could you try to rebase on main to get it green? @erichkeane is this good to go? Should I ping some ABI people about t

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

2022-06-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5863 // FIXME: derive from "Target" ? - return WCharTy; + return IntTy; } This change seems surprising. Can you explain what's going on here? Comment at: clang/lib/AST

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

2022-06-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:9265-9266 + ? Context.getBitIntType(!IsMakeSigned, Context.getIntWidth(BaseType)) + : Context.getIntTypeForBitwidth(Context.getIntWidth(BaseType), + Is

[PATCH] D127798: [AArch64] Define __ARM_FEATURE_RCPC

2022-06-14 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. mingmingl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements the definition of __ARM_FEATURE_RCPC when clang commands

[PATCH] D127798: [AArch64] Define __ARM_FEATURE_RCPC

2022-06-14 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl updated this revision to Diff 436940. mingmingl added a comment. update commit message with differential revision link. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127798/new/ https://reviews.llvm.org/D127798 Files: clang/lib/Basic/T

[PATCH] D127201: [clang] Add tests for statement expression in initializers

2022-06-14 Thread Anders Waldenborg 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 rG657e954939c8: [clang] Add tests for statement expression in initializers (authored by wanders). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 657e954 - [clang] Add tests for statement expression in initializers

2022-06-14 Thread Anders Waldenborg via cfe-commits
Author: Anders Waldenborg Date: 2022-06-14T23:16:41+02:00 New Revision: 657e954939c8a7d33c40291ef3214333a1e2ca5b URL: https://github.com/llvm/llvm-project/commit/657e954939c8a7d33c40291ef3214333a1e2ca5b DIFF: https://github.com/llvm/llvm-project/commit/657e954939c8a7d33c40291ef3214333a1e2ca5b.d

[PATCH] D127799: [StaticAnalyzer] Remove dead code (DO NOT COMMIT)

2022-06-14 Thread Kazu Hirata via Phabricator via cfe-commits
kazu created this revision. Herald added subscribers: abrachet, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, a.sidorin, zzheng, szepet, baloghadamsoftware. Herald added a project: All. kazu requested review of this revision. Herald added a project: clang. Herald added a subscriber

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Maybe we should document that zero-size arrays aren't treated as flexible arrays, since that's what the zero-size array extension was originally designed for. Looks fine otherwise. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llv

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, kuhar, python3kgae, MaskRay. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. In HLSL vectors are ext_vectors in all respects exce

[PATCH] D125723: [MSVC] Add support for MSVC pragma optimize

2022-06-14 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436954. steplong edited the summary of this revision. steplong added a comment. - Change logic to only handle empty optimization list - Fixup doc and tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/n

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Conflict markers fixed by 6ccc2733e72017999a94c10147a71ff595286080 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125340/new/ https://reviews.llvm.org/

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:8 +void entry() { + float2 LilVec = float2(1.0, 2.0); + float2 BrokenVec = float2(1.0, 2.0, 3.0); // expected-error{{excess elements in vector initializer}} -

[PATCH] D127803: Generate the capture for field when the field is used with implicit default.

2022-06-14 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, jdoerfert, mikerice. jyu2 added projects: OpenMP, clang. Herald added a project: All. jyu2 requested review of this revision. Herald added a subscriber: sstefan1. This is to fix assert when field is referenced and default clause is used. T

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. FWIW, I think we should have these attributes as spelled here, just w/ proper pass manager integration which then requires an RFC. That said, I'm not opposed to this as an incremental step, albeit confusing until the PM support is integrated if we allow O1

[clang] 97d69cd - [clang][dataflow] Rename `getPointeeLoc` to `getReferentLoc` for ReferenceValue.

2022-06-14 Thread Dmitri Gribenko via cfe-commits
Author: Wei Yi Tee Date: 2022-06-15T00:53:30+02:00 New Revision: 97d69cdaf324ec520b3f7685ef05f8e207a7bd3b URL: https://github.com/llvm/llvm-project/commit/97d69cdaf324ec520b3f7685ef05f8e207a7bd3b DIFF: https://github.com/llvm/llvm-project/commit/97d69cdaf324ec520b3f7685ef05f8e207a7bd3b.diff LO

<    1   2   3   >