[PATCH] D130550: [pseudo] Start rules are `_ := start-symbol EOF`, improve recovery.

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. Previously we were calling glrRecover() ad-hoc at the end o

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : null

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

[PATCH] D130522: [clang][dataflow] Fix SAT solver crashes on `X ^ X` and `X v X`

2022-07-25 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:273 + +// Visit a sub-value of `Val` (pick any, they are identical). + } else { Let's visit `C->getLeftSubValue()` her

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : null

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if

[PATCH] D130411: [clang-format] Fix a hang when formatting C# $@ string literals

2022-07-25 Thread Owen Pan 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 rG0ffb3dd33ee1: [clang-format] Fix a hang when formatting C# $@ string literals (authored by owenpan). Changed prior to commit: https://reviews.llvm

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : null

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Sorry for the frequent ping since 15.x is going to be branched. @aaron.ballman @tahonermann I know this might not look good to you. But I want to ask if there is any objection? Personally, the preferred_name attribute is not so important and it blocks something import

[clang] 0ffb3dd - [clang-format] Fix a hang when formatting C# $@ string literals

2022-07-25 Thread via cfe-commits
Author: owenca Date: 2022-07-25T23:17:54-07:00 New Revision: 0ffb3dd33ee1a50a6ab5db80bb8caee9133e66dc URL: https://github.com/llvm/llvm-project/commit/0ffb3dd33ee1a50a6ab5db80bb8caee9133e66dc DIFF: https://github.com/llvm/llvm-project/commit/0ffb3dd33ee1a50a6ab5db80bb8caee9133e66dc.diff LOG: [

[PATCH] D130514: [CMake][Fuchsia] Enable assertions and backtraces in stage 1 build

2022-07-25 Thread Alex Brachet 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 rG0df7d8bc355d: [CMake][Fuchsia] Enable assertions and backtraces in stage 1 build (authored by abrachet). Herald added a project: clang. Herald added

[clang] 0df7d8b - [CMake][Fuchsia] Enable assertions and backtraces in stage 1 build

2022-07-25 Thread Alex Brachet via cfe-commits
Author: Alex Brachet Date: 2022-07-26T06:09:38Z New Revision: 0df7d8bc355dd506bb1a330b9f73e611f0deaf9f URL: https://github.com/llvm/llvm-project/commit/0df7d8bc355dd506bb1a330b9f73e611f0deaf9f DIFF: https://github.com/llvm/llvm-project/commit/0df7d8bc355dd506bb1a330b9f73e611f0deaf9f.diff LOG:

[clang-tools-extra] 3f3930a - Remove redundaunt virtual specifiers (NFC)

2022-07-25 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-07-25T23:00:59-07:00 New Revision: 3f3930a451e118e82885a6dd20e3918427b816c2 URL: https://github.com/llvm/llvm-project/commit/3f3930a451e118e82885a6dd20e3918427b816c2 DIFF: https://github.com/llvm/llvm-project/commit/3f3930a451e118e82885a6dd20e3918427b816c2.diff L

[clang] ae002f8 - Use isa instead of dyn_cast (NFC)

2022-07-25 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-07-25T23:00:58-07:00 New Revision: ae002f8bca11bf652fa4d2683c8a627fa77158a8 URL: https://github.com/llvm/llvm-project/commit/ae002f8bca11bf652fa4d2683c8a627fa77158a8 DIFF: https://github.com/llvm/llvm-project/commit/ae002f8bca11bf652fa4d2683c8a627fa77158a8.diff L

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic added inline comments. Comment at: clang/include/clang/Driver/Options.td:4897 def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group, Alias; +def fconvert_EQ : Joined<["-"], "fconvert=">, Group, + HelpText<"Set endian conversion of data for unfo

[clang] 620ca75 - fix comment typo to cycle bots

2022-07-25 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2022-07-26T01:55:10-04:00 New Revision: 620ca754e3f769f2be4668feccee84071d785be3 URL: https://github.com/llvm/llvm-project/commit/620ca754e3f769f2be4668feccee84071d785be3 DIFF: https://github.com/llvm/llvm-project/commit/620ca754e3f769f2be4668feccee84071d785be3.diff LO

[PATCH] D130545: [cmake] Slight fix ups to make robust to the full range of GNUInstallDirs

2022-07-25 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 447569. Ericson2314 added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, sstefan1. Herald added a project: LLVM. Add another fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : null

[PATCH] D129160: libclang.so: Make SONAME the same as LLVM version

2022-07-25 Thread Tom Stellard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbc39d7bdd497: libclang.so: Make SONAME the same as LLVM version (authored by tstellar). Changed prior to commit: https://reviews.llvm.org/D129160?vs=444843&id=447566#toc Repository: rG LLVM Github Mo

[clang] bc39d7b - libclang.so: Make SONAME the same as LLVM version

2022-07-25 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2022-07-25T22:03:34-07:00 New Revision: bc39d7bdd4977a953b2e102f8f7eb479ad78984e URL: https://github.com/llvm/llvm-project/commit/bc39d7bdd4977a953b2e102f8f7eb479ad78984e DIFF: https://github.com/llvm/llvm-project/commit/bc39d7bdd4977a953b2e102f8f7eb479ad78984e.diff

[PATCH] D129160: libclang.so: Make SONAME the same as LLVM version

2022-07-25 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. In D129160#3678441 , @h-vetinari wrote: > In D129160#3678431 , @tstellar > wrote: > >> @h-vetinari Does the release note look OK? > > Basically yes, thank you! I'd still be more precise

[PATCH] D129160: libclang.so: Make SONAME the same as LLVM version

2022-07-25 Thread H. Vetinari via Phabricator via cfe-commits
h-vetinari added a comment. In D129160#3678431 , @tstellar wrote: > @h-vetinari Does the release note look OK? Basically yes, thank you! I'd still be more precise and say "soversion" rather than "soname", but otherwise OK. Repository: rG LLVM Github

[PATCH] D129160: libclang.so: Make SONAME the same as LLVM version

2022-07-25 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. @h-vetinari Does the release note look OK? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129160/new/ https://reviews.llvm.org/D129160 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D130420: [CodeGen] Consider MangleCtx when move lazy emission States

2022-07-25 Thread Jun Zhang 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 rG58c94808450d: [CodeGen] Consider MangleCtx when move lazy emission States (authored by junaire). Repository: rG LLVM Github Monorepo CHANGES SINC

[clang] 58c9480 - [CodeGen] Consider MangleCtx when move lazy emission States

2022-07-25 Thread Jun Zhang via cfe-commits
Author: Jun Zhang Date: 2022-07-26T12:34:03+08:00 New Revision: 58c94808450d0ec73bed38d1661314c1a3d56e2f URL: https://github.com/llvm/llvm-project/commit/58c94808450d0ec73bed38d1661314c1a3d56e2f DIFF: https://github.com/llvm/llvm-project/commit/58c94808450d0ec73bed38d1661314c1a3d56e2f.diff LOG

[PATCH] D130545: [cmake] Slight fix ups to make robust to the full range of GNUInstallDirs

2022-07-25 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 created this revision. Ericson2314 added reviewers: sebastian-ne, beanz, phosek, sterni, lebedev.ri. Herald added a subscriber: mgorny. Herald added a project: All. Ericson2314 requested review of this revision. Herald added projects: clang, OpenMP. Herald added subscribers: openmp-comm

[PATCH] D129872: [clang][OpenMP] Fix runtime crash in the call to __kmp_alloc.

2022-07-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:16379 +// UnsignedPointerDiffType avoid truncate. +AllocatorHT = Context.getUnsignedPointerDiffType(); + Allocator = PerformImplicitConversion(Allocator.get(), AllocatorHT, jyu2 wro

[PATCH] D101070: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs

2022-07-25 Thread John Ericson 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 rG7f9e6f6fa654: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs (authored by Ericson2314). Repository: rG LLVM Github

[PATCH] D129824: [RISCV] Set triple based on -march flag which can be deduced in more generic way

2022-07-25 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. If you still want to pursue this, discussion belongs at https://github.com/riscv-non-isa/riscv-toolchain-conventions, not here, since it's an interface shared by Clang and GCC and the two should be consistent CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129824/

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/Scope.cpp:152-154 + // Consider the variable as NRVO candidate if the return slot is available + // for it in the current scope, or if it can be available in outer scopes. + NRVO = CanBePutInReturnSlot ? VD : nullptr;

[PATCH] D129824: [RISCV] Set triple based on -march flag which can be deduced in more generic way

2022-07-25 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. In D129824#3670586 , @reames wrote: > This was very briefly discussed at today's sync up call. We were running > short on time, so we didn't get a chance to talk through it, but there did > seem to be a consensus that discuss

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Comment at: clang/include/clang/Driver/Options.td:4897 def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group, Alias; +def fconvert_EQ : Joined<["-"], "fconvert=">, Group, + HelpText<"Set endian conversion of data for unformatt

[PATCH] D129873: [clang-offload-bundler] Library-ize ClangOffloadBundler

2022-07-25 Thread Jacob Lambert via Phabricator via cfe-commits
lamb-j updated this revision to Diff 447531. lamb-j added a comment. Removing trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129873/new/ https://reviews.llvm.org/D129873 Files: clang/include/clang/Driver/OffloadBundler.h cla

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2226 + static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const LoongArch64Triples[] = { xry111 wrote: > SixWeining wrote: > > xry111 wrote: >

[PATCH] D130531: [IR] Use Min behavior for module flag "PIC Level"

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: davide, tejohnson. Herald added subscribers: StephenFan, okura, kuter, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a reviewer: sstefan1. Herald added proje

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic added a comment. Thank you for taking a look at this and thank you for the feedback! I'm not sure if I am entirely following/I think I am confusing myself on some of the specifics. My understanding of your suggestion is that, rather than add and create a call to a fconvert-specific

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-07-25 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish added inline comments. Herald added a subscriber: mingmingl. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1249 +void addCallStack(CallStackTrie &AllocTrie, const AllocationInfo *AllocInfo) { + auto AllocType = getAllocType(AllocInfo->Info.getM

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour 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 rGaea82d455113: [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of… (authored by shafik). Herald added projects: clang, San

[clang] aea82d4 - [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-25T16:01:01-07:00 New Revision: aea82d4551139ded0290afab739f0b367d055628 URL: https://github.com/llvm/llvm-project/commit/aea82d4551139ded0290afab739f0b367d055628 DIFF: https://github.com/llvm/llvm-project/commit/aea82d4551139ded0290afab739f0b367d055628.dif

[PATCH] D130411: [clang-format] Fix a hang when formatting C# $@ string literals

2022-07-25 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/FormatTokenLexer.cpp:536 + // $"{x ?? "null"}" + // should not be split into $"{x ?? ", null, "}" but should treated as a + // single string-literal. curdeius wrote: > I left the original comments al

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp:27 + return ((int)e1 != -1) & ((int)e2 != -1) & + // CHECK: error: load of value , which is not a valid value for type 'enum EBool' + ((int)e3 != -1) & ((int)e4 == 1) &

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an E numDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 447500. shafik marked 5 inline comments as done. shafik added a comment. - Adding release note - Fixing comments - Removing top level const on local variable - Adjusting test so checks go after the line they are checking CHANGES SINCE LAST ACTION https://re

[PATCH] D130526: [Driver][PowerPC] Support -mtune=

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: PowerPC, nemanjai, jsji. Herald added subscribers: luke957, StephenFan, s.egerton, shchenz, simoncook, kbarton. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. So nobody has managed to fix all the in-tree usage. I think having this for the upcoming release/15.x will be nice... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124063/new/ https://reviews.llvm.org/D124063

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:332 + + if (LeftSubVar == RightSubVar) { +// `X <=> (A <=> A)` is equvalent to `X` which is already in gribozavr2 wrote: > xazax.hun wrote: > > xa

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:2003-2004 // consumers will not want its contents. + llvm::compression::CompressionAlgorithm CompressionScheme = + llvm::compression::ZlibCompressionAlgorithm(); + ckissane

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:332 + + if (LeftSubVar == RightSubVar) { +// `X <=> (A <=> A)` is equvalent to `X` which is already in xazax.hun wrote: > xazax.hun wrote: > > I

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123319/new/ https://reviews.llvm.org/D123319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119051/new/ https://reviews.llvm.org/D119051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Any chance this could be a generalization of https://clang.llvm.org/doxygen/Consumed_8cpp_source.html ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130055/new/ https://reviews.llvm.org/D130055 _

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:332 + + if (LeftSubVar == RightSubVar) { +// `X <=> (A <=> A)` is equvalent to `X` which is already in xazax.hun wrote: > I wonder why this simpli

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:332 + + if (LeftSubVar == RightSubVar) { +// `X <=> (A <=> A)` is equvalent to `X` which is already in I wonder why this simplification is done he

[clang] 1d23f6c - [Driver] Ignore unimplemented -mtune= for ARM/PowerPC

2022-07-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-07-25T15:05:38-07:00 New Revision: 1d23f6c5a4f6ebb101c282f8f506588fe4d9e92f URL: https://github.com/llvm/llvm-project/commit/1d23f6c5a4f6ebb101c282f8f506588fe4d9e92f DIFF: https://github.com/llvm/llvm-project/commit/1d23f6c5a4f6ebb101c282f8f506588fe4d9e92f.diff

[PATCH] D130523: [pseudo] Perform unconstrained recovery prior to completion.

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Apart from this patch, the main other things we need to allow missing brackets to be inferred: - allow recovery to trigger subsequent recovery, even at EOF. (Simplest way is to address the FIXME at 660, it's pretty involved) - allow opaque nodes to represent terminals

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread Cole Kissane via Phabricator via cfe-commits
ckissane added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:2003-2004 // consumers will not want its contents. + llvm::compression::CompressionAlgorithm CompressionScheme = + llvm::compression::ZlibCompressionAlgorithm(); + dblaikie

[PATCH] D130523: [pseudo] Perform unconstrained recovery prior to completion.

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 447487. sammccall added a comment. restore removed debug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130523/new/ https://reviews.llvm.org/D130523 Files: clang-tools-extra/pseudo/include/clang-pseudo/gram

[PATCH] D130523: [pseudo] Perform unconstrained recovery prior to completion.

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. Our GLR uses lookahead: only perform reductions that might

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr updated this revision to Diff 447484. gribozavr added a comment. Normalized more comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130519/new/ https://reviews.llvm.org/D130519 Files: clang/include/clang/Analysis/FlowSensitive/Data

[PATCH] D130522: [clang][dataflow] Fix SAT solver crashes on `X ^ X` and `X v X`

2022-07-25 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. gribozavr requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. BooleanFormula::addClause has an i

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for experimenting the refactoring. My gut feeling is that - for inheritance `llvm/lib/Support/Compression.cpp` introduces quite a bit of complexity. - BestSpeedCompression/DefaultCompression/BestSizeCompression may be kinda weird. Not all algorithms may need all

[PATCH] D119296: KCFI sanitizer

2022-07-25 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added a comment. In D119296#3673297 , @MaskRay wrote: > It seems that we can miss the branch to have more time mature the feature and > have it for 16.0. Sure, that sounds reasonable. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:2003-2004 // consumers will not want its contents. + llvm::compression::CompressionAlgorithm CompressionScheme = + llvm::compression::ZlibCompressionAlgorithm(); + Doesn't

[PATCH] D130519: [clang][dataflow] Add explicit "AST" nodes for implications and iff

2022-07-25 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. gribozavr requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously we used to desugar impl

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread Cole Kissane via Phabricator via cfe-commits
ckissane updated this revision to Diff 447469. ckissane added a comment. - format - merge fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130516/new/ https://reviews.llvm.org/D130516 Files: clang-tools-extra/clangd/index/Serialization.cpp cl

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread Cole Kissane via Phabricator via cfe-commits
ckissane created this revision. ckissane added a reviewer: dblaikie. Herald added subscribers: wenlei, usaxena95, kadircet, arphaman, hiraditya, arichardson, emaste. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: rupprecht. Herald added a reviewer: jhenderson. Herald add

[PATCH] D101070: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs

2022-07-25 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 447465. Ericson2314 added a comment. Avoid extend_path Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101070/new/ https://reviews.llvm.org/D101070 Files: llvm/cmake/modules/AddLLVM.cmake llvm/cmake/modu

[PATCH] D101070: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs

2022-07-25 Thread John Ericson 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 rG5acd376438a5: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs (authored by Ericson2314). Repository: rG LLVM Github

[PATCH] D129884: [clang][deps] Include canonical invocation in ContextHash

2022-07-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Would it make sense for this to replace the existing strict context hash implementation? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129884/new/ https://reviews.llvm.org/D129884

[PATCH] D117973: [cmake] Support custom package install paths

2022-07-25 Thread John Ericson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Ericson2314 marked 2 inline comments as done. Closed by commit rGac0d1d5c7b7e: [cmake] Support custom package install paths (authored by Ericson2314). Repository: rG

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added a comment. @ChuanqiXu , I've added additional comments. Could you check again please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119792/new/ https://reviews.llvm.org/D119792 ___ cf

[PATCH] D130511: [pseudo][wip] Eliminate simple-type-specifier ambiguities.

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. My main concern here is that this might reject valid code (and if it doesn't, it's not obvious why). It does look like C++ forbids the cases I can come up with (e.g. trying to provide a definition for `::Foo` is rejected by clang with "definition or redeclaration of

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-07-25 Thread Roman Rusyaev via Phabricator via cfe-commits
rusyaev-roman added inline comments. Comment at: clang/include/clang/Sema/Scope.h:213-215 + /// A single NRVO candidate variable in this scope, or nullptr if the + /// candidate is not available/allowed in this scope. + Optional NRVO; ChuanqiXu wrote: > Now NR

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-25 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 447453. Codesbyusman added a comment. also updating for the Xor bitwise operator Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 Files: clang/lib/Analysis/CFG.

[PATCH] D130095: [clangd] Improve XRefs support for ObjCMethodDecl

2022-07-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang-tools-extra/clangd/XRefs.cpp:89 + return MD; +auto *DeclCtx = cast(MD->getDeclContext()); +if (DeclCtx->isInvalidDecl())

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Peter Klausler via Phabricator via cfe-commits
klausler added inline comments. Comment at: flang/runtime/main.cpp:51 + if (Fortran::runtime::executionEnvironment.conversion != + Fortran::runtime::Convert::Unknown) +return; We always use braces on if/for/while/&c. constructs in the runtime. Reposit

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Peter Klausler via Phabricator via cfe-commits
klausler added a comment. Instead of adding new custom APIs that let command-line options control behavior is a way that is redundant with the runtime environment, I suggest that you try a more general runtime library API by which the main program can specify a default environment variable sett

[PATCH] D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

2022-07-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D129973#3673094 , @SimplyDanny wrote: > Thank you for the review! Before I push the change into main I may add an > entry to `clang/docs/ReleaseNotes.rst`, right? Yes, please add an entry in the release notes. > And do you a

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic added a comment. I do have a few related lingering questions as well: 1. While this implementation mimics gfortran's behavior, there are still differences with other compilers (please see the comment here: https://github.com/llvm/llvm-project/issues/55961#issuecomment-1175677659). I

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-07-25 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic created this revision. jpenix-quic added reviewers: schweitz, klausler, peixin, awarzynski. jpenix-quic added a project: Flang. Herald added subscribers: mehdi_amini, jdoerfert, mgorny. Herald added a reviewer: sscalpone. Herald added a project: All. jpenix-quic requested review of this

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D130224#3677224 , @aaron.ballman wrote: > However, what I think I'm hearing from this thread is that there are > alternative approaches that have been thought about but not tried, we're not > certain how feasible those approa

[PATCH] D130511: [pseudo][wip] Eliminate simple-type-specifier ambiguities.

2022-07-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a subscriber: alextsao1999. Herald added a project: clang-tools-extra. The solution is to favor the longest possible nest-name-specifier, and drop o

[PATCH] D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

2022-07-25 Thread Danny Mösch via Phabricator via cfe-commits
SimplyDanny added a comment. In D129973#3673094 , @SimplyDanny wrote: > Thank you for the review! Before I push the change into main I may add an > entry to `clang/docs/ReleaseNotes.rst`, right? > > And do you agree that the test failures are unrelated

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an E numDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM (aside from some small nits that you can fix when landing). Comment at: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp:27 + return ((int)e1 != -1) & ((int

[PATCH] D101070: [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs

2022-07-25 Thread Sebastian Neubauer via Phabricator via cfe-commits
sebastian-ne accepted this revision. sebastian-ne added a comment. This revision is now accepted and ready to land. No problem, thanks for the fixes! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101070/new/ https://reviews.llvm.org/D101070 _

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130224#3677144 , @arsenm wrote: > In D130224#3668243 , @aaron.ballman > wrote: > >> I'm still not seeing the issue fully. My understanding of the situation >> (which may be wro

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-25 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 447440. Codesbyusman edited the summary of this revision. Codesbyusman added a comment. updating to more efficient Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510

[PATCH] D130510: updating the function for the tautological warnings for the unary operators

2022-07-25 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman created this revision. Codesbyusman added reviewers: aaron.ballman, erichkeane, xgupta. Herald added a reviewer: NoQ. Herald added a project: All. Codesbyusman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LL

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. > I'm still not seeing the issue fully. My understanding of the situation > (which may be wrong) is that Clang lowers to LLVM IR and adds noundef > markings at call sites that this patch attempts to let the user then undo. > However, why can Clang's CodeGen not notice

[PATCH] D130374: [Passes] add a tail-call-elim pass near the end of the opt pipeline

2022-07-25 Thread Sanjay Patel 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 rGbfb9b8e075ee: [Passes] add a tail-call-elim pass near the end of the opt pipeline (authored by spatel). Herald added subscribers: cfe-commits, pmatos

[PATCH] D129872: [clang][OpenMP] Fix runtime crash in the call to __kmp_alloc.

2022-07-25 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:16379 +// UnsignedPointerDiffType avoid truncate. +AllocatorHT = Context.getUnsignedPointerDiffType(); + Allocator = PerformImplicitConversion(Allocator.get(), AllocatorHT, ABataev wro

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D130224#3668243 , @aaron.ballman wrote: > I'm still not seeing the issue fully. My understanding of the situation > (which may be wrong) is that Clang lowers to LLVM IR and adds `noundef` > markings at call sites that this pa

[PATCH] D130493: Disable stack-sizes section by default for PS4.

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5883 if (Args.hasFlag(options::OPT_fstack_size_section, - options::OPT_fno_stack_size_section, RawTriple.isPS4())) + options::OPT_fno_stack_size_section, false)

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an E numDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp:27 + return ((int)e1 != -1) & ((int)e2 != -1) & + // CHECK: error: load of value , which is not a valid value for type 'enum EBool' + ((int)e3 != -1) & ((int)e4 == 1) &

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. @erichkeane @cor3ntin If you have time for review right now, I think it's reasonably ready and I would still like to merge it this week so it can land in Clang15. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/ne

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 447425. royjacobson marked an inline comment as done. royjacobson added a comment. Rebase on main and slightly update docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130224#3668267 , @arsenm wrote: > In D130224#3668243 , @aaron.ballman > wrote: > >> In D130224#3668240 , @arsenm wrote: >> >>> In D1302

[PATCH] D130420: [CodeGen] Consider MangleCtx when move lazy emission States

2022-07-25 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. I think this seems reasonable. I suspect we'll need to do more plumbing here if we need to support snapshotting / resetting to a snapshot, but this probably isn't the only place, and the

[PATCH] D130423: [clang][dataflow] Rename iterators from IT to It

2022-07-25 Thread Dmitri Gribenko 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 rGc0c9d717dfd2: [clang][dataflow] Rename iterators from IT to It (authored by gribozavr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

  1   2   3   >