[clang] bed9933 - [Driver][test] Fix gcc-toolchain.cpp on non-x86_64

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T23:50:22-07:00 New Revision: bed9933a461e7b3d0c8c5a8fa770aa1b49802660 URL: https://github.com/llvm/llvm-project/commit/bed9933a461e7b3d0c8c5a8fa770aa1b49802660 DIFF: https://github.com/llvm/llvm-project/commit/bed9933a461e7b3d0c8c5a8fa770aa1b49802660.diff

[clang] b98ad2a - Title: Remove a redundant parameter in clang/unittests/AST/CMakeLists.txt Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D98922

2021-03-19 Thread via cfe-commits
Author: joker881 Date: 2021-03-20T14:39:05+08:00 New Revision: b98ad2ac0845835b1d58faf6881b688e3e186b84 URL: https://github.com/llvm/llvm-project/commit/b98ad2ac0845835b1d58faf6881b688e3e186b84 DIFF: https://github.com/llvm/llvm-project/commit/b98ad2ac0845835b1d58faf6881b688e3e186b84.diff LOG:

[clang] bdf39e6 - [Driver] Drop obsoleted Ubuntu 11.04 gcc detection

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T23:23:28-07:00 New Revision: bdf39e6b0ed4b41a1842ac0193f30a726f8d9f63 URL: https://github.com/llvm/llvm-project/commit/bdf39e6b0ed4b41a1842ac0193f30a726f8d9f63 DIFF: https://github.com/llvm/llvm-project/commit/bdf39e6b0ed4b41a1842ac0193f30a726f8d9f63.diff

[PATCH] D98948: [analyzer][solver] Fix infeasible constraints (PR49642)

2021-03-19 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/PR49642.c:1 +// RUN: %clang --analyze -Xclang -analyzer-checker=core %s + NoQ wrote: > Why not the usual `%clang_analyze_cc1`? Your approach only adds driver > testing which doesn't seem to test a

[clang] a6a15dd - [Driver] Delete toplevel i386-gnu/gcc detection in favor of i386-gnu alias triple detection

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T22:50:36-07:00 New Revision: a6a15dde5a870f0ce6be0ea26d36cec60e846a2d URL: https://github.com/llvm/llvm-project/commit/a6a15dde5a870f0ce6be0ea26d36cec60e846a2d DIFF: https://github.com/llvm/llvm-project/commit/a6a15dde5a870f0ce6be0ea26d36cec60e846a2d.diff

[clang] 1f4959b - [Driver] Drop unneeded $triple/gcc/$triple detection

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T22:45:50-07:00 New Revision: 1f4959b27607d4748c83820ffcf8bf24f09fdd47 URL: https://github.com/llvm/llvm-project/commit/1f4959b27607d4748c83820ffcf8bf24f09fdd47 DIFF: https://github.com/llvm/llvm-project/commit/1f4959b27607d4748c83820ffcf8bf24f09fdd47.diff

[PATCH] D99009: [RISCV] [1/2] Add intrinsic for Zbr extension

2021-03-19 Thread LevyHsu via Phabricator via cfe-commits
LevyHsu created this revision. LevyHsu added reviewers: craig.topper, kito-cheng, evandro, khchen. LevyHsu added projects: clang, LLVM. Herald added subscribers: vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D99008: [RISCV] Add intrinsic for Zbr extension

2021-03-19 Thread LevyHsu via Phabricator via cfe-commits
LevyHsu updated this revision to Diff 332076. Herald added subscribers: usaxena95, kadircet, arphaman, mgorny. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99008/new/ https://reviews.llvm.org/D99008 Files:

[PATCH] D99008: [RISCV] Add intrinsic for Zbr extension

2021-03-19 Thread LevyHsu via Phabricator via cfe-commits
LevyHsu created this revision. LevyHsu added reviewers: craig.topper, evandro, kito-cheng, khchen. LevyHsu added projects: clang, LLVM. Herald added subscribers: vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D98783#2633261 , @tra wrote: > In D98783#2632244 , @yaxunl wrote: > >> In D98783#2632143 , @tra wrote: >> >>> Shouldn't the unused ASCs be eliminat

[PATCH] D97916: [Driver][RISCV] Support parsing multi-lib config from GCC.

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1754 + + int RC = llvm::sys::ExecuteAndWait(GCCPath, GCCArgs, None, Redirects); + Even if ExecuteAndWait is accepted, you may consider a pipe. The current implementation leaves tempo

[PATCH] D97916: [Driver][RISCV] Support parsing multi-lib config from GCC.

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. In D97916#2625170 , @luismarques wrote: > This patch seems to be in pretty good shape now. > > One thing that might be useful (important?) t

[clang] 28d58d8 - [Driver] Stop searching other prefixes once a GCC installation is found in one prefix

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T20:35:59-07:00 New Revision: 28d58d8fe2094af6902dee7b4d68ec30a3e9d737 URL: https://github.com/llvm/llvm-project/commit/28d58d8fe2094af6902dee7b4d68ec30a3e9d737 DIFF: https://github.com/llvm/llvm-project/commit/28d58d8fe2094af6902dee7b4d68ec30a3e9d737.diff

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: jansvoboda11, dexonsmith, lxfind, dang. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. WIP, not yet ready for review. Small sample of things wrong with this patch: - Have

[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

2021-03-19 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In D96403#2639180 , @srhines wrote: > In D96403#2639137 , @smeenai wrote: > >> In D96403#2638932 , @rprichard >> wrote: >> >>> In D96403#2638883

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + hoy wrote: > dblaikie wrote: > > hoy wrote: > > > dblaikie wrote: > > > > hoy wrote: > > > > > dblaik

[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

2021-03-19 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In D96403#2639137 , @smeenai wrote: > In D96403#2638932 , @rprichard wrote: > >> In D96403#2638883 , @smeenai wrote: >> >>> With NDK r22, I only see

[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

2021-03-19 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D96403#2638932 , @rprichard wrote: > In D96403#2638883 , @smeenai wrote: > >> With NDK r22, I only see libunwind.a for armv7. Will it be provided for >> other architectures in future NDK

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->is

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-19 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn added a comment. This is something I have been doing for over 20 years now. Not sure when I initially picked it up but I find a space before the ;'s in a C for loop improves readability. It more clearly differentiates the different parts. I beleive the space before the colon in C++ range

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + dblaikie wrote: > hoy wrote: > > dblaikie wrote: > > > hoy wrote: > > > > dblaikie wrote: > > > > > hoy wr

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked 3 inline comments as done. Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->isRVal

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + hoy wrote: > dblaikie wrote: > > hoy wrote: > > > dblaikie wrote: > > > > hoy wrote: > > > > > dblaik

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + dblaikie wrote: > hoy wrote: > > dblaikie wrote: > > > hoy wrote: > > > > dblaikie wrote: > > > > > Does t

[clang] f9cac39 - [Driver] Delete compatibility aliases -mpie-copy-relocations and -mno-pie-copy-relocations

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T17:47:30-07:00 New Revision: f9cac39930c8ae13892f8daa8662e4ec65439f22 URL: https://github.com/llvm/llvm-project/commit/f9cac39930c8ae13892f8daa8662e4ec65439f22 DIFF: https://github.com/llvm/llvm-project/commit/f9cac39930c8ae13892f8daa8662e4ec65439f22.diff

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3102 +// C++20 [class.copy.elision]p3: +// ...either a non-volatile object or an rvalue reference to a non-volatile object type... +if (!(CESK & CES_AllowRValueReferenceType)) ---

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1006-1007 MarshallingInfoString>; +def module_dir : Separate<["-"], "module-dir">, + Flags<[FlangOption,FC1Option]>, HelpText<"Add to the list of directories to be searched by an USE statement">

[PATCH] D95007: [CUDA][HIP] Add -fuse-cuid

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Should `-cuid=` be `--cuid=`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95007/new/ https://reviews.llvm.org/D95007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

2021-03-19 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. In D96403#2638883 , @smeenai wrote: > With NDK r22, I only see libunwind.a for armv7. Will it be provided for other > architectures in future NDK versions? NDK r23 should have a libunwind.a for all architectures. This change is

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + hoy wrote: > dblaikie wrote: > > hoy wrote: > > > dblaikie wrote: > > > > Does this need to be down h

[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

2021-03-19 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added subscribers: lanza, smeenai. smeenai added a comment. With NDK r22, I only see libunwind.a for armv7. Will it be provided for other architectures in future NDK versions? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96403/new/ https:

[PATCH] D97411: [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete.

2021-03-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D97411#2638609 , @akhuang wrote: > In D97411#2611142 , @probinson wrote: > >> In D97411#2598625 , @akhuang wrote: >> >>> I started looking into s

[PATCH] D97785: [SystemZ][z/OS] Distinguish between text and binary files on z/OS

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The recommended named parameter form is probably `/*Param=*/something`. It is liked by both https://clang.llvm.org/extra/clang-tidy/checks/bugprone-argument-comment.html and clang-format. Another form look to me as well, if both the two tools like it. Repository: rG

[PATCH] D97902: [docs] Improve documentation of -B and --gcc-toolchain

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94a793f09665: [docs] Improve documentation of -B and --gcc-toolchain (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97902/new/ https:/

[clang] 94a793f - [docs] Improve documentation of -B and --gcc-toolchain

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T15:42:37-07:00 New Revision: 94a793f096653fa3536f39c6c1b9e3281907619f URL: https://github.com/llvm/llvm-project/commit/94a793f096653fa3536f39c6c1b9e3281907619f DIFF: https://github.com/llvm/llvm-project/commit/94a793f096653fa3536f39c6c1b9e3281907619f.diff

[PATCH] D97993: [Driver] Suppress GCC detection under -B

2021-03-19 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c2da8641087: [Driver] Suppress GCC detection under -B (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97993/new/ https://reviews.llvm.

[clang] 4c2da86 - [Driver] Suppress GCC detection under -B

2021-03-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-19T15:42:18-07:00 New Revision: 4c2da8641087f7b734337a6e6306329cd2535d60 URL: https://github.com/llvm/llvm-project/commit/4c2da8641087f7b734337a6e6306329cd2535d60 DIFF: https://github.com/llvm/llvm-project/commit/4c2da8641087f7b734337a6e6306329cd2535d60.diff

[PATCH] D98948: [analyzer][solver] Fix infeasible constraints (PR49642)

2021-03-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Aha ok, seems reasonable, thx! Comment at: clang/test/Analysis/PR49642.c:1 +// RUN: %clang --analyze -Xclang -analyzer-checker=core %s + Why not the usual `%clang_analyze_cc1`? Your approach only adds driver test

[PATCH] D94355: [Passes] Add relative lookup table converter pass

2021-03-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. Thank you! Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:390-391 + +if (!TM.getTargetTriple().isArch64Bit()) + return false; + gulfem wrote: > lebedev.ri wrote: > > gulfem wrote: > >

[PATCH] D94355: [Passes] Add relative lookup table converter pass

2021-03-19 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added inline comments. Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:390-391 + +if (!TM.getTargetTriple().isArch64Bit()) + return false; + lebedev.ri wrote: > gulfem wrote: > > lebedev.ri wrote: > > > 1. But all tests are using `x86_64` tri

[PATCH] D97411: [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete.

2021-03-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D97411#2611142 , @probinson wrote: > In D97411#2598625 , @akhuang wrote: > >> I started looking into some diffs of debug info in libc++ tests, but it's >> pretty hard to tell what's diff

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-19 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. Invalid IR generation should be addressed by 19d2c65ddd757997785163709800f837857f686d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98816/new/ https://

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->isRVal

[PATCH] D97371: [clang][parser] Remove questionable ProhibitAttributes() call in objc parsing

2021-03-19 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks for seeing this through CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97371/new/ https://reviews.llvm.org/D97371 ___ cfe-

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked 2 inline comments as done. Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference

[PATCH] D98980: [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yes, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98980/new/ https://reviews.llvm.org/D98980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:298 + driverPath.append("/../include/flang/"); + return driverPath.str().str(); +} awarzynski wrote: > Given this [[ > https://github.com/llvm/llvm-project/blob/987ee6e3cc1f

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 331984. arnamoy10 added a comment. Addressing reviewers' comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp fl

[PATCH] D98980: [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread Benjamin Kramer 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 rG19d2c65ddd75: [CodeGen] Don't crash on for loops with cond variables and no increment (authored by bkramer). Repository: rG LLVM Github Monorepo

[clang] 19d2c65 - [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2021-03-19T20:43:52+01:00 New Revision: 19d2c65ddd757997785163709800f837857f686d URL: https://github.com/llvm/llvm-project/commit/19d2c65ddd757997785163709800f837857f686d DIFF: https://github.com/llvm/llvm-project/commit/19d2c65ddd757997785163709800f837857f686d.dif

[PATCH] D98980: [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. Landing this as it's a pretty bad crasher. Feel free to point out all my mistakes in post-commit review :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98980/new/ https://reviews.llvm.org/D98980 _

[PATCH] D98980: [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht accepted this revision. rupprecht added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98980/new/ https://reviews.llvm.org/D98980

[PATCH] D98980: [CodeGen] Don't crash on for loops with cond variables and no increment

2021-03-19 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer created this revision. bkramer added reviewers: rupprecht, rjmccall, rsmith. bkramer requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This looks like an oversight from a875721d8a2d

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->isRVal

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Driver/std2018.f90:1 +! REQUIRES: new-flang-driver +! Ensure argument -std=f2018 works as expected. arnamoy10 wrote: > awarzynski wrote: > > Would it be possible to share this test with `f18`? > Would you p

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->isRVal

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 331973. Quuxplusone added a comment. Per @mizvekov, use `VDType` instead of `VD->getType()` wherever possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98971/new/ https://reviews.llvm.org/D98971 Files

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/test/Driver/std2018.f90:1 +! REQUIRES: new-flang-driver +! Ensure argument -std=f2018 works as expected. awarzynski wrote: > Would it be possible to share this test with `f18`? Would you please elaborate on how d

[PATCH] D94355: [Passes] Add relative lookup table converter pass

2021-03-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:390-391 + +if (!TM.getTargetTriple().isArch64Bit()) + return false; + gulfem wrote: > lebedev.ri wrote: > > 1. But all tests are using `x86_64` triple? > > 2. This is

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. I tried creating an IR repro, but: running `-S -emit-llvm` with the old PM crashes before it can generate anything, and running with the new PM seems to generate invalid IR (branches to %for.inc, which does not exist). I suspect this is not an optimizer bug, but crash

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3095 - // ...non-volatile... - if (VD->getType().isVolatileQualified()) -return false; - - // C++20 [class.copy.elision]p3: - // ...rvalue reference to a non-volatile... - if (VD->getType()->isRVal

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. The error message I posted earlier was when using O1 + new PM, but it crashes with the old one & no optimizations: $ cat /tmp/repro.cc void a() { for (; int b = 0;) continue; } $ clang -c /tmp/repro.cc -o /tmp/r

[PATCH] D98935: [WoA][MSVC] Use default linker setting in MSVC-compatible driver [take 2]

2021-03-19 Thread Maxim Kuvyrkov via Phabricator via cfe-commits
maxim-kuvyrkov added a subscriber: tstellar. maxim-kuvyrkov added a comment. @tstellar Hi Tom, This has passed buildbots, so I'll cherry-pick this to release/12.x to fix https://bugs.llvm.org/show_bug.cgi?id=49624 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-19 Thread Nikita Kniazev via Phabricator via cfe-commits
nick updated this revision to Diff 331955. nick added a comment. Forgot to remove a duplicated test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatchers.h

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-19 Thread Nikita Kniazev via Phabricator via cfe-commits
nick updated this revision to Diff 331945. nick retitled this revision from "[clang][AST] Add `CXXBaseSpecifier` matcher support" to "[ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)". nick edited the summary of this revision. nick added a reviewer: aaron.ballman. nick added a comment.

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-19 Thread Felix Berger via Phabricator via cfe-commits
flx marked 6 inline comments as done. flx added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:52 AST_MATCHER_P(NamedDecl, matchesAnyListedName, std::vector, NameList) { hokein wrote: > worth some comments on this. Do

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. To whom it may concern, see D98971 . I'm (unwisely?) trying a surgical fix rather than trying to revert the month-old thing. (Let's please discuss anything D98971 -specific over there.) Repository:

[PATCH] D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added reviewers: rsmith, nullptr.cpp, aaronpuchert, mizvekov, erik.pilkington, sberg, davidstone, david_stone. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. Review D88220

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-19 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 331941. flx added a comment. Applied changes suggested by ymandel, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98738/new/ https://reviews.llvm.org/D98738 Files: clang-tools-extra/clang-tidy/utils/Match

[PATCH] D98923: [Driver] Pass -fexperimental-strict-floating-point to cc1 if it is specified

2021-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Isn't OPT_fexperimental_strict_floating_point marked as a CC1Option in Options.td. Can the driver even recognize it? Can you use -Xclang -fexperimental-strict-floating-point for your use case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + dblaikie wrote: > hoy wrote: > > dblaikie wrote: > > > Does this need to be down here? Or would the code b

[PATCH] D98923: [Driver] Pass -fexperimental-strict-floating-point to cc1 if it is specified

2021-03-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Test case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98923/new/ https://reviews.llvm.org/D98923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution

2021-03-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D98278#2637866 , @zero9178 wrote: > In D98278#2637826 , @mstorsjo wrote: > >> Btw, while this change does explain _what_ it does, it doesn't actually say >> the exact reason _why_. Clea

[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution

2021-03-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D98278#2637866 , @zero9178 wrote: > In D98278#2637826 , @mstorsjo wrote: > >> Btw, while this change does explain _what_ it does, it doesn't actually say >> the exact reason _why_. Clea

[PATCH] D98948: [analyzer][solver] Fix infeasible constraints (PR49642)

2021-03-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Aa, get it. Looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98948/new/ https://reviews.llvm.org/D98948 __

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-03-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + hoy wrote: > dblaikie wrote: > > Does this need to be down here? Or would the code be a well exercise

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D98902#2636308 , @jdoerfert wrote: > @tra, so you think we should not do this? The user will see a link error late > I assume, might be better. If I compile a `__device__ float foo(float f) { return sin(f); }` and it does compile

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:298 + driverPath.append("/../include/flang/"); + return driverPath.str().str(); +} Given this [[ https://github.com/llvm/llvm-project/blob/987ee6e3cc1fb672b3ed201e72a5281c2

[PATCH] D97680: [OpenMP] Simplify GPU memory globalization

2021-03-19 Thread Jose Manuel Monsalve Diaz via Phabricator via cfe-commits
josemonsalve2 added inline comments. Comment at: clang/test/OpenMP/nvptx_parallel_codegen.cpp:4 -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-ho

[PATCH] D98867: [HIP] Fix ROCm detection

2021-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:267-268 +// rocm-{major}.{minor}.{subMinor}[-{build}] +auto Loc = StringRef(VerStr).rfind('_'); +if (Loc != StringRef::npos) + VerStr[Loc] = '.'; You don't need `String

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. enum { A, B, C, } ShortEnum1, ShortEnum2; I've seen this before maybe with regard to something else, but can't quite recall. (maybe a bug in the bug tracker) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution

2021-03-19 Thread Markus Böck via Phabricator via cfe-commits
zero9178 added a comment. In D98278#2637826 , @mstorsjo wrote: > Btw, while this change does explain _what_ it does, it doesn't actually say > the exact reason _why_. Cleanliness? Sure, that's nice... Or is it a case > where e.g. some translations produc

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2132 +**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessModifierStyle``) + Defines in which cases to put empty line after access modifiers. + Comme

[PATCH] D98816: PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable.

2021-03-19 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. We're seeing a crash in the optimizer after this patch, with the following logged in assert builds: `assert.h assertion failed at llvm/include/llvm/Support/Casting.h:104 in static bool llvm::isa_impl_cl::doit(const From *) [To = llvm::InvokeInst, From = const llvm::I

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. could you please mark your comments done when they are done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 ___ cfe-commits maili

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/unittests/Format/FormatTest.cpp:9392 + "};\n"; + EXPECT_EQ(NL_B_3_A_1_I_3, format(NL_B_3_

[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution

2021-03-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Btw, while this change does explain _what_ it does, it doesn't actually say the exact reason _why_. Cleanliness? Sure, that's nice... Or is it a case where e.g. some translations produce different error messages? Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:9212 + StyleWithLine.EmptyLinesAfterAccessModifier = 1u; + EXPECT_EQ(test2NL, format(test0NL, StyleWithLine)); + EXPECT_EQ(test2NL, format(test1NL, StyleWithLine)); Max_S w

[PATCH] D98868: [Driver] Add -print-runtime-dir

2021-03-19 Thread Markus Böck 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 rGaafc3f7be804: [Driver] Add -print-runtime-dir (authored by zero9178). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[clang] aafc3f7 - [Driver] Add -print-runtime-dir

2021-03-19 Thread Markus Böck via cfe-commits
Author: Markus Böck Date: 2021-03-19T17:48:03+01:00 New Revision: aafc3f7be804d117a632365489a18c3e484a3931 URL: https://github.com/llvm/llvm-project/commit/aafc3f7be804d117a632365489a18c3e484a3931 DIFF: https://github.com/llvm/llvm-project/commit/aafc3f7be804d117a632365489a18c3e484a3931.diff L

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Driver/std2018.f90:1 +! REQUIRES: new-flang-driver +! Ensure argument -std=f2018 works as expected. Would it be possible to share this test with `f18`? Comment at: flang/test/Driver/std20

[PATCH] D98951: [clang][ASTImporter] Add import API for 'const Type *' (NFC).

2021-03-19 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. Can we add a test for the `getCapturedVLAType` case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98951/new/ https://reviews.llvm.org/D98951 ___ cf

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-19 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5052-5055 + if (isa(JA)) { +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back("-treat-scalable-fixed-error-as-warning"); + } Are there any concerns related to LTO here

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-19 Thread Christopher Tetreault via Phabricator via cfe-commits
ctetreau accepted this revision. ctetreau added a comment. This revision is now accepted and ready to land. lgtm Comment at: llvm/lib/CodeGen/ValueTypes.cpp:17 +unsigned EVT::getVectorNumElements() const { + auto Error = []() { Out of curiosity, what is the

[PATCH] D98868: [Driver] Add -print-runtime-dir

2021-03-19 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. lgtm I'm somewhat surprised this doesn't exist already, but I looked at the -print-* options and don't see anything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D98959: [OpenCL] Add as_size/ptrdiff/intptr/uintptr_t operators

2021-03-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. svenvh added a project: clang. Herald added subscribers: ldrumm, yaxunl. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. size_t and friends are built-in scalar data types and s6.4.4.2 of the OpenCL

[PATCH] D98951: [clang][ASTImporter] Add import API for 'const Type *' (NFC).

2021-03-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. Herald added a subscriber: whisperity. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98951/new/ https://reviews.llvm.org/D98

[PATCH] D98892: [HWASan] Mention x86_64 aliasing mode in design doc.

2021-03-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 331895. morehouse marked an inline comment as done. morehouse added a comment. - Expand on lack of 32 bit support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98892/new/ https://reviews.llvm.org/D98892 Fil

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Confirmed: yikes. @nullptr.cpp, I'm going to open a new pull request to revert this, to poke the buildbot, just in case reverting it causes new failures. But I certainly don't object if someone wants to be more bold than me in reverting quickly. Here's a reduced tes

  1   2   >