[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-24 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 354441. manas added a comment. Add tests for overflows on both ends Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files: clang/lib/StaticAnalyzer/Core/RangeConstrai

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:264-266 + if (a == UINT_MAX && b == UINT_MAX) { +clang_analyzer_eval((a + b) == UINT_MAX - 1); // expected-warning{{TRUE}} + } We need a test with ranges and unsigned overf

[PATCH] D104898: [clang-repl] Allow passing in code as positional arguments.

2021-06-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, teemperor, aprantl, sgraenitz. v.g.vassilev requested review of this revision. Now we can do things like: clang-repl "int i = 1;" "int j = 2;". https://reviews.llvm.org/D104898 Files: clang/test/Interpreter/execute.cpp

[PATCH] D99487: [CodeGen] Port basic block sections from ELF to COFF

2021-06-24 Thread TaoPan via Phabricator via cfe-commits
TaoPan added a comment. I reported bugs of using clang-cl and lld to test https://github.com/microsoft/compiler-tests/tree/master/seh 2. clang-cl.exe + lld linker a. x4ptcu.c: build error https://bugs.llvm.org/show_bug.cgi?id=50859 b. seh0015.c, seh0017.c: build crash https://bugs.llvm.

[PATCH] D104896: [DFSan] Change shadow and origin memory layouts to match MSan.

2021-06-24 Thread Andrew via Phabricator via cfe-commits
browneee created this revision. browneee added reviewers: stephan.yichao.zhao, gbalats. Herald added subscribers: pengfei, hiraditya. browneee requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits. Previou

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, the summary gave me a chuckle :) Comment at: clang/lib/Sema/SemaExpr.cpp:11809-11812 +Diag(Loc, IsError + ? diag::err_typecheck_ordered_comparison_of_function_pointers + : diag::ext_typecheck_ordered_compari

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SVals.cpp:154 + Optional VisitLocGotoLabel(loc::GotoLabel GL) { +return QualType{Context.VoidPtrTy}; + } ASDenysPetrov wrote: > vsavchenko wrote: > > ASDenysPetrov wrote: > > > I'm not sur

[PATCH] D104852: [AArch64][SVEIntrinsicOpts] Convect cntb/h/w/d to vscale intrinsic or constant.

2021-06-24 Thread JunMa via Phabricator via cfe-commits
junparser updated this revision to Diff 354427. junparser added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. update clang test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104852/new/ https://reviews.llvm.org/

[PATCH] D104601: [Preprocessor] Implement -fnormalize-whitespace.

2021-06-24 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. During a trial phase while compiling everything twice with ccache I got the following results. Only unify_mode:: $ ccache -d . -s cache directory . primary config ./ccache.conf secondary config (readonly) /hom

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-24 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 354424. manas added a comment. Fix issues involving usage of `uadd_ov` and family of functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files: clang/lib/Static

[PATCH] D103615: [Clang] Add option for vector compare compatibility.

2021-06-24 Thread Stefan Pintilie via Phabricator via cfe-commits
stefanp updated this revision to Diff 354422. stefanp added a comment. Updated the name of the option to cover all of the inconsistencies for vector pixel/bool. Future patches will continue to use this option to define the behaviour of these two types. Reworded the warning message. Added InGroup<

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. First part of the split implemented at: https://reviews.llvm.org/D104892 I will reuse this DR for the second part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104680/new/ https://reviews.llvm.org/D104680 ___

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Word on the grapevine was that the committee had some discussion that ended with unanimous agreement on eliminating relational fu

[PATCH] D104837: [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread Jinsong Ji 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 rGf3ef4f5bff26: [PowerPC] Add XL compat __compare_and_swap builtins (authored by jsji). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[clang] f3ef4f5 - [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread Jinsong Ji via cfe-commits
Author: Jinsong Ji Date: 2021-06-25T01:08:48Z New Revision: f3ef4f5bff26ac4196a15dad7773a03b9d6df21d URL: https://github.com/llvm/llvm-project/commit/f3ef4f5bff26ac4196a15dad7773a03b9d6df21d DIFF: https://github.com/llvm/llvm-project/commit/f3ef4f5bff26ac4196a15dad7773a03b9d6df21d.diff LOG: [P

[PATCH] D104837: [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-cas.c:19 +// CHECK-NEXT:[[TMP2:%.*]] = cmpxchg weak volatile i32* [[A]], i32 [[TMP1]], i32 [[TMP0]] monotonic monotonic, align 4 +// CHECK-NEXT:[[TMP3:%.*]] = extractvalue { i32, i1 } [[TMP2

[PATCH] D104837: [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji updated this revision to Diff 354410. jsji added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104837/new/ https://reviews.llvm.org/D104837 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/lib/Basic/Targ

[PATCH] D104822: [RISCV] Add vget/vset intrinsics for inserting and extracting between different lmuls.

2021-06-24 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf225367305c8: [RISCV] Add vget/vset intrinsics for inserting and extracting between different… (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[clang] f225367 - [RISCV] Add vget/vset intrinsics for inserting and extracting between different lmuls.

2021-06-24 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-06-24T18:06:36-07:00 New Revision: f225367305c82ce391bb470f735b19e924ff7372 URL: https://github.com/llvm/llvm-project/commit/f225367305c82ce391bb470f735b19e924ff7372 DIFF: https://github.com/llvm/llvm-project/commit/f225367305c82ce391bb470f735b19e924ff7372.diff

[clang] e8cded5 - Unsupported sanitize-coverage-old-pm.c on 32 bit Arm

2021-06-24 Thread Muhammad Omair Javaid via cfe-commits
Author: Muhammad Omair Javaid Date: 2021-06-25T00:57:24Z New Revision: e8cded57fbf7b2b81aefd569b95f38ae97948ef0 URL: https://github.com/llvm/llvm-project/commit/e8cded57fbf7b2b81aefd569b95f38ae97948ef0 DIFF: https://github.com/llvm/llvm-project/commit/e8cded57fbf7b2b81aefd569b95f38ae97948ef0.di

[PATCH] D104837: [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread wael yehia via Phabricator via cfe-commits
w2yehia accepted this revision. w2yehia added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-cas.c:19 +// CHECK-NEXT:[[TMP2:%.*]] = cmpxchg weak volatile i32* [[A]], i32 [[TMP1]], i32 [[TMP0]] monotonic

[PATCH] D104887: [clang] Evaluate strlen of strcpy argument for -Wfortify-source.

2021-06-24 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield created this revision. mbenfield added reviewers: george.burgess.iv, cjdb, rsmith. mbenfield requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also introduce Expr::tryEvaluateStrLen. Repository: rG LLVM Github Monorepo https://

[PATCH] D104883: [CodeGen] Add ParmVarDecls to FunctionDecls that are created to generate ObjC property getter/setter functions

2021-06-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ah - this is an alternative to D104082 ? OK. Yeah, looks like it'd address the thing we were discussing in D98799 . But do you have some more details on why D104082 wa

[clang] d6a91f6 - Revert "[Clang] XFAIL sanitize-coverage-old-pm.c on 32bit Armv8l"

2021-06-24 Thread Muhammad Omair Javaid via cfe-commits
Author: Muhammad Omair Javaid Date: 2021-06-25T05:00:14+05:00 New Revision: d6a91f6c565179e9b2dac700f9a54e105f748a6d URL: https://github.com/llvm/llvm-project/commit/d6a91f6c565179e9b2dac700f9a54e105f748a6d DIFF: https://github.com/llvm/llvm-project/commit/d6a91f6c565179e9b2dac700f9a54e105f748a

[PATCH] D104883: [CodeGen] Add ParmVarDecls to FunctionDecls that are created to generate ObjC property getter/setter functions

2021-06-24 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. If ` args.push_back(Params[1] = SrcDecl);` doesn't trigger a warning, this seems reasonable. Comment at: clang/lib/CodeGen/CGObjC.cpp:3702 + /*DefArg=*/nullptr); + a

[clang] ef90657 - [PowerPC] Fix vec_add for 64-bit on pre-Power7 subtargets

2021-06-24 Thread Nemanja Ivanovic via cfe-commits
Author: Nemanja Ivanovic Date: 2021-06-24T18:42:44-05:00 New Revision: ef906573a127cffef7cae75d5155c15a8a2a3a5e URL: https://github.com/llvm/llvm-project/commit/ef906573a127cffef7cae75d5155c15a8a2a3a5e DIFF: https://github.com/llvm/llvm-project/commit/ef906573a127cffef7cae75d5155c15a8a2a3a5e.di

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104680#2839309 , @rsmith wrote: > I would prefer to split this into two changes: > ... > Does that sound reasonable? Yeah that is fine, totally understand ;) Comment at: clang/lib/Sema/SemaExpr.cpp:11815

[PATCH] D104883: [CodeGen] Add ParmVarDecls to FunctionDecls that are created to generate ObjC property getter/setter functions

2021-06-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. clang crashes if I remove the fake FunctionDecls as I did in https://reviews.llvm.org/D104082. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104883/new/ https://reviews.llvm.org/D104883 __

[PATCH] D104883: [CodeGen] Add ParmVarDecls to FunctionDecls that are created to generate ObjC property getter/setter functions

2021-06-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, aprantl, vsk, dblaikie. ahatanak added a project: clang. Herald added a subscriber: kristof.beyls. ahatanak requested review of this revision. This is needed to prevent clang from crashing when we make the changes proposed in htt

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-24 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. > I'm not sure what you mean here. If it is about this particular patch, it > simply adds a non-virtual method to SVal, it shouldn't affect sizeof(SVal) at > all. My fault. For some reason I thought you added a QualType as a member to SVal declaration. > I wante

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 354368. jhuber6 added a comment. Removing runtime check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102361/new/ https://reviews.llvm.org/D102361 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/Ope

[clang] f1e2d58 - [OptTable] Rename PrintHelp to printHelp

2021-06-24 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-06-24T14:47:03-07:00 New Revision: f1e2d5851bf869685971d5acb894b39a89ea2d49 URL: https://github.com/llvm/llvm-project/commit/f1e2d5851bf869685971d5acb894b39a89ea2d49 DIFF: https://github.com/llvm/llvm-project/commit/f1e2d5851bf869685971d5acb894b39a89ea2d49.diff

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:709 +getModule().addModuleFlag(llvm::Module::Max, "openmp-device", + LangOpts.OpenMP); + jdoerfert wrote: > Why do we need `OpenMPRuntime` in the condi

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:709 +getModule().addModuleFlag(llvm::Module::Max, "openmp-device", + LangOpts.OpenMP); + Why do we need `OpenMPRuntime` in the conditional? Reposit

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102361/new/ https://reviews.llvm.org/D102361 ___

[PATCH] D104837: [PowerPC] Add XL compat __compare_and_swap builtins

2021-06-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji updated this revision to Diff 354360. jsji added a comment. Add {} to case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104837/new/ https://reviews.llvm.org/D104837 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/lib/Basic/Target

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö 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 rG3eed57e7ef7d: [ADT] Rename StringRef case insensitive methods for clarity (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.or

[clang-tools-extra] 86029e4 - [clang-tools-extra] Rename StringRef _lower() method calls to _insensitive()

2021-06-24 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2021-06-25T00:22:01+03:00 New Revision: 86029e4c220b91be728f6ff6a17cad098821e657 URL: https://github.com/llvm/llvm-project/commit/86029e4c220b91be728f6ff6a17cad098821e657 DIFF: https://github.com/llvm/llvm-project/commit/86029e4c220b91be728f6ff6a17cad098821e657.diff

[clang] e5c7c17 - [clang] Rename StringRef _lower() method calls to _insensitive()

2021-06-24 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2021-06-25T00:22:01+03:00 New Revision: e5c7c171e5db6af1e3dca1059df4287b0d147eaf URL: https://github.com/llvm/llvm-project/commit/e5c7c171e5db6af1e3dca1059df4287b0d147eaf DIFF: https://github.com/llvm/llvm-project/commit/e5c7c171e5db6af1e3dca1059df4287b0d147eaf.diff

[PATCH] D104082: [CodeGen] Don't create a fake FunctionDecl when generating block/block_byref copy/dispose helper functions

2021-06-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Thank you for the repro. I added calls to `ApplyDebugLocation::CreateArtificial` and reapplied the patch in https://github.com/llvm/llvm-project/commit/8db0dbbe2c0544c38f33cf64b4cdd5135d524b23. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D104096: [Clang-Format] Add ReferenceAlignment directive

2021-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa08fa8a50819: [Clang-Format] Add ReferenceAlignment directive (authored by Seraphime Kirkovski , committed by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SI

[clang] a08fa8a - [Clang-Format] Add ReferenceAlignment directive

2021-06-24 Thread Björn Schäpers via cfe-commits
Author: Seraphime Kirkovski Date: 2021-06-24T22:27:45+02:00 New Revision: a08fa8a508199c6463f5ee5d617e2f360f718067 URL: https://github.com/llvm/llvm-project/commit/a08fa8a508199c6463f5ee5d617e2f360f718067 DIFF: https://github.com/llvm/llvm-project/commit/a08fa8a508199c6463f5ee5d617e2f360f718067

[PATCH] D103612: [flang][driver] Add `-fno-analyzed-objects-for-unparse`

2021-06-24 Thread Pete Steinfeld via Phabricator via cfe-commits
PeteSteinfeld accepted this revision. PeteSteinfeld added a comment. This revision is now accepted and ready to land. All builds, tests, and looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103612/new/ https://reviews.llvm.org/D103612 ___

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-06-24 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @chrish_ericsson_atx > I don't understand -- probably I don't have enough experience with analyzer > state dumps to know what I should find surprising or better in this example. Simply saying, now `ptr[3]` returns value `4` as expected, but `arr[1][1]` still retu

[PATCH] D104871: [Docs] use -fprofile-generate for IR PGO and -fprofile-instr-generate for code coverage

2021-06-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rnk, vsk, davidxl, arphaman. Herald added a subscriber: wenlei. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add docs to specify `-fprofile-generate` for IR PGO and `-fp

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D104819#2839315 , @mstorsjo wrote: > In D104819#2839263 , @dexonsmith > wrote: > >> Just be sure to clang-format when you do the mechanical changes in the >> follow up patches.) >

[PATCH] D104774: [clang-format] Fix a bug that indents else-comment-if incorrectly

2021-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D104774#2838287 , @MyDeveloperDay wrote: > @HazardyKnusperkek Its probably my "bad" I should said "LGTM but maybe wait > for the others to comment", but I'm fundamentally ok I think with the change. > (we'll just

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-06-24 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added a comment. In D104285#2836190 , @ASDenysPetrov wrote: >> I think the presence of the initializer list in the test case is not >> necessary to trigger the spurious warnings > > Could you please provide some test cases that you t

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:2520 + /// readability to have the signature indented two levels and to use + /// ``OuterScope``. The KJ style guide requires ``OuterScope`. + /// `KJ style guide Here is

[clang] b3ccf4f - [clang-format][NFC] Fix documentation

2021-06-24 Thread Björn Schäpers via cfe-commits
Author: Björn Schäpers Date: 2021-06-24T21:19:14+02:00 New Revision: b3ccf4fc02cdb12eb0929ad9f9dfdec39b785e6a URL: https://github.com/llvm/llvm-project/commit/b3ccf4fc02cdb12eb0929ad9f9dfdec39b785e6a DIFF: https://github.com/llvm/llvm-project/commit/b3ccf4fc02cdb12eb0929ad9f9dfdec39b785e6a.diff

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-24 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D104550#2838845 , @vsavchenko wrote: >> Another thing is that we can garantee returning `QualType`. I mean, we can >> replace `Optional` with `QualType` itself. `QualType` has a default ctor and >> `isNull` predicate, whic

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:301 + const OverloadedOperatorKind OOK = FD->getOverloadedOperator(); + if (!(OOK == OO_Equal || OOK == OO_ExclaimEqual || OOK == OO_Less || +OOK == OO_LessEqual || OOK =

[PATCH] D104831: [clang] Add x86_64-redhat-linux-gnu as a platform triplet

2021-06-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D104831#2839301 , @tstellar wrote: > In D104831#2838835 , @hoy wrote: > >> In D104831#2837712 , @MaskRay >> wrote: >> Adding the platform tri

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D104819#2839263 , @dexonsmith wrote: > LGTM, once @MaskRay is happy. I have a couple of minor comments inline too. > > (I also see that there are some clang-format suggestions in the unit tests; > not sure any of them are ac

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I would prefer to split this into two changes: 1. Stop providing a builtin overload candidate `R operator<=>(P, P)` where `P` is a function pointer type, to be consistent with the behavior of the built-in `<=>` operator. 2. Stop providing `<`/`<=`/`>`/`>=` support for fu

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104819/new/ https://reviews.llvm.org/D104819 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D104831: [clang] Add x86_64-redhat-linux-gnu as a platform triplet

2021-06-24 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. In D104831#2838835 , @hoy wrote: > In D104831#2837712 , @MaskRay wrote: > >>> Adding the platform tripplet x86_64-redhat-linux-gnu the while list of >>> supported x86_64 triplets so that

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, once @MaskRay is happy. I have a couple of minor comments inline too. (I also see that there are some clang-format suggestions in the unit tests; not sure any of them are actuall

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-06-24 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 general, I think this looks good (I did find one minor nit that removes an include, but that can be fixed as you land). There's an open question for @jansvoboda11 and it'd be

[clang] 8db0dbb - [CodeGen] Don't create fake FunctionDecls when generating block/byref

2021-06-24 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2021-06-24T11:45:52-07:00 New Revision: 8db0dbbe2c0544c38f33cf64b4cdd5135d524b23 URL: https://github.com/llvm/llvm-project/commit/8db0dbbe2c0544c38f33cf64b4cdd5135d524b23 DIFF: https://github.com/llvm/llvm-project/commit/8db0dbbe2c0544c38f33cf64b4cdd5135d524b23.diff

[PATCH] D104847: [Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX 6.5 and 7.0 WMMA and MMA instructions

2021-06-24 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. Nice. Thank you for adding support for these missing instructions! LGTM, modulo a few of cosmetic nits. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:762 +// Builtins t

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 354324. jhuber6 added a comment. Addings tests and a module flag for openmp target devices. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102361/new/ https://reviews.llvm.org/D102361 Files: clang/lib/CodeGen

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-24 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. We have a failing test here (test at line 473). Which makes me wonder if the `handleComparision` function is at all called. This is something I need to check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104616/new/ htt

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-24 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 354323. RedDocMD added a comment. Removed re-invention, added tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104616/new/ https://reviews.llvm.org/D104616 Files: clang/lib/StaticAnalyzer/Checkers/SmartP

[PATCH] D104804: [AMDGPU] Add gfx1035 target

2021-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml:189 +# RUN: sed -e 's//64/' -e 's//AMDGCN_GFX1035/' %s | yaml2obj -o %t.o.AMDGCN_GFX1035 +# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=ELF-A

[PATCH] D104804: [AMDGPU] Add gfx1035 target

2021-06-24 Thread Aakanksha Patil 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 rG3453f3dd46f5: [AMDGPU] Add gfx1035 target (authored by aakanksha555). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[clang] 3453f3d - [AMDGPU] Add gfx1035 target

2021-06-24 Thread Aakanksha Patil via cfe-commits
Author: Aakanksha Patil Date: 2021-06-24T14:32:41-04:00 New Revision: 3453f3dd46f5214e028cb33818b10c5d995cd858 URL: https://github.com/llvm/llvm-project/commit/3453f3dd46f5214e028cb33818b10c5d995cd858 DIFF: https://github.com/llvm/llvm-project/commit/3453f3dd46f5214e028cb33818b10c5d995cd858.dif

[PATCH] D104777: PR50767: clear non-distinct debuginfo for function with nodebug definition after undecorated declaration

2021-06-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D104777#2838211 , @aaron.ballman wrote: > In D104777#2837794 , @dblaikie > wrote: > >> In D104777#2837347 , >> @brunodefraine wrote: >> >>>

[PATCH] D104800: [OpenCL] Do not include default header for preprocessor output as input

2021-06-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM! Thanks I agree we should have the same behavior for both options. Technically `-finclude-default-header` could be added in both steps but it is only effective in parsing the sources and does nothing otherwise. But it seems cleaner to align it with the header in

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-06-24 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 354301. mibintc added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100118/new/ https://reviews.llvm.org/D100118 Files: clang/docs/UsersManual.rst clang/include/clang/Basic/Builtins.def

[PATCH] D99675: [llvm][clang] Create new intrinsic llvm.arithmetic.fence to control FP optimization at expression level

2021-06-24 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 354300. mibintc added a comment. Rebasing. Hope this clears lit fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99675/new/ https://reviews.llvm.org/D99675 Files: llvm/docs/LangRef.rst llvm/include/ll

[PATCH] D104822: [RISCV] Add vget/vset intrinsics for inserting and extracting between different lmuls.

2021-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 354297. craig.topper added a comment. Add constant argument range checking to SemaChecking Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104822/new/ https://reviews.llvm.org/D104822 Files: clang/include

[PATCH] D102507: [HIP] Support in device code

2021-06-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. The key difference between C++ and CUDA/HIP, as implemented in clang, is that `__host__` and `__device__` attributes are considered during function overloading in CUDA and HIP, so `__host__ void foo()`, `__device__ void foo()` and `__host__ __device__ void foo()` are three

[PATCH] D104804: [AMDGPU] Add gfx1035 target

2021-06-24 Thread Aakanksha Patil via Phabricator via cfe-commits
aakanksha555 added a comment. In D104804#2838883 , @foad wrote: > Looks OK. Have you run check-llvm and check-clang? I did, no other failing tests observed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10

[PATCH] D103612: [flang][driver] Add `-funparse-typed-exprs-as-fortran`

2021-06-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 354294. awarzynski added a subscriber: PeteSteinfeld. awarzynski added a comment. Rename the new flag as `-fno-analyzed-objects-for-unparse` Based on the discussion, I've renamed the flag to better reflect the intention. Does it make more sense now? Note

[PATCH] D104804: [AMDGPU] Add gfx1035 target

2021-06-24 Thread Jay Foad via Phabricator via cfe-commits
foad added a comment. Looks OK. Have you run check-llvm and check-clang? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104804/new/ https://reviews.llvm.org/D104804 ___ cfe-commits mailing list cfe-commit

[PATCH] D104804: [AMDGPU] Add gfx1035 target

2021-06-24 Thread Aakanksha Patil via Phabricator via cfe-commits
aakanksha555 updated this revision to Diff 354270. aakanksha555 marked 4 inline comments as done. aakanksha555 added a comment. Addressed feedback; fixed typo and missing check lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104804/new/ https:

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2838754 , @craig.topper wrote: > Doesn't gcc also fold isnan to false under fast math? If we diverge here that > means your code would only work correctly with clang. GCC does the same transformation, ICC and MSVC

[PATCH] D104381: [analyzer] Added a test case for PR46264

2021-06-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I bisected. This bug was fixed intentionally by D85817 , forgot to close I guess. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104381/new/ https://reviews.llvm.org/D104381 ___

[PATCH] D104831: [clang] Add x86_64-redhat-linux-gnu as a platform triplet

2021-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104831#2838835 , @hoy wrote: > In D104831#2837712 , @MaskRay wrote: > >>> Adding the platform tripplet x86_64-redhat-linux-gnu the while list of >>> supported x86_64 triplets so that

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D104550#2838827 , @ASDenysPetrov wrote: > I'm in favor of this patch. It will help simplify `SValBuilder::evalCast`, > which takes an optional parameter `OriginalTy` and acts differently based on > whether it has been pas

[PATCH] D104831: [clang] Add x86_64-redhat-linux-gnu as a platform triplet

2021-06-24 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added a comment. In D104831#2837712 , @MaskRay wrote: >> Adding the platform tripplet x86_64-redhat-linux-gnu the while list of >> supported x86_64 triplets so that it can be used with the --gcc-toolchain >> option to bypass this process and force-p

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-24 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I'm in favor of this patch. It will help simplify `SValBuilder::evalCast`, which takes an optional parameter `OriginalTy` and acts differently based on whether it has been passed or has not. Since `sizeof(SVal)` became bigger (x1.5). I'm wondering of how much this

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Awesome, thanks for swiftly addressing it! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1981 for (const SymbolRef &MemberSym : ClassMembers) { -SymbolRef SimplifiedMemberSym = ::simplify(State, MemberSym); +SymbolRe

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2314-2315 + if (SymbolRef SimplifiedSym = simplify(St, Sym)) +Sym = SimplifiedSym; + vsavchenko wrote: > martong w

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 354274. martong added a comment. - Use simplify from RangedConstraintManager Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104844/new/ https://reviews.llvm.org/D104844 Files: clang/include/clang/StaticAnaly

[PATCH] D102507: [HIP] Support in device code

2021-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D102507#2833594 , @ldionne wrote: > In D102507#2830688 , @yaxunl wrote: > >> In D102507#2792087 , @rsmith wrote: >> >>> @ldionne How should we g

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Doesn't gcc also fold isnan to false under fast math? If we diverge here that means your code would only work correctly with clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.llvm.org/D1

[PATCH] D93525: [clang-offload-bundler] Add unbundling of archives containing bundled object files into device specific archives

2021-06-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. Looks reasonable to me. We can always refine it as we go. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:137 +/// * GPUArch (Optional) - Processor name, like gfx906 or sm_30 +/// In presence of

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2838659 , @jdoerfert wrote: > In D104854#2838495 , @sepavloff > wrote: > >> In D104854#2838468 , @thopre wrote: >> >>> Are you plann

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D104844#2838674 , @martong wrote: >> I don't really get why we get not simplified symbol to begin with. > > This is because of the Environment bindings. I.e.` b1` is bound to `$a0 - $b0 > + $c` when we evaluate `int b1 = (u

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I don't really get why we get not simplified symbol to begin with. This is because of the Environment bindings. I.e.` b1` is bound to `$a0 - $b0 + $c` when we evaluate `int b1 = (unsigned)a1 + c;`. This binding is not changed/updated, so when we evaluate the division

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha closed this revision. SaurabhJha added a comment. This is closed by this commit https://github.com/llvm/llvm-project/commit/cd256c8bcc9723f0ce7a32957f26600c966fa07c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://revie

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D104198#2838665 , @fhahn wrote: > In D104198#2838658 , @SaurabhJha > wrote: > >> Sorry, I committed this without the `Differential Revision: >> https://reviews.llvm.org/D104198` li

[PATCH] D90399: [clang-tidy] non-portable-integer-constant check

2021-06-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/NonportableintegerconstantCheck.cpp:54 + +MaskStr = StringRef(MaskStr.lower()); +if (!MaskStr.consume_front("0x")) You are assigning a pointer to a temporal std::string. It

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D104198#2838658 , @SaurabhJha wrote: > Sorry, I committed this without the `Differential Revision: > https://reviews.llvm.org/D104198` line. Is there a way to change the commit > message after it is in main? I could not push a

[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

2021-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2314-2315 + if (SymbolRef SimplifiedSym = simplify(St, Sym)) +Sym = SimplifiedSym; + vsavchenko wrote: > I don't like the idea of duplicating it into every

[PATCH] D104797: [WebAssembly] Implementation of global.get/set for reftypes in LLVM IR

2021-06-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D104797#2838653 , @tlively wrote: > The opaque pointers project is documented here: > https://llvm.org/docs/OpaquePointers.html. It's been making very slow > progress for the past few years but has recently been picking up ste

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D104854#2838495 , @sepavloff wrote: > In D104854#2838468 , @thopre wrote: > >> Are you planning to do this for the other FP test builtin (isinf, isfinite, >> isinf_sign, isnormal)? >

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Sorry, I committed this without the `Differential Revision: https://reviews.llvm.org/D104198` line. Is there a way to change the commit message after it is in main? I could not push after `git commit --amend` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

  1   2   >