[PATCH] D130701: [clang-tidy] Rename a local cmake variables to match the new tool name. NFC.

2022-08-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry Martin, I took some time off work and missed this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130701/new/ https://reviews.llvm.or

[PATCH] D131763: [OpenMP] Add lit test for metadirective device arch inspired from sollve

2022-08-16 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In D131763#3719323 , @jdoerfert wrote: > In D131763#3719140 , @saiislam > wrote: > >> In D131763#3719132 , @jdoerfert >> wrote: >> >>> This doe

[PATCH] D131385: [clangd] Support for standard type hierarchy

2022-08-16 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/Protocol.cpp:1228 +Result["parents"] = RP.parents; + return std::move(Result); +} Nit: Allow RVO. Comment at: clang-tools-extra/clangd/Protocol.h:1415 + /// The range t

[clang-tools-extra] 0b90e13 - [pseudo] Style tweaks forgotten in D130337. NFC

2022-08-16 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-08-16T10:26:25+02:00 New Revision: 0b90e136eee928071656948b7fe1edc5ff36fcdf URL: https://github.com/llvm/llvm-project/commit/0b90e136eee928071656948b7fe1edc5ff36fcdf DIFF: https://github.com/llvm/llvm-project/commit/0b90e136eee928071656948b7fe1edc5ff36fcdf.diff LO

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added a comment. looks good to me on a high-level, but I don't know clang well enough to confidently approve this change Comment at: clang/lib/Sema/SemaCoroutine.cpp:1107 + + // Corotuines will get splitted into pieces. The GNU address of label + // extension w

[PATCH] D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math.

2022-08-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. @john.brawn Are you OK with treating those functions as not setting inexact, as per the C23 clarification, as the committed version does? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129231/new/ https://reviews.llvm.org/D12

[PATCH] D131762: [pseudo][wip] Enforce the C++ rule for the optional init-declarator-list.

2022-08-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. > Basically it implements the https://eel.is/c++draft/dcl.pre#5 rule. Just to make sure we're on the same page, my understanding of that rule is roughly "declarations must declare something", and it has two parts: - the declarators can only be omitted if a named class

[PATCH] D131938: [C++20] [Coroutines] Disable to take the address of labels in coroutines

2022-08-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 452925. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131938/new/ https://reviews.llvm.org/D131938 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticSemaKinds.td clang/includ

[PATCH] D131385: [clangd] Support for standard type hierarchy

2022-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Protocol.cpp:1228 +Result["parents"] = RP.parents; + return std::move(Result); +} usaxena95 wrote: > Nit: Allow RVO. there's an issue with one of

[PATCH] D131385: [clangd] Support for standard type hierarchy

2022-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 452927. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131385/new/ https://reviews.llvm.org/D131385 Files: clang-tools-

[PATCH] D121365: [CFG] Fix crash on CFG building when deriving from a template.

2022-08-16 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. Thanks ! In D121365#3720171 , @NoQ wrote: > Hi, interesting, the code looks great but at a glance I don't see why would > you even want a CFG for an uninstantiated template. Every time you want to > analyze the actual runtime b

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-16 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun updated this revision to Diff 452936. vladimir.plyashkun added a comment. - return operand source range in too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131678/new/ https://reviews.llvm.org/D131678 Files: clang-tools-extra

[PATCH] D127293: [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

2022-08-16 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Hi, @LegalizeAdulthood, are you okay with the way this has progressed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127293/new/ https://reviews.llvm.org/D127293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 672311b - [CFG] Fix crash on CFG building when deriving from a template.

2022-08-16 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2022-08-16T13:01:13+02:00 New Revision: 672311bd77c594888e2660c124d7eae01822fffa URL: https://github.com/llvm/llvm-project/commit/672311bd77c594888e2660c124d7eae01822fffa DIFF: https://github.com/llvm/llvm-project/commit/672311bd77c594888e2660c124d7eae01822fffa.dif

[PATCH] D121365: [CFG] Fix crash on CFG building when deriving from a template.

2022-08-16 Thread Clement Courbet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG672311bd77c5: [CFG] Fix crash on CFG building when deriving from a template. (authored by courbet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121365/new/

[PATCH] D131385: [clangd] Support for standard type hierarchy

2022-08-16 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 accepted this revision. usaxena95 added a comment. This revision is now accepted and ready to land. LG. Thanks! Comment at: clang-tools-extra/clangd/Protocol.cpp:1228 +Result["parents"] = RP.parents; + return std::move(Result); +} kadircet wrote:

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452957. wyt marked 9 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614 Files: clang/include/clang/Analysis

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452958. wyt added a comment. Herald added a subscriber: mgorny. Move implementation to CFGMatchSwitch.h, add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files:

[PATCH] D131892: [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a subscriber: tstellar. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/docs/ReleaseNotes.rst:74 number of arguments cause an assertion fault. +- Fix `#57151

[PATCH] D130709: MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization

2022-08-16 Thread Fred Tingaud via Phabricator via cfe-commits
frederic-tingaud-sonarsource added a comment. @rnk , does this change answer your points? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130709/new/ https://reviews.llvm.org/D130709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] 8f555a5 - [cmake] Fix tablegen exports

2022-08-16 Thread Sylvestre Ledru via cfe-commits
Author: Nikita Popov Date: 2022-08-16T14:17:23+02:00 New Revision: 8f555a52e033ceec4c4508eb800c9a186acec87f URL: https://github.com/llvm/llvm-project/commit/8f555a52e033ceec4c4508eb800c9a186acec87f DIFF: https://github.com/llvm/llvm-project/commit/8f555a52e033ceec4c4508eb800c9a186acec87f.diff

[PATCH] D131565: [cmake] Fix tablegen exports

2022-08-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f555a52e033: [cmake] Fix tablegen exports (authored by nikic, committed by sylvestre.ledru). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452964. wyt added a comment. Add FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h clang/inc

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452965. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/include/clang/Analysis/FlowSensitive/CFGMa

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt added a reviewer: xazax.hun. wyt added inline comments. Herald added a subscriber: rnkovacs. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:103 + virtual void transferCFGElement(const CFGElement *Element, Lattice &L, +

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452966. wyt added a comment. Fix incorrect change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/include/clang/Analysis/FlowSensitive/CFGMatchSwitch.h

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-16 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added a comment. FWIW, just some things noticed when I examined some of the new warning that popped up after this patch: https://github.com/llvm/llvm-project/issues/53253 mentioned that for example gcc complained about this. Although, as shown here https://godbolt.org/z/bq34Kexac there a

[PATCH] D131891: [clang][dataflow] Debug string for value kinds.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452968. wyt added a comment. Use llvm::StringRef for returning static strings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131891/new/ https://reviews.llvm.org/D131891 Files: clang/include/clang/Analysis/FlowS

[clang] ccbc22c - [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-16 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-16T20:44:38+08:00 New Revision: ccbc22cd8976c285d76e9f66dd5cac2fe908d084 URL: https://github.com/llvm/llvm-project/commit/ccbc22cd8976c285d76e9f66dd5cac2fe908d084 DIFF: https://github.com/llvm/llvm-project/commit/ccbc22cd8976c285d76e9f66dd5cac2fe908d084.diff

[PATCH] D131892: [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-16 Thread YingChi Long via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGccbc22cd8976: [Sema] fix false -Wcomma being emitted from void returning functions (authored by inclyc). Changed prior to commit: https://reviews.llvm.org/D131892?vs=452767&id=452970#toc Repository:

[PATCH] D131274: [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"

2022-08-16 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG65d83ba34378: [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" (authored by ldionne). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[clang] 65d83ba - [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"

2022-08-16 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2022-08-16T09:27:18-04:00 New Revision: 65d83ba34378b8e740c5203fe46a9c50d2aeb862 URL: https://github.com/llvm/llvm-project/commit/65d83ba34378b8e740c5203fe46a9c50d2aeb862 DIFF: https://github.com/llvm/llvm-project/commit/65d83ba34378b8e740c5203fe46a9c50d2aeb862.diff

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This looks correct per my reading of [basic.start.dynamic], but is this an ABI breaking change that we may want to use ABI versioning for in case someone is relying on the old order for some reason? Also, the change should have a release note for the fix. Reposi

[PATCH] D130586: [cmake] Use `CMAKE_INSTALL_LIBDIR` too

2022-08-16 Thread Sebastian Neubauer via Phabricator via cfe-commits
sebastian-ne accepted this revision. sebastian-ne added a comment. Looks good to me, thanks! Comment at: utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h:70 /* Multilib suffix for libdir. */ +#define CLANG_INSTALL_LIBDIR_BASENAME "lib" T

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13547-13551 + if (auto ValD = Info.EvaluatingDecl.dyn_cast()) { +const VarDecl *VD = dyn_cast_or_null(ValD); +if (VD && !VD->isConstexpr()) + NotConstexprVar = true; +

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

2022-08-16 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 452987. Codesbyusman added a comment. updated also the test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 Files: clang/docs/ReleaseNotes.rst clang/l

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

2022-08-16 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 452988. Codesbyusman added a comment. updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 Files: clang/docs/ReleaseNotes.rst clang/lib/Analysis/CFG.cpp

[PATCH] D129016: [PowerPC] implemented @llvm.ppc.kill.canary to corrupt stack guard

2022-08-16 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro updated this revision to Diff 452990. pscoro added a comment. reverted previous fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129016/new/ https://reviews.llvm.org/D129016 Files: clang/include/clang/Basic/BuiltinsPPC.def clang/lib/Ba

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHE

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-16 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 2 inline comments as done. zahiraam added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3140 + return CGF.Builder.CreateFPExt(result, ConvertType(E->getType())); + } + return result; rjmccall wrote: > Please extract this b

[PATCH] D130709: MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization

2022-08-16 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. Yes, looks good to me, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130709/new/ https://reviews.llvm.org/D130709 ___ cfe-commits mailin

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

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is looking much closer to what I think we had in mind, so I mostly have some cleanup suggestions. Comment at: clang/lib/Analysis/CFG.cpp:979 -const BinaryOperator *BitOp = dyn_cast(BoolExpr); +const BinaryOperator *BitOp = dyn_cas

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 ___ cfe-commits mailing list cfe-comm

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @dcoughlin @kubamracek @compnerd any comments before I commit this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131714/new/ https://reviews.llvm.org/D131714 ___ cfe-com

[clang] ba1c396 - MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization

2022-08-16 Thread Balazs Benics via cfe-commits
Author: Fred Tingaud Date: 2022-08-16T17:09:55+02:00 New Revision: ba1c396e09a6dc56d817df0d378f3c826bbacaaa URL: https://github.com/llvm/llvm-project/commit/ba1c396e09a6dc56d817df0d378f3c826bbacaaa DIFF: https://github.com/llvm/llvm-project/commit/ba1c396e09a6dc56d817df0d378f3c826bbacaaa.diff

[PATCH] D130709: MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization

2022-08-16 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba1c396e09a6: MSVC compatibility mode: fix error on unqualified templated base class… (authored by frederic-tingaud-sonarsource, committed by steakhal). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D131685: [clang][AST] RecursiveASTVisitor should visit owned TagDecl of friend type.

2022-08-16 Thread David Rector via Phabricator via cfe-commits
davrec added a comment. Once the FIXME is removed this looks good, but I was involved in this so better if @sammccall can give the thumbs up at least to the RecursiveASTVisitor code. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:1577-1578 DEF_TRAVERSE_DECL(FriendT

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:144 llvm::Optional>>> -runDataflowAnalysis( +runDataflowAnalysisOnCFG( const C

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHECK-MESSAGES

[clang] 9181ce6 - [Windows] Put init_seg(compiler/lib) in llvm.global_ctors

2022-08-16 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-08-16T08:16:18-07:00 New Revision: 9181ce623fd8189252659da7c48de1982597b79c URL: https://github.com/llvm/llvm-project/commit/9181ce623fd8189252659da7c48de1982597b79c DIFF: https://github.com/llvm/llvm-project/commit/9181ce623fd8189252659da7c48de1982597b79c.diff

[PATCH] D131910: [Windows] Put init_seg(compiler/lib) in llvm.global_ctors

2022-08-16 Thread Arthur Eubanks 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 rG9181ce623fd8: [Windows] Put init_seg(compiler/lib) in llvm.global_ctors (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 453021. jhuber6 added a comment. Adjusting, adding code generation options for the other constants and changing to use linkonce ODR linkage. I attempted to follow Jon's suggestion and group it with the existing code. but all the existing handling for this o

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx updated this revision to Diff 453022. chrish_ericsson_atx added a comment. Added missing newline and added // FIXME comments, per reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131926/new/ https://reviews.llvm.org/D131926 Files: clang-tools-extra

[PATCH] D131685: [clang][AST] RecursiveASTVisitor should visit owned TagDecl of friend type.

2022-08-16 Thread David Rector via Phabricator via cfe-commits
davrec added a comment. In D131685#3716354 , @balazske wrote: > I really do not know why parent of the node for the owned `TagDecl` node is > the `FriendDecl` and not a `TypeLoc` node, but it is working. > The code `struct A { friend struct Fr; };` cause

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHE

[PATCH] D131939: [clang-tidy] Add performance-expensive-flat-container-operation check

2022-08-16 Thread Nicolas van Kempen via Phabricator via cfe-commits
nicovank created this revision. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. nicovank edited the summary of this revision. nicovank edited the summary of this revision. nicovank updated this revision to Diff 452886. nicovank updated this revision to Diff

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/CFGMatchSwitch.h:53-54 + template + CFGMatchSwitchBuilder CaseOfCFGStmt(MSMatcherT M, +

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-expression.cpp:236-238 - // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate sum += sizeof(PMyStruct); - // CHECK-MESSAGES

[PATCH] D131872: [Intrinsics] Add initial support for NonNull attribute

2022-08-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks accepted this revision. aeubanks added a comment. lgtm Commit message nit: Saying Test plan: ninja check-all isn't super useful, just mentioning the desired changes is good enough (e.g. your code snippet) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D131975: [clang][dataflow] Use llvm::is_contained()

2022-08-16 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added subscribers: martong, 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. Repository: rG LLVM Github Monorepo https

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-16 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. I think I introduced a bug when replacing the VisitUnaryMinus/Plus/Imag/Real with VisitMinus/Plus/Imag/Real. Now this simple test case is failing in the non-promotion path (with the +avx512fp16). _Float16 _Complex MinusOp_c_c(_Float16 c) { return -c; } error: cann

[PATCH] D131808: [clang,flang] Add missing options fsyntax-only in help

2022-08-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. LGTM, thanks for the fix! You may want to update to title to better reflect the contents (e.g. “Add help text for -fsyntax-only”). While the fact that it fixes https://github.com/llvm/llvm-project/issues/57033 motivated this change,

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 8 inline comments as done. erichkeane added inline comments. Comment at: clang/include/clang/Sema/Sema.h:3642 + // template, for the purposes of [temp.friend] p9. + bool ConstraintExpressionDependsOnEnclosingTemplate(unsigned TemplateDepth, +

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D113107#3726496 , @zahiraam wrote: > I think I introduced a bug when replacing the VisitUnaryMinus/Plus/Imag/Real > with VisitMinus/Plus/Imag/Real. Now this simple test case is failing in the > non-promotion path (with the +

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 453055. erichkeane marked 5 inline comments as done. erichkeane added a comment. Respond/fix all of the things @ChuanqiXu mentioned. Intend to commit early tomorrow based on latest feedback unless others have concerns. CHANGES SINCE LAST ACTION https:

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:544 } + llvm::stable_sort(GlobalCtors, [](const Structor &L, const Structor &R) { +return L.LexOrder < R.LexOrder; rnk wrote: > Please move this sorting into EmitCtorList and app

[PATCH] D131978: [clang-format] Concepts: allow identifiers after negation

2022-08-16 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: MyDeveloperDay, curdeius, HazardyKnusperkeks, owenpan. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, the formatter would refuse to treat

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

2022-08-16 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 453058. Codesbyusman marked 10 inline comments as done. Codesbyusman added a comment. updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 Files: clang/doc

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. There's no compiler interoperation problem here; it's just a semantic concern that someone could've been relying on the old behavior. The new behavior is (AIUI) clearly required by the language standard, and I don't think we want to get into the business of providing

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127233#3726613 , @rjmccall wrote: > There's no compiler interoperation problem here; it's just a semantic concern > that someone could've been relying on the old behavior. The new behavior is > (AIUI) clearly required

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > is this an ABI breaking change It only affects the order of initialization within a file, so it doesn't really have any implications for the binary ABI. It might break code, of course, but that's a different issue. If we want a flag to maintain the old behavior, we

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-16 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Was it intended that the warning generated here isn't silenced by `-w`, only by an explicit `-Wno-enum-constexpr-conversion` (or `-Wno-everythning`), and that `-Wno-error` doesn't downgrade the error? See https://godbolt.org/z/s9qPveTWG for an example. Repository: r

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I agree that the change in behaviour is reasonable and have no objections to it. The code should not rely on particular output of `__PRETTY_FUNCTION__`. I just wanted to point out that we still don't match GCC in other cases, not that is was a worthwhile goal to ch

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

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Nice! Just a few more small nits to fix that I can see. Comment at: clang/lib/Analysis/CFG.cpp:1016-1021 + Optional getIntegerLiteralSubexpressionValue(const Expr *E) { + +const auto *UnOp = dyn_cast(E->IgnoreParens()); + +// If unary. +

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D131307#3726631 , @smeenai wrote: > Was it intended that the warning generated here isn't silenced by `-w`, only > by an explicit `-Wno-enum-constexpr-conversion` (or `-Wno-everythning`), and > that `-Wno-error` doesn't do

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131307#3726631 , @smeenai wrote: > Was it intended that the warning generated here isn't silenced by `-w`, only > by an explicit `-Wno-enum-constexpr-conversion` (or `-Wno-everythning`), and > that `-Wno-error` doesn't

[PATCH] D131874: [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 453062. shafik marked an inline comment as done. shafik added a comment. - Addressing comments on casting of `EvaluatingDecl` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131874/new/ https://reviews.llvm.org/D131874 Files: clang/lib/AST/ExprConst

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM overall with some minor nitpicks. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:95 + const llvm::StringSet<> &Alr

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-16 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa created this revision. yihanaa added reviewers: rjmccall, aaron.ballman, erichkeane, lebedev.ri. yihanaa added a project: clang. Herald added a project: All. yihanaa requested review of this revision. Herald added a subscriber: cfe-commits. Clang will crash when __builtin_assume_aligned's

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: kosarev, pmatos, asb, ormris, wenlei, kerbowa, arphaman, steven_wu, hiraditya, sbc100, jvesely. Herald added a project: All. aeubanks requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin. Herald ad

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

2022-08-16 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 453064. Codesbyusman marked 3 inline comments as not done. Codesbyusman added a comment. updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 Files: clang/

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think the correct answer here is instead to prohibit using this on array/string literal types in Sema instead of just ignoring the call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131979/new/ https://reviews.llvm.o

[PATCH] D131009: [analyzer] Fixing a bug raising false positives of stack block object leaking under ARC

2022-08-16 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:313-315 + // Under ARC, blocks are retained and released automatically: + if (isArcManagedBlock(Referred, Ctx)) +return false; NoQ wrote

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-16 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D131979#3726686 , @erichkeane wrote: > I think the correct answer here is instead to prohibit using this on > array/string literal types in Sema instead of just ignoring the call. Thanks for you replay @erichkeane , in clan

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-16 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D131307#3726643 , @erichkeane wrote: > In D131307#3726631 , @smeenai wrote: > >> Was it intended that the warning generated here isn't silenced by `-w`, only >> by an explicit `-Wno-e

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Sanjay Patel via Phabricator via cfe-commits
spatel accepted this revision. spatel added a comment. This revision is now accepted and ready to land. LGTM These clang tests are just awful, but I don't have the patience to fix them... Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:245 // TODO: Investigate the cost/

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Are you concerned about tail-call marking, or the recursive call->loop transform? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131980/new/ https://reviews.llvm.org/D131980 ___

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `getSubExprAsWritten`, as the name suggests, is a query for exploring the source code as written; it should generally not be used in CodeGen, which should be respecting the semantics of the AST. If Sema is applying implicit conversions that aren't desirable, we should

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 453070. aeubanks added a comment. delete comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131980/new/ https://reviews.llvm.org/D131980 Files: clang/test/CodeGen/aarch64-ls64-inline-asm.c clang/test/C

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D131980#3726750 , @efriedma wrote: > Are you concerned about tail-call marking, or the recursive call->loop > transform? specifically tail call marking we have symbolizers that stopped displaying some frames with this chang

[clang] 941959d - [clang][dataflow] Use llvm::is_contained()

2022-08-16 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2022-08-16T19:59:21+02:00 New Revision: 941959d69de76342fbeebcebd9f0ebdf2f73c77d URL: https://github.com/llvm/llvm-project/commit/941959d69de76342fbeebcebd9f0ebdf2f73c77d DIFF: https://github.com/llvm/llvm-project/commit/941959d69de76342fbeebcebd9f0ebdf2f73c77d.dif

[PATCH] D131975: [clang][dataflow] Use llvm::is_contained()

2022-08-16 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 rG941959d69de7: [clang][dataflow] Use llvm::is_contained() (authored by gribozavr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-16 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. Thanks for your suggestion @erichkeane @rjmccall , I will try to do that Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131979/new/ https://reviews.llvm.org/D131979 ___ cfe-commit

[PATCH] D85599: [PowerPC] Remove isTerminator for TRAP instruction

2022-08-16 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. Herald added a project: All. I think we should handle this similarly to `SITargetLowering::splitKillBlock()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85599/new/ https://reviews.llvm.org/D85599 __

[PATCH] D129855: [clang][PowerPC] Set lld as clang's default linker for PowerPC Linux

2022-08-16 Thread Quinn Pham via Phabricator via cfe-commits
quinnp added a comment. Hi @MaskRay, could you please take a look at @nemanjai's suggestion? > ... > So I would prefer that we handle this in the CMake files if @MaskRay doesn't > object. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1298

[PATCH] D131980: [Passes] Don't run tail-call-elim in -O1

2022-08-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. If you're specifically concerned about sibcall (call->jmp) optimization in the backend, it might be better to adjust the backend to avoid sibcalls at -O1, as opposed to messing with optimization passes. (i.e. make -fno-optimize-sibling-calls the default at -O1.) "tai

[PATCH] D131926: [clang-tidy] Fix for bugprone-sizeof-expression PR57167

2022-08-16 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added a comment. Sounds fair. I had taken your acceptance of the change as a green light. :) TBH, the acceptance came much faster than I'd expected-- even though this is a trivial and low-risk change, I expected it to sit for at least several days. I'll plan to wait a fe

[PATCH] D131464: [test] Make tests pass regardless of gnu++14/gnu++17 default

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131464#3716905 , @MaskRay wrote: > Sorry, my previous main comment had been written before I introduced > `LIT_CLANG_STD_GROUP` in `llvm/utils/lit/lit/llvm/config.py`. The multiple > `%clang_cc1` approach actually look

[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

2022-08-16 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky created this revision. oleg.smolsky added a reviewer: aaron.ballman. Herald added subscribers: carlosgalvezp, mgorny. Herald added a project: All. oleg.smolsky requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - this

[PATCH] D127233: [CodeGen] Sort llvm.global_ctors by lexical order before emission

2022-08-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:580 +I = DelayedCXXInitPosition.find(D); +unsigned LexOrder = I == DelayedCXXInitPosition.end() ? ~0U : I->second; +AddGlobalCtor(Fn, 65535, LexOrder, COMDATKey); efriedma wrote:

  1   2   >