[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g marked an inline comment as done. guitard0g added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1952 +def Escape : Attr { + let Spellings = [Clang<"escape">]; NoQ wrote: > Shouldn't both this attribute and the one above be

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 362643. guitard0g added a comment. Herald added a subscriber: jdoerfert. Change Escape/NoEscape to use InheritableAttr and update an attribute test to fix test failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D106849: [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c

2021-07-28 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG58712987e56f: [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 5871298 - [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c

2021-07-28 Thread Freddy Ye via cfe-commits
Author: Freddy Ye Date: 2021-07-29T13:28:10+08:00 New Revision: 58712987e56fb598ac49da7fbe6e6a78c787637b URL: https://github.com/llvm/llvm-project/commit/58712987e56fb598ac49da7fbe6e6a78c787637b DIFF: https://github.com/llvm/llvm-project/commit/58712987e56fb598ac49da7fbe6e6a78c787637b.diff

[PATCH] D107024: [DIBuilder] Do not replace empty enum types

2021-07-28 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 362637. ellis added a comment. Fix broken coro test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107024/new/ https://reviews.llvm.org/D107024 Files: clang/test/CodeGen/debug-info-codeview-heapallocsite.c

[PATCH] D67429: Improve code generation for thread_local variables:

2021-07-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D67429#2566099 , @wolfgangp wrote: > Ping. Just wondering if there are any new insights on the issue reported in > PR48030 . I confirm that

[PATCH] D103385: [clang-tidy] bugprone-forwarding-reference-overload: support non-type template parameters

2021-07-28 Thread Jesse Towner via Phabricator via cfe-commits
jwtowner marked 2 inline comments as done. jwtowner added a comment. > Thanks! What name and email address would you like me to use for patch > attribution? The following will do: Jesse Towner Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:260 +``escape`` placed on a function parameter of a pointer type is used to indicate +that the pointer can escape the function. This means that a reference to the object +the pointer points to

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Regardless of the kind of pointer, sounds like we need to do something about that API quirk. Eg., it *must* be possible to model a destructor of a `std::unique_ptr` as a no-op when the tracked raw pointer value is an `UnknownVal`. Repository: rG LLVM Github Monorepo

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D106924#2911145 , @mstorsjo wrote: > @Meinersbur After landing this, can you coordinate with @tstellar to get an > ack for backporting this to the 13.x release branch, which also suffers from > the regression? Release

[PATCH] D107025: Take OptimizationLevel class out of Pass Builder

2021-07-28 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added inline comments. Comment at: llvm/include/llvm/Passes/OptimizationLevel.h:14 +//===--===// + +class OptimizationLevel final { this should be in the llvm namespace

[PATCH] D106614: [Clang] add btf_tag attribute

2021-07-28 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1835 + let Args = [StringArgument<"BTFTag">]; + let Subjects = SubjectList<[Var, Function, Record, Field], ErrorDiag>; + let Documentation = [BTFTagDocs]; aaron.ballman wrote:

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > may have other non-Swift use-cases for diagnostics. I'm looking forward to taking advantage of this attribute in the static analyzer's `StackAddrEscapeChecker`! Comment at: clang/include/clang/Basic/Attr.td:1952 +def Escape : Attr { + let Spellings

[PATCH] D106688: [AIX] Pass the -b option to linker on AIX

2021-07-28 Thread Anjan Kumar via Phabricator via cfe-commits
anjankgk updated this revision to Diff 362622. anjankgk marked an inline comment as done. anjankgk added a comment. Change the error msg to include target information. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106688/new/ https://reviews.llvm.org/D106688 Files:

[PATCH] D106974: libcang: Add missing function to libclang.map

2021-07-28 Thread Tom Stellard 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 rGa4edb2b1ba0b: libcang: Add missing function to libclang.map (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] a4edb2b - libcang: Add missing function to libclang.map

2021-07-28 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2021-07-28T21:06:40-07:00 New Revision: a4edb2b1ba0bda9042e87ca3f3e1b9f70598df9a URL: https://github.com/llvm/llvm-project/commit/a4edb2b1ba0bda9042e87ca3f3e1b9f70598df9a DIFF: https://github.com/llvm/llvm-project/commit/a4edb2b1ba0bda9042e87ca3f3e1b9f70598df9a.diff

[PATCH] D106688: [AIX] Pass the -b option to linker on AIX

2021-07-28 Thread Anjan Kumar via Phabricator via cfe-commits
anjankgk marked an inline comment as done. anjankgk added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:263 + if (!T.isOSAIX()) { +TC.getDriver().Diag(diag::err_drv_unsupported_opt) +<< A.getAsString(Args);

[PATCH] D106614: [Clang] add btf_tag attribute

2021-07-28 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. > This currently has no codegen, so it only adds the attribute to the AST and > does nothing with it. Can you also add the codegen components to this patch? The code patches to generate IR are below: https://reviews.llvm.org/D106620 (generate btf_tag

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g created this revision. guitard0g added reviewers: aaron.ballman, NoQ, vsavchenko. guitard0g requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The 'escape' attribute indicates that the annotated pointer parameter may escape the

[PATCH] D107025: Take OptimizationLevel class out of Pass Builder

2021-07-28 Thread Tarindu Jayatilaka via Phabricator via cfe-commits
tarinduj created this revision. tarinduj added reviewers: jdoerfert, mtrofin, uenoku. tarinduj added a project: LLVM. Herald added subscribers: ormris, foad, kerbowa, steven_wu, hiraditya, nhaehnle, jvesely, arsenm, jholewinski. Herald added a reviewer: bollu. tarinduj requested review of this

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Michael Kruse 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 rGc6b0b16c0f55: [Preprocessor] -E -P: Ensure newline after 8 skipped lines. (authored by Meinersbur). Repository: rG LLVM Github Monorepo CHANGES

[clang] c6b0b16 - [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2021-07-28T22:50:54-05:00 New Revision: c6b0b16c0f55c34f4eaa05184815bbbe97f4b750 URL: https://github.com/llvm/llvm-project/commit/c6b0b16c0f55c34f4eaa05184815bbbe97f4b750 DIFF: https://github.com/llvm/llvm-project/commit/c6b0b16c0f55c34f4eaa05184815bbbe97f4b750.diff

[PATCH] D106939: [RISCV] If the maskedoff is vundefined(), use ta, ma for vsetvli.

2021-07-28 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai updated this revision to Diff 362617. HsiangKai added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106939/new/ https://reviews.llvm.org/D106939 Files:

[PATCH] D107024: [DIBuilder] Do not replace empty enum types

2021-07-28 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 362614. ellis added a comment. Remove whitespace changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107024/new/ https://reviews.llvm.org/D107024 Files:

[PATCH] D107024: [DIBuilder] Do not replace empty enum types

2021-07-28 Thread Ellis Hoag via Phabricator via cfe-commits
ellis created this revision. ellis added a reviewer: aprantl. Herald added subscribers: dexonsmith, lxfind, hiraditya. ellis requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. It looks like this array was missed in

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 362612. Meinersbur added a comment. - Use correct base commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106924/new/ https://reviews.llvm.org/D106924 Files:

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 362611. Meinersbur added a comment. - Fix embrassing mistakes in skip-empty-lines test (misspelled "LINEMARKES", MINWS<->MINCOL, absolute path) - Skip-empty-lines now also checks leading whitespace behavior - Fix typos in comments Repository: rG LLVM

[PATCH] D106939: [RISCV] If the maskedoff is vundefined(), use ta, ma for vsetvli.

2021-07-28 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:379 bool ForceTailAgnostic = RISCVII::doesForceTailAgnostic(TSFlags); + // hasDummyMaskOp(TSFlags) == ture means it is a non-masked instruction. + // FIXME: hasDummyMaskOp() is the

[PATCH] D107021: [Sema][ObjC] Allow conversions between pointers to ObjC pointers and pointers to structs

2021-07-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I don't think there is any reason conversions between `ACTC_none` and `ACTC_indirectRetainable` (for example, conversions between `struct S **` and `__strong id *x` or `int *` and `__strong id *x`) should be disallowed. I just made the minimal change needed to enable

[PATCH] D107021: [Sema][ObjC] Allow conversions between pointers to ObjC pointers and pointers to structs

2021-07-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, ldionne. ahatanak added a project: clang. ahatanak requested review of this revision. clang was just being conservative and trying to prevent users from messing up the qualifier on the inner pointer type. Lifting this

[PATCH] D106860: [clang][AArch64][SVE] Avoid going through memory for fixed/scalable predicate casts

2021-07-28 Thread JunMa via Phabricator via cfe-commits
junparser added inline comments. Herald added a subscriber: ctetreau. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2102 + Src = Builder.CreateBitCast(Src, SrcTy); +} if (ScalableSrc->getElementType() == FixedDst->getElementType()) { I

[PATCH] D106753: ConvertUTF: Created wrapper convertUTF32ToUTF8String

2021-07-28 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 added a comment. The problem seems to be in the conversion function expecting strings to be a multiple of 4 bytes, which doesn't hold up with the way ArrayRef stores things as char that is casted to char32_t, when using ASCII values like in the look of disapproval emoji, having

[PATCH] D106849: [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c

2021-07-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 362596. FreddyYe added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106849/new/ https://reviews.llvm.org/D106849 Files: clang/test/CodeGen/attr-target-mv.c Index:

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:832 + RD->setCompleteDefinition(false); + Reader.mergeDefinitionVisibility(OldDef, RD); +} else { vsapsai wrote: > rsmith wrote: > > vsapsai wrote: > > > Here is

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D106994#2911903 , @vsapsai wrote: > In D106994#2911508 , @rsmith wrote: > >> For what it's worth, I think the right way to handle this in C is to >> properly implement the "compatible

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Dave Airlie via Phabricator via cfe-commits
airlied added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13678 +uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); +#endif +#endif Anastasia wrote: >

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Dave Airlie via Phabricator via cfe-commits
airlied updated this revision to Diff 362587. airlied added a comment. added comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106778/new/ https://reviews.llvm.org/D106778 Files: clang/lib/Headers/opencl-c.h Index:

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D106994#2911508 , @rsmith wrote: > For what it's worth, I think the right way to handle this in C is to properly > implement the "compatible types" rule instead of trying to invent something > ODR-ish: in C, struct

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362574. beanz added a comment. Moving the warning emission later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D99381#2911459 , @vitalybuka wrote: > In D99381#2911057 , @eugenis wrote: > >> They are used here: >>

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 362571. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99381/new/ https://reviews.llvm.org/D99381 Files: compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp

[PATCH] D107004: Turn off fp reassociation in IA intrinsic header files.

2021-07-28 Thread Kevin B. Smith via Phabricator via cfe-commits
kbsmith1 added a comment. In D107004#2911654 , @lebedev.ri wrote: > Patch description states what the change is, but not why the change is what > it is. > I don't think this is a good direction to second-guess the user's intentions. I added the reason

[PATCH] D106674: Runtime for Interop directive

2021-07-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:1150-1156 + CUresult Err = cuDeviceGet(, DeviceId); + if (Err == CUDA_SUCCESS) { +DeviceInfo->Device = reinterpret_cast(Dev); + } else { +

[PATCH] D106959: [PowerPC] swdiv builtins for XL compatibility

2021-07-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: llvm/test/CodeGen/PowerPC/LowerCheckedFPArith.ll:36 +; CHECK-NEXT: %2 = fdiv fast float %0, %1 +; CHECK-NEXT: %3 = fcmp une float %2, %2 +; CHECK-NEXT: br i1 %3, label %swdiv_HWDIV, label %swdiv_MERGE A "fast" fdiv

[PATCH] D106907: [clang] fix concepts crash on substitution failure during normalization

2021-07-28 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87aa31827b29: [clang] fix concepts crash on substitution failure during normalization (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr

2021-07-28 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mizvekov marked an inline comment as done. Closed by commit rG0c7cd4a87313: [clang] NFC: refactor multiple implementations of… (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 87aa318 - [clang] fix concepts crash on substitution failure during normalization

2021-07-28 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-07-28T23:28:45+02:00 New Revision: 87aa31827b293127619e2ef96e80baf709eae338 URL: https://github.com/llvm/llvm-project/commit/87aa31827b293127619e2ef96e80baf709eae338 DIFF:

[clang] 0c7cd4a - [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr

2021-07-28 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-07-28T23:27:43+02:00 New Revision: 0c7cd4a873138f2116403a733274c8cb7dbf925f URL: https://github.com/llvm/llvm-project/commit/0c7cd4a873138f2116403a733274c8cb7dbf925f DIFF:

[PATCH] D107004: Turn off fp reassociation in IA intrinsic header files.

2021-07-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Patch description states what the change is, but not why the change is what it is. I don't think this is a good direction to second-guess the user's intentions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107004/new/

[PATCH] D106876: Remove non-affecting module maps from PCM files.

2021-07-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think module maps that specify textual headers should be considered inputs if we entered any of those textual headers; we won't treat those as being imported. In addition to considering the current module and its imports, perhaps we should walk the preprocessor's

[PATCH] D107004: Turn off fp reassociation in IA intrinsic header files.

2021-07-28 Thread Kevin B. Smith via Phabricator via cfe-commits
kbsmith1 created this revision. kbsmith1 added reviewers: craig.topper, aaron.ballman, erichkeane, andrew.w.kaylor. kbsmith1 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change uses #pragma float_control and floating point

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362536. lei added a comment. remove extra space Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362535. lei added a comment. fix minor wording and spelling mistakes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def

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

2021-07-28 Thread George Burgess IV 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 rGe12e02df09a9: [clang] Evaluate strlen of strcpy argument for -Wfortify-source. (authored by mbenfield, committed by gbiv). Repository: rG LLVM

[clang] e12e02d - [clang] Evaluate strlen of strcpy argument for -Wfortify-source.

2021-07-28 Thread George Burgess IV via cfe-commits
Author: Michael Benfield Date: 2021-07-28T20:52:57Z New Revision: e12e02df09a967f644cf28136a7361bce7a5bb91 URL: https://github.com/llvm/llvm-project/commit/e12e02df09a967f644cf28136a7361bce7a5bb91 DIFF: https://github.com/llvm/llvm-project/commit/e12e02df09a967f644cf28136a7361bce7a5bb91.diff

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362528. beanz added a comment. Covered taken #elif* directives per @aaron.ballmon's feedback. Handling non-taken #elif directives is non-trivial because clang skips parsing the conditionals for non-taken directives. At present clang won't even error on

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-28 Thread Lei Huang via Phabricator via cfe-commits
lei created this revision. lei added reviewers: stefanp, nemanjai, NeHuang, power-llvm-team. Herald added subscribers: shchenz, hiraditya. lei requested review of this revision. Herald added projects: clang, LLVM. Add builtin and intrinsic for `__addex`. This patch is part of a series of patches

[PATCH] D106674: Runtime for Interop directive

2021-07-28 Thread Sri Hari Krishna Narayanan via Phabricator via cfe-commits
sriharikrishna updated this revision to Diff 362524. sriharikrishna added a comment. Runtime for Interop directive Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106674/new/ https://reviews.llvm.org/D106674 Files:

[PATCH] D105527: libclang.so: Make SONAME independent from LLVM version

2021-07-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. As this is a big deal for packager, maybe it should be part of the release notes ? (maybe it is and I just missed it :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105527/new/ https://reviews.llvm.org/D105527

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. For what it's worth, I think the right way to handle this in C is to properly implement the "compatible types" rule instead of trying to invent something ODR-ish: in C, struct definitions in different translation units are different types, but if they're structurally

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-07-28 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Gentle ping. I can't review this, but if someone can, it would be awesome. https://bugs.llvm.org/show_bug.cgi?id=45879 is breaking some libc++ tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103395/new/

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:20 +#if !SANITIZER_FUCHSIA +extern "C" { vitalybuka wrote: > isn't HWASAN_WITH_INTERCEPTORS enough? Ignore this. !SANITIZER_FUCHSIA is OK here. Repository:

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:20 +#if !SANITIZER_FUCHSIA +extern "C" { isn't HWASAN_WITH_INTERCEPTORS enough? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D99381#2911057 , @eugenis wrote: > They are used here: > https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/malloc_common.h;l=54;drc=f3968e89cb72400951f93a2a8237ac1428d2627c Thanks, it's

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:832 + RD->setCompleteDefinition(false); + Reader.mergeDefinitionVisibility(OldDef, RD); +} else { Here is the perfect place to compare if `RD` and `OldDef` are

[PATCH] D106753: ConvertUTF: Created wrapper convertUTF32ToUTF8String

2021-07-28 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 updated this revision to Diff 362511. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106753/new/ https://reviews.llvm.org/D106753 Files: llvm/include/llvm/Support/ConvertUTF.h llvm/lib/Support/ConvertUTFWrapper.cpp llvm/unittests/Support/ConvertUTFTest.cpp Index:

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Added John McCall in case I'm missing some CodeGen pieces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106994/new/ https://reviews.llvm.org/D106994 ___ cfe-commits mailing

[PATCH] D106994: [modules] Fix miscompilation when using two RecordDecl definitions with the same name.

2021-07-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, bruno, teemperor. Herald added a subscriber: ributzka. vsapsai requested review of this revision. Herald added a project: clang. When deserializing a RecordDecl we don't enforce that redeclaration chain contains only a single

[PATCH] D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr

2021-07-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert accepted this revision. aaronpuchert added a comment. This revision is now accepted and ready to land. It is a good name! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100713/new/ https://reviews.llvm.org/D100713

[PATCH] D106688: [AIX] Pass the -b option to linker on AIX

2021-07-28 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:263 + if (!T.isOSAIX()) { +TC.getDriver().Diag(diag::err_drv_unsupported_opt) +<< A.getAsString(Args); anjankgk wrote: > ZarkoCA wrote: > > nit, I

[PATCH] D106790: prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124)

2021-07-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. In D106790#2909567 , @hans wrote: > I don't think that should cause any problems. Passing a less qualified > pointer to a more cv-qualified parameter

[PATCH] D106688: [AIX] Pass the -b option to linker on AIX

2021-07-28 Thread Anjan Kumar via Phabricator via cfe-commits
anjankgk added a comment. Thank you reviewing Zarko! Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:263 + if (!T.isOSAIX()) { +TC.getDriver().Diag(diag::err_drv_unsupported_opt) +<< A.getAsString(Args); ZarkoCA wrote: > nit, I

[PATCH] D106688: [AIX] Pass the -b option to linker on AIX

2021-07-28 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA accepted this revision. ZarkoCA added a comment. This revision is now accepted and ready to land. LGTM with small nit, thanks. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:263 + if (!T.isOSAIX()) { +

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-28 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: llvm/test/CodeGen/X86/x86-fpclass.ll:173 + +define <1 x i1> @isnan_double_vec1(<1 x double> %x) { +; CHECK-32-LABEL: isnan_double_vec1: add nounwind to reduce cfi noise (other tests would benefit as well)?

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: tstellar. mstorsjo added a comment. @Meinersbur After landing this, can you coordinate with @tstellar to get an ack for backporting this to the 13.x release branch, which also suffers from the regression? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Lexer/deprecate-macro.c:34-39 +#ifdef foo +#endif + +// expected-warning@+1{{macro 'foo' has been marked as deprecated}} +#ifndef foo +#endif Some more test cases to add: ``` // Test that we diagnose on

[PATCH] D106925: COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used

2021-07-28 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG828767f325b5: COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 828767f - COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used

2021-07-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-07-28T11:44:19-07:00 New Revision: 828767f325b5dd0356c5fd90e40a1c047010853e URL: https://github.com/llvm/llvm-project/commit/828767f325b5dd0356c5fd90e40a1c047010853e DIFF: https://github.com/llvm/llvm-project/commit/828767f325b5dd0356c5fd90e40a1c047010853e.diff

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. They are used here: https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/malloc_common.h;l=54;drc=f3968e89cb72400951f93a2a8237ac1428d2627c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99381/new/

[PATCH] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 362479. cjdb added a comment. - attempts to get CI passing (@aaron.ballman) - minimises test case (@hans) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106898/new/ https://reviews.llvm.org/D106898 Files:

[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries

2021-07-28 Thread Ye Luo via Phabricator via cfe-commits
ye-luo added a comment. Do I must use llvm-ar/ranlib or system ar/ranlib is OK? 1. existing use case breaks Use https://github.com/ye-luo/openmp-target/blob/master/tests/math/modf.cpp $ clang++ -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_80 modf.cpp # still OK $

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-28 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D99381#2908102 , @vitalybuka wrote: > @eugenis Why do we have them in here and in sanitizer/hwasan_interface.h ? And if we don't need them in sanitizer/hwasan_interface.h and interface_internal,

[PATCH] D106674: Runtime for Interop directive

2021-07-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/src/interop.cpp:13 +static omp_interop_rc_t +__kmpc_interop_get_property_err_type(omp_interop_property_t property) { + switch (property) { tianshilei1992 wrote: > There are some conventions

[PATCH] D106974: libcang: Add missing function to libclang.map

2021-07-28 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 accepted this revision. jrtc27 added a comment. This revision is now accepted and ready to land. Thanks; I can confirm the test passes if and only if I apply this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106974/new/

[PATCH] D106785: [C++4OpenCL] Introduces __remove_address_space utility

2021-07-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: rjmccall. Anastasia added a comment. The patch looks good but I would like to check with @rjmccall whether it would make sense to add this functionality generically for C/C++ too just like `__remove_const` and other builtins proposed in

[clang] 71f0359 - Simplify allowing pragma float_control in a linkage specification

2021-07-28 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-07-28T13:29:41-04:00 New Revision: 71f0359a9defbf3e35828189629f166508390d5d URL: https://github.com/llvm/llvm-project/commit/71f0359a9defbf3e35828189629f166508390d5d DIFF: https://github.com/llvm/llvm-project/commit/71f0359a9defbf3e35828189629f166508390d5d.diff

[PATCH] D106755: Extended format string checking to wprintf/wscanf

2021-07-28 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 updated this revision to Diff 362446. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106755/new/ https://reviews.llvm.org/D106755 Files: clang-tools-extra/clang-tidy/boost/UseToStringCheck.cpp clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp

[PATCH] D106899: [LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly

2021-07-28 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit added a comment. In D106899#2910655 , @MaskRay wrote: > I migrated all llvm/ files. You need to remove them from the patch. > > It is a good idea to drop the macro definition in > `llvm/include/llvm/Support/Compiler.h` separately. > > It

[PATCH] D106899: [LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly

2021-07-28 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 362437. gAlfonso-bit added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 Files: clang-tools-extra/pp-trace/PPTrace.cpp clang/utils/TableGen/ClangDiagnosticsEmitter.cpp

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-07-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362433. gandhi21299 added a comment. - added more tests with supported combinations of address spaces - minor nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106909/new/ https://reviews.llvm.org/D106909

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2905430 , @efriedma wrote: > In D104854#2904826 , @sepavloff > wrote: > >> In D104854#2886328 , @efriedma >> wrote: >> The

[PATCH] D106756: Added l16/l32 length modifiers for char16_t/char32_t

2021-07-28 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 updated this revision to Diff 362444. MarcusJohnson91 added a comment. Added a couple tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106756/new/ https://reviews.llvm.org/D106756 Files: clang/include/clang/AST/FormatString.h clang/lib/AST/FormatString.cpp

[PATCH] D106394: [clang][pp] adds '#pragma include_instead'

2021-07-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D106394#2910571 , @cjdb wrote: > In D106394#2905660 , @dblaikie > wrote: > >> Just a thought (nothing to hold up this patch/suggest a revert/suggest any >> immediate action), but:

[PATCH] D106974: libcang: Add missing function to libclang.map

2021-07-28 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 362439. tstellar added a comment. Add missing ; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106974/new/ https://reviews.llvm.org/D106974 Files: clang/tools/libclang/libclang.map Index:

[PATCH] D105527: libclang.so: Make SONAME independent from LLVM version

2021-07-28 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Can you let me know if D106974 fixes the problem? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105527/new/ https://reviews.llvm.org/D105527

[PATCH] D106974: libcang: Add missing function to libclang.map

2021-07-28 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. tstellar added a reviewer: jrtc27. tstellar requested review of this revision. Herald added a project: clang. This function is marked with CINDEX_LINKAGE, but was never added to the export list / linker script. Repository: rG LLVM Github Monorepo

[PATCH] D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines.

2021-07-28 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106924/new/ https://reviews.llvm.org/D106924

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-28 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 -- it's not the cleanest solution (we're duplicating the call to `diag()`), but it'll suffice. If we wanted to clean it up a bit, we could use an `llvm::Optional Diagnose

[PATCH] D106753: ConvertUTF: Created wrapper convertUTF32ToUTF8String

2021-07-28 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 updated this revision to Diff 362431. MarcusJohnson91 added a comment. Updated the tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106753/new/ https://reviews.llvm.org/D106753 Files: llvm/include/llvm/Support/ConvertUTF.h llvm/lib/Support/ConvertUTFWrapper.cpp

[PATCH] D106925: COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used

2021-07-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106925#2910638 , @rnk wrote: > lgtm > > So the main impact here is that, on ELF, linker GC will no longer be able to > GC vague linkage global variables with dynamic initializers. Those are things > like > > - C++17 inline

  1   2   >