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

2021-08-03 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. I just realized that LLVM has a gap with GCC due to the compiler-rt call. Check this example: https://gcc.godbolt.org/z/8Pf7zErr7 I need further investigation to know why this gap happens. Pls don't review the code. Repository: rG LLVM Github Monorepo CHANGES

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

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2922975 , @kadircet wrote: > But I am not convinced that changing the default behaviour here is going to > be beneficial for majority of the users. I think that majority of users doesn't use `--query-driver` at all.

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping. - -falign-loops= is currently silently ignored. - -fliang-loops= has user interest from at least x86 and RISC-V. - This patch makes it work for the non-LTO case. I think this is good enough. The LTO case require a function attribute (this doesn't apply to

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2021-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping @jrtc27 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58531/new/ https://reviews.llvm.org/D58531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. In D107325#2923518 , @thakis wrote: > The bot is happy again, thanks. Nice, thank you for your help :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107325/new/

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

2021-08-03 Thread Dave Airlie via Phabricator via cfe-commits
airlied added a comment. @azabaznov no bad effects here in my initial basic testing with CL 3.0, I'll land this tomorrow or next day when I get a chance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107318/new/ https://reviews.llvm.org/D107318

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

2021-08-03 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 363950. FreddyYe added a comment. update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107420/new/ https://reviews.llvm.org/D107420 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

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

2021-08-03 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When __builtin_mul_overflow has input combination of (signed, signed, unsigned*) and arbitary width is larger than 64 bits, it will also generate i256

[PATCH] D107145: clangd: Add new semantic token modifier "virtual"

2021-08-03 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG159a26964840: [clangd] Add new semantic token modifier virtual (authored by ckandeler, committed by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 159a269 - [clangd] Add new semantic token modifier "virtual"

2021-08-03 Thread Fangrui Song via cfe-commits
Author: Christian Kandeler Date: 2021-08-03T19:53:01-07:00 New Revision: 159a26964840c456f92387c670557e7174d4 URL: https://github.com/llvm/llvm-project/commit/159a26964840c456f92387c670557e7174d4 DIFF:

[PATCH] D105877: [Coroutines] Run coroutine passes by default

2021-08-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D105877#2923257 , @nikic wrote: > I noticed that this change had a measurable impact on `O0` memory usage, > which I wouldn't have expected >

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens in declarations

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363927. cjdb retitled this revision from "[clang] adds warning to alert user when they use alternative tokens as references" to "[clang] adds warning to alert user when they use alternative tokens in declarations". cjdb edited the summary of this revision. cjdb

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-03 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. besides the clang test in this patch, there are more clang tests in the following patches (involving codegen): https://reviews.llvm.org/D106615 (for struct/union types) https://reviews.llvm.org/D106618 (for functions) https://reviews.llvm.org/D106619 (for

[PATCH] D106619: [Clang][LLVM] generate btf_tag annotations for DIGlobalVariable

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 363923. yonghong-song added a comment. - add more cases in clang test attr-btf_tag-diglobalvariable.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106619/new/ https://reviews.llvm.org/D106619 Files:

[PATCH] D106618: [Clang][LLVM] generate btf_tag annotations for DISubprogram types

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 363920. yonghong-song added a comment. - add more cases in clang test attr-btf_tag-disubprogram.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106618/new/ https://reviews.llvm.org/D106618 Files:

[PATCH] D106615: [Clang][LLVM] generate btf_tag annotations for DIComposite types

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 363919. yonghong-song added a comment. - add more cases in clang attr-btf_tag-dicomposite.c test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106615/new/ https://reviews.llvm.org/D106615 Files:

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 363915. yonghong-song edited the summary of this revision. yonghong-song added a comment. - for redeclarations, use additive approach to accumulate all btf_tag attributes and apply accumulated attributes to the redeclaration. Repository: rG LLVM

[clang] ba2be8d - [clang/OpenMP][docs] Update OpenMP support list for unroll.

2021-08-03 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2021-08-03T18:11:17-05:00 New Revision: ba2be8deba79f1aa64a86019e78bcd2536b14eb5 URL: https://github.com/llvm/llvm-project/commit/ba2be8deba79f1aa64a86019e78bcd2536b14eb5 DIFF: https://github.com/llvm/llvm-project/commit/ba2be8deba79f1aa64a86019e78bcd2536b14eb5.diff

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

2021-08-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:3346-3347 + if (auto *RD = dyn_cast(DC)) +return RD->getDefinition(); + In D71734 we have ```lang=c++ if (auto *RD = dyn_cast(DC)) if

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

2021-08-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 363894. vsapsai added a comment. Add missing changes back. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106994/new/ https://reviews.llvm.org/D106994 Files: clang/include/clang/Serialization/ASTReader.h

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

2021-08-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 363891. vsapsai added a comment. Handle nested anonymous structs and `IndirectFieldDecl`; more tests to cover unions and bitfields. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106994/new/

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

2021-08-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3819 + let Args = [StringArgument<"UserDiagnostic">]; + let Subjects = SubjectList<[Function], ErrorDiag>; + let Documentation =

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

2021-08-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 363888. nickdesaulniers marked 8 inline comments as done. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. Herald added subscribers: ormris, steven_wu. - LTO test, diagnose inheritability Repository: rG LLVM

[PATCH] D106674: Runtime for Interop directive

2021-08-03 Thread Ravi Narayanaswamy via Phabricator via cfe-commits
RaviNarayanaswamy added inline comments. Comment at: openmp/libomptarget/src/interop.cpp:194-196 + if (device_id == -1) { +device_id = omp_get_default_device(); + } Need to check if device is available for all 3 __tgt_interop_init/use/destroy

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

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added a reviewer: erichkeane. Herald added subscribers: phosek, jfb. aaron.ballman requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a project: clang. Clang diagnostics should

[PATCH] D107399: [clang] fix crash on template instantiation of invalid requires expressions

2021-08-03 Thread Matheus Izvekov 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 rGe64e6924b8ae: [clang] fix crash on template instantiation of invalid requires expressions (authored by mizvekov). Changed prior to commit:

[clang] e64e692 - [clang] fix crash on template instantiation of invalid requires expressions

2021-08-03 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-08-03T23:16:04+02:00 New Revision: e64e6924b8aef8d48117beb6e87162109ac2512c URL: https://github.com/llvm/llvm-project/commit/e64e6924b8aef8d48117beb6e87162109ac2512c DIFF:

[PATCH] D107399: [clang] fix crash on template instantiation of invalid requires expressions

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. mizvekov added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. See PR48656. The implementation of the template instantiation of requires expression was incorrectly trying to

[PATCH] D105877: [Coroutines] Run coroutine passes by default

2021-08-03 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. it's probably because we're constructing the call graph every time at -O0 we want to skip all of that if there are no coroutine intrinsics in the module. we can't really express that currently. if we'd want to do something like that, we'd need a wrapper around the

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The bot is happy again, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107325/new/ https://reviews.llvm.org/D107325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG219790c1f536: [clang] fix canonicalization of nested name specifiers (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107311/new/

[clang] 219790c - [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-08-03T22:39:48+02:00 New Revision: 219790c1f53665a8b5f7578472e5c2675f9bec6a URL: https://github.com/llvm/llvm-project/commit/219790c1f53665a8b5f7578472e5c2675f9bec6a DIFF:

[PATCH] D107073: [analyzer] Disable direct binding from list initialization for constant arrays of local storage duration.

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 363869. ASDenysPetrov added a comment. Fixed clang-tidy complaints. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107073/new/ https://reviews.llvm.org/D107073 Files: clang/lib/StaticAnalyzer/Core/RegionStore.cpp

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

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 363870. stevewan added a comment. Fix incomplete diff, please discard last update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files:

[PATCH] D105877: [Coroutines] Run coroutine passes by default

2021-08-03 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. In D105877#2923257 , @nikic wrote: > I noticed that this change had a measurable impact on `O0` memory usage, > which I wouldn't have expected >

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

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 363860. stevewan added a comment. Attr 'packed' is already taken into account in ABIAlign/PreferredAlign Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107394/new/ https://reviews.llvm.org/D107394 Files:

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Nico Weber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG559d142331c2: [clang-tidy] Fix command line is too long issue which breaks test on Windows (authored by dougpuob, committed by thakis). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 559d142 - [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Nico Weber via cfe-commits
Author: Douglas Chen Date: 2021-08-03T22:12:46+02:00 New Revision: 559d142331c2cbab0987f1d530df2c3c8a7be6e4 URL: https://github.com/llvm/llvm-project/commit/559d142331c2cbab0987f1d530df2c3c8a7be6e4 DIFF: https://github.com/llvm/llvm-project/commit/559d142331c2cbab0987f1d530df2c3c8a7be6e4.diff

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

2021-08-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1352-1356 + // key 'j' + if (event.keyCode == 74) { navigateTo(/*up=*/false); - } else if (event.key == "k") { + // key 'k' + } else if (event.keyCode == 75) {

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

2021-08-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. stevewan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The "aligned" attribute can only increase the alignment of a struct, or struct member, unless it's used together with the "packed" attribute, or used

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

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363850. cjdb added a comment. removes obsolete code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt

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

2021-08-03 Thread Pavel Asyutchenko via Phabricator via cfe-commits
Svenny created this revision. Svenny added reviewers: dankm, MaskRay, rnk, Lekensteyn, echristo. Svenny added a project: clang. Herald added a subscriber: dexonsmith. Svenny requested review of this revision. Herald added a subscriber: cfe-commits. This will match the behavior of GCC. Patch does

[PATCH] D99993: [clang-tidy] bugprone-argument-comment: ignore name mismatches for decls from system headers

2021-08-03 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e75986a21e5: bugprone-argument-comment: ignore mismatches from system headers (authored by gbiv). Changed prior to commit: https://reviews.llvm.org/D3?vs=335660=363846#toc Repository: rG LLVM

[clang-tools-extra] 2e75986 - bugprone-argument-comment: ignore mismatches from system headers

2021-08-03 Thread George Burgess IV via cfe-commits
Author: George Burgess IV Date: 2021-08-03T19:56:27Z New Revision: 2e75986a21e543ac9f169a067542eec590339ac0 URL: https://github.com/llvm/llvm-project/commit/2e75986a21e543ac9f169a067542eec590339ac0 DIFF: https://github.com/llvm/llvm-project/commit/2e75986a21e543ac9f169a067542eec590339ac0.diff

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

2021-08-03 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. @dblaikie I think @sammccall mentioned `IWYU pragma: friend` before, that's what I was alluding to. Much of IWYU's complexity comes from maintaining these library mappings both statically (using mapping tables) and dynamically (using in-source annotations). I figured

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D107292#2923003 , @rsmith wrote: > We should also warn on: > > - `and` or `bitand` used as a ref-qualifier in a member function declaration > - `xor` used to declare a block pointer type or block pointer literal > - `bitand` used

[PATCH] D105877: [Coroutines] Run coroutine passes by default

2021-08-03 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. I noticed that this change had a measurable impact on `O0` memory usage, which I wouldn't have expected (https://llvm-compile-time-tracker.com/compare.php?from=0f9e6451a836886f39137818c4f0cfd69ae31e62=8a1727ba51d262365b0d9fe10fef7e50da7022cd=max-rss). Any idea what could

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Andrii Nakryiko via Phabricator via cfe-commits
anakryiko added a comment. I think it's reasonable behavior to just merge all bpf_tags across declaration(s) and a definition. Kind of like __weak behaves, it doesn't matter if it's on actual function or its extern declaration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D106394#2923186 , @dblaikie wrote: > In D106394#2922972 , @rsmith wrote: > >> ... As an alternative, have you considered checking whether any of the >> headers named in the pragma are

[PATCH] D99993: [clang-tidy] bugprone-argument-comment: ignore name mismatches for decls from system headers

2021-08-03 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. ...This entirely dropped off my radar. Will try to land it now; thanks, all! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D3/new/ https://reviews.llvm.org/D3

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

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D106394#2922972 , @rsmith wrote: > ... As an alternative, have you considered checking whether any of the > headers named in the pragma are in the include stack, and warning if not? > That would seem to make this warning

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

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Lex/Pragma.cpp:1996 AddPragmaHandler("clang", new PragmaSystemHeaderHandler()); + AddPragmaHandler("clang", new PragmaIncludeInsteadHandler()); AddPragmaHandler("clang", new PragmaDebugHandler());

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

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363831. cjdb edited the summary of this revision. cjdb added a comment. - updates licences - updates documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294

[PATCH] D107385: Fix signal during the call to checkOpenMPLoop.

2021-08-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev 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/D107385/new/ https://reviews.llvm.org/D107385

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

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D106394#2923007 , @cjdb wrote: > In D106394#2922972 , @rsmith wrote: > >> As an alternative, have you considered checking whether any of the headers >> named in the pragma are in the

[PATCH] D107385: Fix signal during the call to checkOpenMPLoop.

2021-08-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, mikerice, cfe-commits. jyu2 added projects: clang, OpenMP. Herald added subscribers: guansong, yaxunl. jyu2 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Fix signal during the

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

2021-08-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/Lex/Pragma.cpp:1996 AddPragmaHandler("clang", new PragmaSystemHeaderHandler()); + AddPragmaHandler("clang", new PragmaIncludeInsteadHandler()); AddPragmaHandler("clang", new PragmaDebugHandler());

[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

2021-08-03 Thread Sami Tolvanen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7ce1c4da7726: ThinLTO: Fix inline assembly references to static functions with CFI (authored by samitolvanen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. In D106909#2922567 , @gandhi21299 wrote: > @rampitec how do I handle the following? > > builtins-fp-atomics.cl:38:10: error: > '__builtin_amdgcn_global_atomic_fadd_f64' needs target feature > atomic-fadd-insts > *rtn =

[PATCH] D99484: Use `GNUInstallDirs` to support custom installation dirs.

2021-08-03 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 363801. Ericson2314 added a comment. Herald added subscribers: wrengr, Chia-hungDuan. Rebase, push again after previous PR changed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99484/new/

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 363786. gandhi21299 added a comment. refreshing patch, passed all tests associated with the `check-all` CMake option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/

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

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseAlternativeTokensCheck.h:5-6 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// whisperity wrote: > This

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

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3816 + +def Error : Attr { + let Spellings = [GCC<"error">]; nickdesaulniers wrote: > aaron.ballman wrote: > > nickdesaulniers wrote: > > > aaron.ballman wrote: > > > > I think

[PATCH] D100810: Use `GNUInstallDirs` to support custom installation dirs. -- LLVM

2021-08-03 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 marked 2 inline comments as done. Ericson2314 added inline comments. Comment at: llvm/CMakeLists.txt:589 CACHE STRING "Doxygen-generated HTML documentation install directory") -set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"

[PATCH] D107200: Stop emit incomplete type error for a variable in an omp map clause where should not.

2021-08-03 Thread Jennifer Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jyu2 marked an inline comment as done. Closed by commit rG656d02233170: Stop emit incomplete type error for a variable in a map clause (authored by jyu2). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 656d022 - Stop emit incomplete type error for a variable in a map clause

2021-08-03 Thread Jennifer Yu via cfe-commits
Author: Jennifer Yu Date: 2021-08-03T10:51:32-07:00 New Revision: 656d02233170e1707d3534b042960b71cf6eb98b URL: https://github.com/llvm/llvm-project/commit/656d02233170e1707d3534b042960b71cf6eb98b DIFF: https://github.com/llvm/llvm-project/commit/656d02233170e1707d3534b042960b71cf6eb98b.diff

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

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D106394#2922972 , @rsmith wrote: > I'm not in love with the design of this feature. Basing the accept / warn > decision on whether the inclusion is in a system header seems fragile and > doesn't seem to enforce the intended

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. We should also warn on: - `and` or `bitand` used as a ref-qualifier in a member function declaration - `xor` used to declare a block pointer type or block pointer literal - `bitand` used as address-of and `and` used to form a GNU address-of-label - `compl` used to name a

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

2021-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D107304#2922806 , @ArcsinX wrote: > @kadircet Thanks for clarification. Now your position is clear for me. > > But clang was designed as a drop-in replacement for GCC: > > -

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

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm not in love with the design of this feature. Basing the accept / warn decision on whether the inclusion is in a system header seems fragile and doesn't seem to enforce the intended semantics of the warning (that you can only reach the implementation detail header

[PATCH] D105225: [clang] Add support for optional flag -fnew-infallible to restrict exception propagation

2021-08-03 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D105225#2921471 , @rsmith wrote: > Sorry I'm late to the party here... is there any work ongoing to add this to > GCC too? If not, would it make sense to send a quick note to the GCC > development list pointing this out to

[PATCH] D100810: Use `GNUInstallDirs` to support custom installation dirs. -- LLVM

2021-08-03 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 363799. Ericson2314 added a comment. Fix things in response to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100810/new/ https://reviews.llvm.org/D100810 Files:

[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes

2021-08-03 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h:134 + unsigned getMaxNumElements(ElementCount VF, + const Instruction *I = nullptr) const { if (!VF.isScalable()) Can this

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

2021-08-03 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. Can we revert this patch please? If I understood correctly, this patch changed the default behavior of clang when generating code for float point arithmetic. After this patch `-ffp-contract` was set to on if this flag was not specified. In theory this makes clang use

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

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. @kadircet Thanks for clarification. Now your position is clear for me. But clang was designed as a drop-in replacement for GCC: - https://clang.llvm.org/docs/LanguageExtensions.html#introduction - https://clang.llvm.org/features.html#gcccompat I do not have any proves

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. > Yes, the intention is for //this// patch to remain a Clang warning since it's cheap and can be on by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107292/new/ https://reviews.llvm.org/D107292

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

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: vsavchenko, NoQ. ASDenysPetrov added a project: clang. Herald added subscribers: manas, steakhal, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. ASDenysPetrov requested

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D107292#2922599 , @aaron.ballman wrote: > In D107292#2922575 , @dblaikie > wrote: > >> In D107292#2921901 , >> @aaron.ballman wrote: >>

[PATCH] D107365: clangd: Make documentation property of completion items more similar

2021-08-03 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. ckandeler added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. ckandeler requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. ... to the one of

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

2021-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sorry I think I've failed to explain my point. My concern is not about changing the way clang is parsing the code. I am saying that people might make use of compiler extensions by guarding their code with GNUC macros. Today we know that having 4.2.1 for GNUC version

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

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @rampitec how do I handle the following? builtins-fp-atomics.cl:38:10: error: '__builtin_amdgcn_global_atomic_fadd_f64' needs target feature atomic-fadd-insts *rtn = __builtin_amdgcn_global_atomic_fadd_f64(addr, x, memory_order_relaxed); ^

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

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked 5 inline comments as done. gandhi21299 added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16270 +llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); +return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); + }

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 363753. gandhi21299 added a comment. passing ORE into SIISelLowering::shouldExpandAtomicRMW() to be able to emit ORE for unsafe hardware atomics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107292#2922575 , @dblaikie wrote: > In D107292#2921901 , @aaron.ballman > wrote: > >> In D107292#2920774 , @dblaikie >> wrote: >> >>>

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D107292#2921901 , @aaron.ballman wrote: > In D107292#2920774 , @dblaikie > wrote: > >> In D107292#2920746 , @cjdb wrote: >> >>> In

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/test/Sema/attr-btf_tag.c:31 + +int __tag2 foo(struct t1 *arg); // expected-warning {{attribute 'btf_tag("tag2")' ignored as not in later redeclaration or definition}} +int __tag foo(struct t1 *arg);

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

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D106394#2921830 , @kimgr wrote: > Took me a while to get my head around it, but I see now that this is only > supported for system headers. I think that makes sense for the compiler, > otherwise it will be hard to guess

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-03 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 363746. pengfei added a comment. Implemented the handling for structure types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. Hi @thakis: I can't access the repo, could you please help me to land? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107325/new/ https://reviews.llvm.org/D107325 ___

[PATCH] D104647: [analyzer] Support SVal::getType for pointer-to-member values

2021-08-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:85 const NamedDecl *D; + QualType T; llvm::ImmutableList L; NoQ wrote: > What prevents you from obtaining the type from `D`? I guess

[PATCH] D105273: [analyzer] Introduce range-based reasoning for subtraction operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D105273#2891921 , @manas wrote: > Here is the proof using Z3: > https://gist.github.com/weirdsmiley/8a35a0e1f55f310e3566cbd47555491a I have updated the proof for Sub. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2021-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It looks like this patch is also causing mis-compares in both SPEC2006 and SPEC2017 on AArch64, e.g. in `External/SPEC/CFP2006/453.povray/`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/

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

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas marked an inline comment as done. manas added a comment. I have updated the proof for Add: https://gist.github.com/weirdsmiley/ad6a9dbf3370e96d29f9e90068931d25 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/

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

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 363742. manas added a comment. Fix unrelated commits mess up! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files:

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

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/utils/analyzer/Dockerfile:15-22 RUN apt-get update && apt-get install -y \ git=1:2.17.1* \ gettext=0.19.8.1* \ python3=3.6.7-1~18.04 \ python3-pip=9.0.1-2.3* \ -cmake=3.20.5* \ -ninja-build=1.8.2-1 +

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

2021-08-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/utils/analyzer/Dockerfile:15-22 RUN apt-get update && apt-get install -y \ git=1:2.17.1* \ gettext=0.19.8.1* \ python3=3.6.7-1~18.04 \ python3-pip=9.0.1-2.3* \ -cmake=3.20.5* \ -ninja-build=1.8.2-1

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

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 363734. manas added a comment. Fix test comments 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/RangeConstraintManager.cpp

[PATCH] D106343: [OpenCL] Support cl_ext_float_atomics

2021-08-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:24 #define cl_khr_subgroup_clustered_reduce 1 +#define cl_ext_float_atomics +#ifdef cl_khr_fp16 Should this be defined as `1`? Should this define be tested in

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6bc614546e1: [clan-format] detect function definitions more conservatively (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

  1   2   >