[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364359. stevewan added a comment. Add test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/RecordLayoutBu

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364350. stevewan marked an inline comment as done. stevewan added a comment. Fix the same problem in field layout. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Fi

[PATCH] D107420: [sema] Disallow __builtin_mul_overflow under special condition.

2021-08-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 364349. FreddyYe added a comment. update lit test, clang-format, if condition, diagnostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107420/new/ https://reviews.llvm.org/D107420 Files: clang/include/clan

[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

2021-08-04 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 364342. Jake-Egan added a comment. Merge else and if. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107244/new/ https://reviews.llvm.org/D107244 Files: clang/lib/Basic/Targets/PPC.cpp clang/test/Preproce

[PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, chandlerc, lattner, tonic. Herald added subscribers: dexonsmith, martong, pengfei, arphaman, kbarton, hiraditya, nemanjai, qcolombet, MatzeB. cjdb requested review of this revision. Herald added projects: clang, LLDB, LLVM, clang-too

[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

2021-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:259 Builder.defineMacro("__PPC64__"); + // Also define _ARCH_PPC64 for 32-bit on AIX. + } else { Merge `else` with single `if`-statement as the sole contents of the b

[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

2021-08-04 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 364330. Jake-Egan added a comment. Add comment. clang-format suggests a second indent, but I think this is correct because the comment is addressing the else clause. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D107522: [PowerPC][AIX] attribute aligned cannot decrease align of a vector var.

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile created this revision. sfertile added reviewers: stevewan, Jake-Egan, hubert.reinterpretcast. Herald added subscribers: shchenz, nemanjai. Herald added a reviewer: aaron.ballman. sfertile requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commi

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. Thanks Steven, LGTM. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 stevewan wrote: > sfertile wrote: > > Minor nit: I think the other test can live in t

[PATCH] D107433: [RISCV] Half-precision for vget/vset.

2021-08-04 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/test/CodeGen/RISCV/rvv-intrinsics/vget.c:554 +// +vfloat16m1_t test_vget_v_f16m2_f16m1 (vfloat16m2_t src, size_t index) { + return vget_v_f16m2_f16m1(src, 0); index is an unused argument. Comment

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:133-134 "readability-uppercase-literal-suffix"); +CheckFactories.registerCheck( +"readability-use-alternative-tokens"); CheckFactories.registerChe

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 364307. cjdb marked 5 inline comments as done. cjdb edited the summary of this revision. cjdb added a comment. - renames check to 'readability-alternative-tokens' - adds section in documentation about configurability - adds support for C source - corrects whitesp

[PATCH] D99732: [AST] Pick last tentative definition as the acting definition

2021-08-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Do you need help merging this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99732/new/ https://reviews.llvm.org/D99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created release/13.x merge request: https://bugs.llvm.org/show_bug.cgi?id=51350 The release manager makes the call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/new/ https://reviews.llvm.org/D107393 ___

[PATCH] D107125: [Diagnostic] Split 'qualifier on reference type has no effect' out into a new flag

2021-08-04 Thread Luna Kirkby via Phabricator via cfe-commits
lunasorcery updated this revision to Diff 364289. lunasorcery added a comment. Ah, that's much cleaner! I hadn't realized the test framework could do that. I've updated the diff accordingly - your example works perfectly, so I've taken that and ditched the now-unnecessary other test. CHANGES SI

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7df405e079c5: Apply -fmacro-prefix-map to __builtin_FILE() (authored by Svenny, committed by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/n

[clang] 7df405e - Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via cfe-commits
Author: Pavel Asyutchenko Date: 2021-08-04T16:42:14-07:00 New Revision: 7df405e079c5045562c53f7a2504b85f423078be URL: https://github.com/llvm/llvm-project/commit/7df405e079c5045562c53f7a2504b85f423078be DIFF: https://github.com/llvm/llvm-project/commit/7df405e079c5045562c53f7a2504b85f423078be.d

[PATCH] D106799: [OpenMP] Always inline the OpenMP outlined function

2021-08-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. Looks like now omp.outlined functions are marked with both 'noinline' and 'alwaysinline'. See https://bugs.llvm.org/show_bug.cgi?id=51349 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106799/new/ https://reviews.llvm.org

[PATCH] D107503: [clang][Rewriter] patch to fix bug with ReplaceText erasing too many characters when text has been inserted before the replace location.

2021-08-04 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 364283. ajohnson-uoregon added a comment. making patch happy??? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107503/new/ https://reviews.llvm.org/D107503 Files: clang/include/clang/Rewrite/Core/Rew

[PATCH] D107503: [clang][Rewriter] patch to fix bug with ReplaceText erasing too many characters when text has been inserted before the replace location.

2021-08-04 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 364282. ajohnson-uoregon retitled this revision from "[clang][Rewriter] patch to fix bug with ReplaceText erasing too many characters when text has been inserted before the replace location. " to "[clang][Rewriter] patch to fix bug with ReplaceText

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1205 def BackendOptimizationFailure : DiagGroup<"pass-failed">; +def BackendUserDiagnostic : DiagGroup<"user-diagnostic">; ---

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 364280. nickdesaulniers marked 5 inline comments as done. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - remove stale todos, change warning to -Wwarning-attributes to match GCC, update docs Repository: rG L

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 364277. JonChesterfield added a comment. - consistent __volatile__ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107492/new/ https://reviews.llvm.org/D107492 Files: clang/lib/Headers/__clang_cuda_dev

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D107492#2926910 , @tra wrote: > In D107492#2926871 , > @JonChesterfield wrote: > >> Therefore I'd like to leave it as `__asm__ volatile`. > > Being the one who introduced incon

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D107492#2926871 , @JonChesterfield wrote: > Therefore I'd like to leave it as `__asm__ volatile`. Being the one who introduced inconsistent use of `__volatile__` and `volatile` in this header, I'm pretty sure that PTX's notion o

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added inline comments. Comment at: clang/lib/Headers/__clang_cuda_device_functions.h:1043 } -#else // CUDA_VERSION >= 9020 +#else // CUDA_VERSION >= 9020 // CUDA no longer provides inline assembly (or bitcode) implementation of these JonChesterfield wr

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/Headers/__clang_cuda_device_functions.h:1043 } -#else // CUDA_VERSION >= 9020 +#else // CUDA_VERSION >= 9020 // CUDA no longer provides inline assembly (or bitcode) implementation of these JonChester

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 364274. JonChesterfield added a comment. - whitespace change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107492/new/ https://reviews.llvm.org/D107492 Files: clang/lib/Headers/__clang_cuda_device_fu

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

2021-08-04 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D107024#2917202 , @aprantl wrote: > I think that looks fine — I wonder if we should change the IR pretty printer > to display empty arrays inline as `elements: !{}`, too. I think that's a good idea, but it would require changin

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Re: `__volatile__`. I've done some background reading on it but can't find the original motivation. `__asm__` exists because the asm word is in the application namespace and asm is an extension. Volatile has been with us since C89 though, and is also accepted un

[PATCH] D107497: [PowerPC][AIX] Limit attribute aligned to 4096.

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile updated this revision to Diff 364264. sfertile added a comment. Fix formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107497/new/ https://reviews.llvm.org/D107497 Files: clang/lib/Sema/SemaDeclAttr.cpp clang/test/Sema/aix-attr

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Okay I think this is what you had in mind. LMK, if it's good I'll go ahead and delete the other ones Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105904/new/ https://reviews.llvm.org/D105904

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov requested changes to this revision. emankov added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Headers/__clang_cuda_device_functions.h:1043 } -#else // CUDA_VERSION >= 9020 +#else // CUDA_VERSION >= 9020 // CUDA no longer provid

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile created this revision. sfertile added reviewers: stevewan, Jake-Egan, cebowleratibm. sfertile added a project: PowerPC. Herald added subscribers: shchenz, nemanjai. sfertile requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With xlc

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 364263. dgoldman added a comment. the third time is the charm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105904/new/ https://reviews.llvm.org/D105904 Files: clang-tools-extra/clangd/CollectMacros.cpp c

[PATCH] D107503: [clang][Rewriter] patch to fix bug with ReplaceText erasing too many characters when text has been inserted before the replace location. See https://llvm.discourse.group/t/possible-bu

2021-08-04 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon created this revision. ajohnson-uoregon added reviewers: jdoerfert, rsmith, klimek. ajohnson-uoregon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ...-rewriterope/3970 [clang][Rewriter] split test for replace after inser

[PATCH] D107318: [OpenCL] allow generic address and non-generic defs for CL3.0

2021-08-04 Thread Dave Airlie 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 rG14cb67862a72: [OpenCL] allow generic address and non-generic defs for CL3.0 (authored by airlied). Repository: rG LLVM Github Monorepo CHANGES SI

[clang] 14cb678 - [OpenCL] allow generic address and non-generic defs for CL3.0

2021-08-04 Thread Dave Airlie via cfe-commits
Author: Dave Airlie Date: 2021-08-05T07:32:45+10:00 New Revision: 14cb67862a723027c6787baa263f5bf6e03ab01d URL: https://github.com/llvm/llvm-project/commit/14cb67862a723027c6787baa263f5bf6e03ab01d DIFF: https://github.com/llvm/llvm-project/commit/14cb67862a723027c6787baa263f5bf6e03ab01d.diff L

[PATCH] D106960: [OffloadArch] Library to query properties of current offload archicture

2021-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This only works on Linux. So either to make it work on both Linux and Windows, or restrict it to Linux in CMakeLists.txt, otherwise it breaks LLVM build on Windows. Comment at: llvm/lib/OffloadArch/OffloadArch.cpp:17 +#include "llvm/Support/WithColor.h

[PATCH] D106713: Thread safety analysis: Warn when demoting locks on back edges

2021-08-04 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Ping @delesley. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106713/new/ https://reviews.llvm.org/D106713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D107430: [OMPIRBuilder] Add ordered without depend and simd clause to OMPBuilder

2021-08-04 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:708 /// - /// \returns The insertion position *after* the master. + /// \returns The insertion position *after* the masked. InsertPointTy createMasked(const LocationDescription

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Files bug to edit the release not as suggested by @xbolva00 here: https://bugs.llvm.org/show_bug.cgi?id=51347 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 _

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. In D74436#2926385 , @tstellar wrote: > Can someone file a bug for this and put release-13.0.0 in the blocks field so > we can track it? Filed https://bugs.llvm.org/show_bug.cgi?id=51346 . Repository: rG LLVM Github Monorepo C

[PATCH] D107366: [analyzer] Adjust JS code of analyzer's HTML report for IE support.

2021-08-04 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision. vsavchenko added a comment. In D107366#2926662 , @ASDenysPetrov wrote: > In D107366#2926343 , @NoQ wrote: > >> Works in Firefox on macOS as well! > > Great! > @vsavchenko , any

[PATCH] D107366: [analyzer] Adjust JS code of analyzer's HTML report for IE support.

2021-08-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D107366#2926343 , @NoQ wrote: > Works in Firefox on macOS as well! Great! @vsavchenko , any suggestions? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107366/new/ https://reviews.llvm.org/D107366

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 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. LGTM in general. Comment at: clang/lib/Headers/__clang_cuda_device_functions.h:37 #if defined(__cplusplus) -__DEVICE__ void __brkpt() { asm volatile("brkpt;"); } +__DEVICE__ void

[PATCH] D80878: [clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations.

2021-08-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/AST/ASTDumper.cpp:199 P.setDeserialize(Deserialize); +P.doGetNodeDelegate().setDeserialize(Deserialize); P.Visit(this); It is possible it will complicate the implementation too much but what if `

[PATCH] D107497: [PowerPC][AIX] Limit attribute aligned to 4096.

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile created this revision. sfertile added reviewers: Jake-Egan, stevewan. sfertile added a project: PowerPC. Herald added subscribers: shchenz, nemanjai. Herald added a reviewer: aaron.ballman. sfertile requested review of this revision. Herald added a project: clang. Herald added a subscriber

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6057 +assertions that depend on optimizations, while providing diagnostics +pointing to precise locations of the call site in the source. + }]; nickdesaulniers wrote:

[PATCH] D106701: [clang] Implement -falign-loops=N (N is a power of 2) for non-LTO

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106701#2924638 , @luismarques wrote: > Still LGTM. > > BTW, I liked that in the old version the help string included "In GCC =0 is > the same as =1". I find that in GCC =0 is not necessarily =1, but not particular clear abo

[PATCH] D106701: [clang] Implement -falign-loops=N (N is a power of 2) for non-LTO

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 364224. MaskRay retitled this revision from "[clang] Add -falign-loops=N where N is a power of 2" to "[clang] Implement -falign-loops=N (N is a power of 2) for non-LTO". MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a subs

[PATCH] D107138: [PowerPC] Implement cmplxl builtins

2021-08-04 Thread Albion Fung via Phabricator via cfe-commits
Conanap marked an inline comment as done. Conanap added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-complex.c:1 +// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-unknown \ +// RUN: -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s NeH

[PATCH] D107138: [PowerPC] Implement cmplxl builtins

2021-08-04 Thread Albion Fung via Phabricator via cfe-commits
Conanap updated this revision to Diff 364223. Conanap marked 6 inline comments as done. Conanap added a comment. Removed backend tests, removed some uneeded definitions, updated frontend test with regex for variable names. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D105881: [flang][driver] Switch to `BoolFOption` for boolean options

2021-08-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 364220. awarzynski added a comment. Remove `EmptyKPM`, introduce `OptOutFC1FFlag` and `OptInFC1FFlag` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105881/new/ https://reviews.llvm.org/D105881 Files: clan

[PATCH] D105881: [flang][driver] Switch to `BoolFOption` for boolean options

2021-08-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D105881#2919575 , @jansvoboda11 wrote: > The `clang` driver always accepts both the positive and negative options, and > it always only considers the argument that appeared last on the command-line > (using `ArgList::getL

[PATCH] D105671: [Intrinsics][ObjC] Mark objc_retain and friends as thisreturn.

2021-08-04 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In D105671#2884483 , @rjmccall wrote: > IIUC, we sometimes turn `-retain` message sends into calls to `objc_retain` > and so on. Outside of ARC (the only time they're valid), these calls don't > have the semantics of guarantee

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Pavel Asyutchenko via Phabricator via cfe-commits
Svenny updated this revision to Diff 364217. Svenny added a comment. Herald added a subscriber: dang. Updated ffile-prefix-map and fmacro-prefix-map in clang/include/clang/Driver/Options.td. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/new/ https://reviews.llvm.org/D107393 Fil

[PATCH] D105671: [Intrinsics][ObjC] Mark objc_retain and friends as thisreturn.

2021-08-04 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 364215. jroelofs added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a note/check to the `[x retain] => objc_retain(x)` test explaining why it shouldn't be lowered as an intrinsic call in the future. Repository: rG

[PATCH] D107402: Correct a lot of diagnostic wordings for the driver

2021-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 364212. aaron.ballman added a comment. Updating for some test cases that are still failing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107402/new/ https://reviews.llvm.org/D107402 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Pavel Asyutchenko via Phabricator via cfe-commits
Svenny added a comment. Great! My commit author string is `Pavel Asyutchenko `. I have an even uglier hack to work around this: to offset the value of `__builtin_FILE()` by compile-time calculated location of some known substring like `src` or `include`. CHANGES SINCE LAST ACTION https://re

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2926310 , @sammccall wrote: > Clang's current answer is "yes we are GCC >=4, but no we are not GCC >=5". > This causes the codebase to reject the compiler, because it relies on > features/absence of bugs from GCC 5. @A

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. clang/include/clang/Driver/Options.td HelpText for -fmacro-prefix-map= needs an update. https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html has more documentation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/new/ https://reviews.llvm.org/D107

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-04 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm requested changes to this revision. cebowleratibm added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Basic/Targets/OSTargets.h:679 Builder.defineMacro("__TOS_AIX__"); +Builder.defineMacro("__HOS_AIX__"); --

[PATCH] D101960: [openmp] Drop requirement on library path environment variables

2021-08-04 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. To make debugging of failed tests easier, we could just explicitly include `env LD_LIBRARY_PATH=...` into each run line - by adding it to the `%libomp-run` substitution (and the libomptarget equivalent). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I can push it on your behalf, I want to wait a bit for more comments. (You need to provide name/email so that you can get the proper attribution `git commit --amend --author='...'`) Looks like a good candidate for release/13.x for build reproducibility. absl has a macro

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Can someone file a bug for this and put release-13.0.0 in the blocks field so we can track it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D106738: [RISCV] Use getNaturalPointeeTypeAlignment to get alignment for stores created for vector builtins.

2021-08-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106738/new/ https://reviews.llvm.org/D106738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D106815: Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX

2021-08-04 Thread Mark Danial via Phabricator via cfe-commits
madanial marked an inline comment as done. madanial added a comment. I need some help to commit this change as I do not have commit access as of now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106815/new/ https://reviews.llvm.org/D106815 __

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Implemented by `F=__clang_cuda_device_functions.h ; sed -i 's$asm$__asm__$g' $F && clang-format -i $F` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107492/new/ https://reviews.llvm.org/D107492 ___

[PATCH] D107366: [analyzer] Adjust JS code of analyzer's HTML report for IE support.

2021-08-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Works in Firefox on macOS as well! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107366/new/ https://reviews.llvm.org/D107366 ___ cfe-commits ma

[PATCH] D107492: [clang] Replace asm with __asm__ in cuda header

2021-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. JonChesterfield added reviewers: tra, emankov, gtbercea, jdoerfert. Herald added a subscriber: yaxunl. JonChesterfield requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Asm is a gnu extension fo

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

2021-08-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:298 + } + return {State, true}; +} Something's not right. Returning `true` here would discard the state and terminate `evalCall` as failed. Why compute the invalidate

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-08-04 Thread Ali Shuja Siddiqui via Phabricator via cfe-commits
alishuja added a comment. Herald added a subscriber: manas. Based on the comment from @vsavchenko , I had made an addition for a check for `__addressof` alongside `addressof` in the checker. What would be the correct way of pushing the diff here? Should I reopen this revision or use the update

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I disagree that this is a pointless discussion, FWIW. The `__GNUC__` macro is used for compiler feature (or bug?) detection. Clang's current answer is "yes we are GCC >=4, but no we are not GCC >=5". This causes the codebase to reject the compiler, because it relies on

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Pavel Asyutchenko via Phabricator via cfe-commits
Svenny marked an inline comment as done. Svenny added a comment. Could you please land it? I don't have commit access. Also, any chance this patch can get into 13.x release branch? Not sure if it counts as a feature or a bugfix :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/ne

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6057 +assertions that depend on optimizations, while providing diagnostics +pointing to precise locations of the call site in the source. + }]; @aaron.ballman anythi

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 sfertile wrote: > Minor nit: I think the other test can liv

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Pavel Asyutchenko via Phabricator via cfe-commits
Svenny updated this revision to Diff 364195. Svenny added a comment. Moved new test to CodeGenCXX/builtin-source-location.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107393/new/ https://reviews.llvm.org/D107393 Files: clang/include/clang/Basic/LangOptions.h clang/include/cla

[PATCH] D80878: [clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations.

2021-08-04 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. This is technically in the "Waiting on Review" queue, that's why I also added another reviewer :). The original revision got accepted and then I reverted and updated the patch/test to honor the `Deserialize` value (which was broken in the first version). I guess the f

[PATCH] D99551: [clang-offload-wrapper] Add standard notes for ELF offload images

2021-08-04 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari updated this revision to Diff 364193. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99551/new/ https://reviews.llvm.org/D99551 Files: clang/test/Driver/Inputs/empty-elf-template.yaml clang/test/Driver/clang-offload-wrapper.c clang/tools/clang-offload-wrapper/CMakeLists.txt

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for FP atomics in GFX90A

2021-08-04 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. The title should not mention gfx90a, it is not true. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-commits mailing list cfe-

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for FP atomics in GFX90A

2021-08-04 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12139 +OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction()); +Remark << "A hardware instruction was generated"; +return Remark; gandhi2129

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for FP atomics in GFX90A

2021-08-04 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12139 +OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction()); +Remark << "A hardware instruction was generated"; +return Remark; rampite

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 364186. stevewan added a comment. Merge tests into one file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files: clang/lib/AST/ASTContext.cpp clang/test/Layout

[PATCH] D107393: Apply -fmacro-prefix-map to __builtin_FILE()

2021-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang/test/CodeGen/macro-prefix-map.c:1 +// RUN: %clang_cc1 -fmacro-prefix-map=%p=/UNLIKELY/PATH -emit-llvm -o - %s | FileCheck %s + T

[PATCH] D80878: [clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations.

2021-08-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. @teemperor is there a reason why the fixed patch never landed? This looks a good improvement to have. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80878/new/ https://reviews.llvm.org/D80878 ___ cfe-commits mailing l

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2924886 , @kadircet wrote: > Ok if you think that setting GCC version to higher values by default won't > break anything, I think that GCC version should be the same, which was used to build the project: it can be hi

[PATCH] D106960: [OffloadArch] Library to query properties of current offload archicture

2021-08-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D106960#2925610 , @ye-luo wrote: > my second GPU is NVIDIA 3060Ti (sm_86) > I build my app daily with -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_80. > > About sm_80 binary able ot run on sm_86 > https://docs.nvidia.com/cuda/ampe

[PATCH] D107402: Correct a lot of diagnostic wordings for the driver

2021-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 364172. aaron.ballman added a comment. Updating based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107402/new/ https://reviews.llvm.org/D107402 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Drive

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

2021-08-04 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.def:201 +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_f32, "ff*1f", "t", "gfx90a-insts") +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_v2f16, "V2hV2h*1V2h", "t", "gfx90a-insts") +TA

[PATCH] D107394: [AIX] "aligned" attribute does not decrease alignment

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Comment at: clang/test/Layout/aix-alignof-align-and-pack-attr.cpp:11 + +// CHECK: @c = global %struct.C zeroinitializer, align 2 Minor nit: I think the other test can live in this file, highlighting the difference between the 2 ca

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:535 +/// by range. +std::vector mergePragmas(std::vector &Syms, + std::vector &Pragmas, dgoldm

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked 2 inline comments as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:664 + } + // NextPragma is after us but before the next symbol. Our reign is over. + break; kadircet wrote: > I suppose

[PATCH] D107241: [AIX] Define __THW_BIG_ENDIAN__ macro

2021-08-04 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm accepted this revision. cebowleratibm 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/D107241/new/ https://reviews.llvm.org/D107241

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

2021-08-04 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.def:201 +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_f32, "ff*1f", "t", "gfx90a-insts") +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_v2f16, "V2hV2h*1V2h", "t", "gfx90a-insts")

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

2021-08-04 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 364152. gandhi21299 added a comment. updating test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106909/new/ https://reviews.llvm.org/D106909 Files: clang/include/clang/Basic/BuiltinsAMDGPU.def clang/l

[PATCH] D107477: [LLVM][AST][NFC] Resolve Fixme: Make CXXRecordDecl *Record const.

2021-08-04 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit created this revision. gAlfonso-bit added a project: LLVM. gAlfonso-bit 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/D107477 Files: clang/include/clang/AST/C

[PATCH] D94639: [DebugInfo][CodeView] Change in line tables only mode to emit parent/context scopes for functions, using declarations for types

2021-08-04 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D94639#2918559 , @SeTSeR wrote: > Thank you for the detailed answer. I'll discuss our use case with our team. > Should I create a separate ticket for this? Or maybe it would be better if I > submitted the PR adding this flag? It'

[PATCH] D107420: [sema] Disallow __builtin_mul_overflow under special condition.

2021-08-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8351-8353 +def err_overflow_builtin_special_combination_max_size : Error< + "__builtin_mul_overflow does not suport unsigned overflow check aft

[PATCH] D107420: [sema] Disallow __builtin_mul_overflow under special condition.

2021-08-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added a comment. Addressed. THX review! Comment at: clang/test/Sema/builtins-overflow.c:45 +unsigned _ExtInt(128) result; +_Bool status = __builtin_mul_overflow(x, y, &result); // expected-error {{__builtin_mul_overfl

  1   2   >