[PATCH] D138900: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

2022-11-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138900 Files: clang/lib/Headers/cmpccxaddintrin.h cl

[clang] 67e253c - [NFC][X86] Correct _axor_i32 's pseudo code.

2022-11-28 Thread Freddy Ye via cfe-commits
Author: Freddy Ye Date: 2022-11-29T15:08:17+08:00 New Revision: 67e253c35437b9fb38f968f60d54f203abecd634 URL: https://github.com/llvm/llvm-project/commit/67e253c35437b9fb38f968f60d54f203abecd634 DIFF: https://github.com/llvm/llvm-project/commit/67e253c35437b9fb38f968f60d54f203abecd634.diff LOG

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Gentle ping :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138474/new/ https://reviews.llvm.org/D138474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D138895: [clang] Update CWG2635 status

2022-11-28 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill updated this revision to Diff 478457. Endill added a comment. Remove WIP for another patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138895/new/ https://reviews.llvm.org/D138895 Files: clang/test/CXX/drs/dr26xx.cpp Index: clang/test/CXX/drs/dr26xx.cpp ===

[PATCH] D138895: [clang] Update CWG2635 status

2022-11-28 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. Sorry, some other WIP got in there. I'll remove it in a moment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138895/new/ https://reviews.llvm.org/D138895 ___ cfe-commits mailing l

[PATCH] D138895: [clang] Update CWG2635 status

2022-11-28 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill created this revision. Endill added reviewers: clang-language-wg, erichkeane. Herald added a project: All. Endill requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A follow-up to D138852 . Apparently

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp:10-13 +void foo(...); + +void * bar(void); +char * baz(void); ziqingluo-90 wrote: > steakhal wrote: > > NoQ wrote: > > > ziqingluo-90 wrote: > > > > steakhal wrote: > > > > > I

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-11-28 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. As I do not have commit access, can someone commit this patch, now that it passes the pre-merge tests ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127855/new/ https://reviews.llvm.org/D127855 ___ cfe-commits

[PATCH] D137348: [-Wunsafe-buffer-usage] Introduce an abstraction for fixable code patterns.

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:63 + + Gadget(Kind K) : K(K) {} + aaron.ballman wrote: > Should this be an explicit constructor? (Same question applies below to > derived classes as well.) What's the value of maki

[PATCH] D138252: [clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas.

2022-11-28 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. @vsapsai I reverted your change because it was causing the test ClangScanDeps/no-werror.cpp to fail on the PS4/PS5 linux/Windows bots: - https://lab.llvm.org/buildbot/#/builders/139/builds/31784 - https://lab.llvm.org/buildbot/#/builders/216/builds/13476 Repository: rG

[clang] 2f8ac18 - Revert "[clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas."

2022-11-28 Thread Douglas Yung via cfe-commits
Author: Douglas Yung Date: 2022-11-28T21:22:29-08:00 New Revision: 2f8ac1804827026b44f429dce02730da18a73c50 URL: https://github.com/llvm/llvm-project/commit/2f8ac1804827026b44f429dce02730da18a73c50 DIFF: https://github.com/llvm/llvm-project/commit/2f8ac1804827026b44f429dce02730da18a73c50.diff

[PATCH] D136811: [-Wunsafe-buffer-usage] WIP: RFC: NFC: User documentation.

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/docs/SafeBuffers.rst:31 +convert large amounts of old code to conform to the warning; + - Attribute ``[[unsafe_buffer_usage]]`` lets you annotate custom functions as +unsafe, while providing a safe alternative that can often b

[PATCH] D136811: [-Wunsafe-buffer-usage] WIP: RFC: NFC: User documentation.

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 478450. NoQ marked 42 inline comments as done. NoQ added a comment. Herald added a subscriber: arphaman. Addressed review comments up until The Attribute section. Folks, thanks a lot for reading this longread so thoroughly. I'm very grateful. CHANGES SINCE LAST

[PATCH] D138270: [clang][Sema] Skip checking int expressions for overflow in constexpr functions

2022-11-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. We may not have good code coverage, what about a case like this: constexpr void f() { int arr[10]{}; arr[1024*1024*1024*1204]; } do you still obtain: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr void

[PATCH] D138854: [AIX][LTO] Enabling Context Sensitive PGO Options

2022-11-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Comment at: llvm/lib/LTO/LTOCodeGenerator.cpp:125 +cl::desc("Perform context sensitive PGO instrumentation"), +cl::init(false)

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. > The more i stare at this. The more worried i am. Is the idea that, when we > are in termination/UB EH scope, we no longer have to play by the RAII rules, > and destructors, for the moment, are no-ops and are side-effect free? Termination is allowed to happen as soon

[PATCH] D138091: [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum

2022-11-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik marked an inline comment as done. shafik added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1250-1251 bool ADL = UseArgumentDependentLookup(SS, Result, NextToken.is(tok::l_paren)); - if (Result.isSingleResult() && !ADL && !FirstDecl->isCXXClassMember()) +

[PATCH] D138855: [clang][Fuchsia] Allow for setting the default build type

2022-11-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This shouldn't be needed, you can do: cmake ... -DCMAKE_BUILD_TYPE=Debug -C path/to/Fuchsia-stage2.cmake This will override the value inside the cache file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138855/new/ https

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D138859#3955578 , @vsapsai wrote: > In D138859#3954975 , @erichkeane > wrote: > >> The hash there isn't the problem, its that you're adding a field to Attr.td >> that isn't serializ

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/3)

2022-11-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197 +llvm::cl::opt P1689TargetedCommand( +"p1689-targeted-command", llvm::cl::Optional, +llvm::cl::desc("Only supported for P1689, the targeted command of which " b

[PATCH] D138870: clang/AMDGPU: Remove flat-address-space from feature map

2022-11-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. The OpenMP part is fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138870/new/ https://reviews.llvm.org/D138870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5402-5411 +if (SanOpts.has(SanitizerKind::ExceptionEscape) && +ExceptionEscapeUBLastInvokeSrcLoc) { + llvm::Constant *CheckSourceLocation = EmitCheckSourceLocation(Loc); + Builder.Cre

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a reviewer: efriedma. lebedev.ri added a comment. @rjmccall thank you for taking a look! In D137381#3955100 , @rjmccall wrote: > In D137381#3953178 , @lebedev.ri > wrote: > >> ping. We need to g

[PATCH] D138194: [clang][Parser][NFC] Simplify ParseParenExprOrCondition

2022-11-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1286 if (getLangOpts().CPlusPlus) { -Cond = ParseCXXCondition(InitStmt, Loc, CK, MissingOK); +Cond = ParseCXXCondition(InitStmt, Loc, CK, false); } else { Nitpick edit for addin

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. OK. So, we do need a flag, at least for now. I think we'll need a new one, because `-freestanding` will likely do a lot of things we don't actually want on the host side. How about `--offload-generic` or `--[no-]offload-runtime`. Repository: rG LLVM Github Monorepo CHA

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D138859#3954975 , @erichkeane wrote: > The hash there isn't the problem, its that you're adding a field to Attr.td > that isn't serialized in ASTWriter/ASTReader. That's a good point. Sorry I haven't realized it at first and

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D138862#3955502 , @tra wrote: > However, we probably need some sort of safeguards warning users if they > compile CUDA *kernels* or code w/ global variable in freestanding mode. The behavior of `-ffreestanding` isn't well do

[PATCH] D138877: [NFC] Cleanup: Replaces BB->getInstList().insert() with I->insertAt().

2022-11-28 Thread Vasileios Porpodas via Phabricator via cfe-commits
vporpo created this revision. vporpo added a reviewer: asbirlea. Herald added subscribers: Enna1, ormris, wenlei, hiraditya. Herald added a project: All. vporpo requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This is part

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D138862#3955364 , @jhuber6 wrote: > So this patch was made because I'm trying to create a generic `libc` runtime > for the GPU. OK. That simplifies things. GPU-side non-kernel functions do not need anything from CUDA host runtim

[PATCH] D138392: clang/HIP: Fix broken implementations of __make_mantissa* functions

2022-11-28 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. Patch is obviously fine. Given these are internal functions, perhaps we should annotate them with the non-null attribute and delete the early exit. CHANGES SINCE LAST ACTION

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D138862#3955461 , @JonChesterfield wrote: > Does this change the annotation on kernels compiled from C or C++ with > -ffreestanding? If so, probably want a test showing the change. I have a > vague idea that they pick up a d

[PATCH] D135488: [codegen] Display stack layouts in console

2022-11-28 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. Sorry, it took me a while to circle back to this. In D135488#3931603 , @dblaikie wrote: > I'm not sure we'd need/want to optimize a diagnostic experience for a > codebase that's got a lot of latent warnings. If people have lot

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Does this change the annotation on kernels compiled from C or C++ with -ffreestanding? If so, probably want a test showing the change. I have a vague idea that they pick up a default of 'opencl' at present, where 'none' is probably better. Or perhaps this is onl

[PATCH] D138318: [-Wunsafe-buffer-usage] Improve pointer match pattern

2022-11-28 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:31-39 +hasType(pointerType()), +hasType(autoType( +hasDeducedType(hasUnqualifiedDesugaredType(pointerType(), +// DecayedType, e.g., array type in formal parameter

[PATCH] D138532: [SPARC][clang] Enable frame pointer optimization by default

2022-11-28 Thread Brad Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG17d0a15478e9: [SPARC][clang] Enable frame pointer optimization by default (authored by koakuma, committed by brad). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[clang] 17d0a15 - [SPARC][clang] Enable frame pointer optimization by default

2022-11-28 Thread Brad Smith via cfe-commits
Author: Koakuma Date: 2022-11-28T18:22:46-05:00 New Revision: 17d0a15478e96d8de611c90e760ca4f7b4ff5490 URL: https://github.com/llvm/llvm-project/commit/17d0a15478e96d8de611c90e760ca4f7b4ff5490 DIFF: https://github.com/llvm/llvm-project/commit/17d0a15478e96d8de611c90e760ca4f7b4ff5490.diff LOG:

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D138862#3955339 , @tra wrote: >> we should expect it to be handled externally. > > Can you give more details on how it will work? Something/somewhere would need > to generate the glue code to register kernels w/ CUDA runtime.

[PATCH] D136515: [builtins] Add __builtin_assume_separate_storage.

2022-11-28 Thread David Goldblatt via Phabricator via cfe-commits
davidtgoldblatt updated this revision to Diff 478394. davidtgoldblatt added a comment. Fix out-of-date comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136515/new/ https://reviews.llvm.org/D136515 Files: clang/include/clang/Basic/Builtins.

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > we should expect it to be handled externally. Can you give more details on how it will work? Something/somewhere would need to generate the glue code to register kernels w/ CUDA runtime. Are you saying that we'll have some way to tell the final linking stage that all offl

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp:10-13 +void foo(...); + +void * bar(void); +char * baz(void); steakhal wrote: > NoQ wrote: > > ziqingluo-90 wrote: > > > steakhal wrote: > > > > I would expect this te

[PATCH] D138509: clang/HIP: Add another math header test

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. aa4acea8cd8d30b6c8b5d539217be0d5c76db625 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138509/new/ https://reviews.llvm.org/D138509 __

[clang] aa4acea - clang/HIP: Add another math header test

2022-11-28 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2022-11-28T18:02:20-05:00 New Revision: aa4acea8cd8d30b6c8b5d539217be0d5c76db625 URL: https://github.com/llvm/llvm-project/commit/aa4acea8cd8d30b6c8b5d539217be0d5c76db625 DIFF: https://github.com/llvm/llvm-project/commit/aa4acea8cd8d30b6c8b5d539217be0d5c76db625.diff

[PATCH] D138870: clang/AMDGPU: Remove flat-address-space from feature map

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, JonChesterfield, b-sumner, jdoerfert. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. arsenm requested review of this revision. Herald added subscribers: sstefan1, wdng. This w

[PATCH] D138868: AMDGPU/clang: Remove target features from address space test builtins

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, b-sumner, JonChesterfield. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. arsenm requested review of this revision. Herald added subscribers: llvm-commits, wdng. Herald added a

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:423 + // Create labels and comparison ops for all case statements. + for (const SwitchCase *SC = S->getSwitchCaseList(); SC; + SC = SC->getNextSwitchCase()) { How we

[PATCH] D137437: [lit][AIX] Convert clang tests to use 'target={{.*}}-aix{{.*}}'

2022-11-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson updated this revision to Diff 478382. probinson retitled this revision from "[lit][AIX] Convert clang tests to use 'target={{.*}}aix{{.*}}'" to "[lit][AIX] Convert clang tests to use 'target={{.*}}-aix{{.*}}'". probinson added a comment. Be consistent about using `-aix` CHANGES SINCE

[PATCH] D138852: CWG2635: Disallow constrained structured bindings.

2022-11-28 Thread Erich Keane 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 rG07008a8df57f: CWG2635: Disallow constrained structured bindings. (authored by erichkeane). Herald added a project: clang. Changed prior to commit:

[clang] 07008a8 - CWG2635: Disallow constrained structured bindings.

2022-11-28 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2022-11-28T14:41:14-08:00 New Revision: 07008a8df57f8eb75e934a3a01ed0a4a76ae92ce URL: https://github.com/llvm/llvm-project/commit/07008a8df57f8eb75e934a3a01ed0a4a76ae92ce DIFF: https://github.com/llvm/llvm-project/commit/07008a8df57f8eb75e934a3a01ed0a4a76ae92ce.diff L

[PATCH] D138603: [Clang] Implement LWG3823 for __is_aggregate

2022-11-28 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as done. royjacobson added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:556 static_assert(__is_aggregate(EmptyArMB), ""); static_assert(!__is_aggregate(void), ""); static_assert(!__is_aggregate(const volatile void),

[PATCH] D138651: [CUDA][HIP] Don't diagnose use for __bf16

2022-11-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D138651#3954179 , @tra wrote: >> Builds were failing because "__bf16" wasn't allowed on the target. > > For CUDA/NVPTX we've solved the issue by implementing storage-only support > for NVPTX: https://reviews.llvm.org/D136311 >

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-28 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe added a comment. >> It is also completely irrelevant, because a new programmer will not >> understand that const T const * is actually T const* and not T const * >> const. An experienced programmer can understand it well either way. > > not sure I follow the argument here, but surely I als

[PATCH] D138439: clang: Fix cast failure when using -fsanitize=undefined for HIP

2022-11-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138439/new/ https://reviews.llvm.org/D138439 ___ cfe-commits mailing list cfe-

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp:10-13 +void foo(...); + +void * bar(void); +char * baz(void); NoQ wrote: > ziqingluo-90 wrote: > > steakhal wrote: > > > I would expect this test file to grow quite a bit.

[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 478373. cor3ntin added a comment. Fix DR status (I didn't know the scrip supported versions, neat) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138861/new/ https://reviews.llvm.org/D138861 Files: clang/li

[clang] e6624a2 - [Clang] Update the status of mostly-editorial defect reports

2022-11-28 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2022-11-28T23:16:04+01:00 New Revision: e6624a2f3647a36ddbcfc0740b45b849a4ecf663 URL: https://github.com/llvm/llvm-project/commit/e6624a2f3647a36ddbcfc0740b45b849a4ecf663 DIFF: https://github.com/llvm/llvm-project/commit/e6624a2f3647a36ddbcfc0740b45b849a4ecf663.diff

[PATCH] D138377: add clang_Type_getFullyQualifiedName

2022-11-28 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! Comment at: clang/tools/c-index-test/c-index-test.c:1787 PrintCursor(cursor, NULL); + VisitorData *Data = (VisitorData *)d; PrintSingleTypeSize(T,

[PATCH] D138713: Fix assertion failure "PathDiagnosticSpotPiece's must have a valid location." in ReturnPtrRange checker on builtin functions

2022-11-28 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp:48 + dyn_cast_or_null(C.getStackFrame()->getCallSite()); + CE && CE->getBuiltinCallee() != 0) +return; NoQ wrote: > I suspect that you mi

[PATCH] D138852: CWG2635: Disallow constrained structured bindings.

2022-11-28 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, but please add a release note when landing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138852/new/ https://reviews.llvm.org/D138852 ___

[PATCH] D138392: clang/HIP: Fix broken implementations of __make_mantissa* functions

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138392/new/ https://reviews.llvm.org/D138392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D128958: Add assembler plumbing for sanitize_memtag

2022-11-28 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added inline comments. Comment at: llvm/lib/MC/ELFObjectWriter.cpp:622 + assert(MemtagRelocs != nullptr && + "Tagged globals are only supported on AArch64"); + Asm.registerSection(*MemtagRelocs); fmayer wrote: > Is the story here that

[PATCH] D128958: Add assembler plumbing for sanitize_memtag

2022-11-28 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 478367. hctim marked an inline comment as done. hctim added a comment. Update comment for .memtag globals when generating object files on non-MTE-globals supported architectures, and move said comment from an assert to a fatal error. Repository: rG LLVM Gi

[PATCH] D138439: clang: Fix cast failure when using -fsanitize=undefined for HIP

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138439/new/ https://reviews.llvm.org/D138439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D138679: [clang][CodeGen] Add default attributes to __clang_call_terminate

2022-11-28 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138679/new/ https://reviews.llvm.org/D138679 ___

[PATCH] D127284: [clang-repl] Support statements on global scope in incremental mode.

2022-11-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1032-1034 +// FIXME: Remove the incremental processing pre-condition and verify clang +// still can pass its test suite, which will harden +// `isDeclarationStatement`. v.g.vassilev

[PATCH] D138509: clang/HIP: Add another math header test

2022-11-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138509/new/ https://reviews.llvm.org/D138509 ___ cfe-commits mailing list cfe-

[PATCH] D138822: [clang] Add test for CWG36

2022-11-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr0xx.cpp:454 + +namespace dr36 { // dr36: yes +namespace example1 { aaron.ballman wrote: > It took me a while to convince myself, but yes, I agree that Clang seems to > implement the DR. I had to go b

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D137381#3953178 , @lebedev.ri wrote: > ping. We need to get this going, reminder, this was caught because it caused > a visible miscompilation. I'm sorry, I caught COVID-19 during the LLVM conference and have not had a lot

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2022-11-28 Thread Jeff Sandoval via Phabricator via cfe-commits
sandoval added a comment. Overall this approach looks good to me, though I'd suggest some (hopefully minor) changes that would help avoid breaking the ABI. It looks like `__tgt_bin_desc` is only used by `__tgt_[un]register_lib` -- rather than changing those entry points, can you please add new

[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I dont know the lexer well enough to do better than this review, but the code itself seems fine. Comment at: clang/www/cxx_dr_status.html:15651 Allow more characters in an n-char sequence -Unknown +Yes Shouldn't thi

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-11-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tra, yaxunl, tianshilei1992, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a p

[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 478362. cor3ntin added a comment. Update DR web page Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138861/new/ https://reviews.llvm.org/D138861 Files: clang/lib/Lex/Lexer.cpp clang/lib/Lex/LiteralSupport.

[PATCH] D138252: [clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138252/new/ https://reviews.llvm.org/D138252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D138252: [clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeac90d1236cf: [clang][deps] During scanning don't emit warnings-as-errors that are ignored… (authored by vsapsai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[clang] eac90d1 - [clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas.

2022-11-28 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2022-11-28T13:48:29-08:00 New Revision: eac90d1236cfd2935fac5cbe5634f09e2cd0981a URL: https://github.com/llvm/llvm-project/commit/eac90d1236cfd2935fac5cbe5634f09e2cd0981a DIFF: https://github.com/llvm/llvm-project/commit/eac90d1236cfd2935fac5cbe5634f09e2cd0981a.di

[PATCH] D138253: [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming.

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:90 + /// returns an empty list if no fixes are necessary. + virtual Optional getFixits(const Strategy &) const { +return None; steakhal wrote: > steakhal wrote: > > I wonder if

[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138861 Files: clang/lib/Lex/Lexer.cpp clang/lib/Lex/

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:168-169 + static Matcher matcher() { +// FIXME: What if the index is integer literal 0? Should this be +// a safe gadget in this case? +return stmt( aaron.ballman wrote:

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 478356. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137379/new/ https://reviews.llvm.org/D137379 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-u

[PATCH] D138836: [UpdateTestChecks] Fix `update_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Mircea Trofin 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 rG255e7e1c21ee: [UpdateTestChecks] Fix `update_*_test_checks.py` to add "unused" prefixes (authored by mtrofin). Repository: rG LLVM Github Monorep

[clang] 255e7e1 - [UpdateTestChecks] Fix `update_*_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Mircea Trofin via cfe-commits
Author: Mircea Trofin Date: 2022-11-28T13:24:32-08:00 New Revision: 255e7e1c21eeb57b26585836a2e2d5a7f39e3cf3 URL: https://github.com/llvm/llvm-project/commit/255e7e1c21eeb57b26585836a2e2d5a7f39e3cf3 DIFF: https://github.com/llvm/llvm-project/commit/255e7e1c21eeb57b26585836a2e2d5a7f39e3cf3.diff

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. The hash there isn't the problem, its that you're adding a field to Attr.td that isn't serialized in ASTWriter/ASTReader. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138859/new/ https://reviews.llvm.org/D138859 _

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D138329#3938351 , @xazax.hun wrote: > Is the problem `forEachDescendant` matching statements inside blocks and > lambdas? I wonder if this behavior would surprise people, so I think it would > be better to: > > - Potentially add

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D138859#3954943 , @erichkeane wrote: > I dont have a concern on this in general, but does it cause problems with > modules built? I would think this flag needs to be written in > ASTWriter/picked back up. For an attribute

[PATCH] D138532: [SPARC][clang] Enable frame pointer optimization by default

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM. I still find it strange that by default clang explicitly disables an optimization that's the default for unattributed functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. This patch builds on top of D135472 and aims to show that hashing attributes with TableGen works fine and doesn't have unexpected problems. As the next step I plan to hash more attributes. Though there is one question regarding argume

[PATCH] D138852: CWG2635: Disallow constrained structured bindings.

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 478351. erichkeane marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138852/new/ https://reviews.llvm.org/D138852 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclCXX.cpp clang/test

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I dont have a concern on this in general, but does it cause problems with modules built? I would think this flag needs to be written in ASTWriter/picked back up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138859/new

[PATCH] D138836: [UpdateTestChecks] Fix `update_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. Anyways, assuming you tested that this works, LG. Thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138836/new/ https://reviews.l

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: aaron.ballman, ChuanqiXu, erichkeane. Herald added a subscriber: ributzka. Herald added a project: All. vsapsai requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In this change deliberat

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp:10-13 +void foo(...); + +void * bar(void); +char * baz(void); steakhal wrote: > I would expect this test file to grow quite a bit. > As such, I think we should have mo

[PATCH] D138698: [clang-repl] Add basic documentation about clang-repl

2022-11-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. Sorry, selected the wrong option. This looks good to me. I can commit that change for you as I know you do not have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D138698: [clang-repl] Add basic documentation about clang-repl

2022-11-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev requested changes to this revision. v.g.vassilev added a comment. This revision now requires changes to proceed. This looks good to me. I can commit that change for you as I know you do not have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138698/new/ https

[PATCH] D138713: Fix assertion failure "PathDiagnosticSpotPiece's must have a valid location." in ReturnPtrRange checker on builtin functions

2022-11-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM, thanks! This patch seems obvious but please upload with context next time (https://llvm.org/docs/Phabricator.html#phabricator-request-review-web). Comment at: clang/lib/Sta

[PATCH] D138836: [UpdateTestChecks] Fix `update_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. In D138836#3954851 , @lebedev.ri wrote: > In D138836#3954850 , @mtrofin wrote: > >> In D138836#3954782 , @lebedev.ri >> wrote: >> >>> Thanks! >>

[PATCH] D138505: [clangd] Don't run slow clang-tidy checks by default

2022-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks LG, i'd like to hear how we're planning to let downstream users customise the list of fast checks. otherwise they have to run with `Loose` at all times. the easiest i can think of is, generating their own `fastchecks.inc` fragment and #include that in addition t

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-11-28 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. > One test case I'd like to see is: `sizeof(p[0])` -- should code in an > unevaluated context be warned? I think they should NOT be warned. We haven't addressed the issue of unevaluated context in our patches. I'm adding a test for code in unevaluated context so

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-28 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe updated this revision to Diff 478348. Febbe added a comment. Applied clang-format `QualifierAlignment: Left` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137205/new/ https://reviews.llvm.org/D137205 Files: clang-tools-extra/clang-tidy/per

[PATCH] D138252: [clang][deps] During scanning don't emit warnings-as-errors that are ignored with diagnostic pragmas.

2022-11-28 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, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138252/new/ https://reviews.llvm.org/D138252 __

[PATCH] D138836: [UpdateTestChecks] Fix `update_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D138836#3954850 , @mtrofin wrote: > In D138836#3954782 , @lebedev.ri > wrote: > >> Thanks! >> There's also the one for MCA, but this situation basically never happens for >> those

[PATCH] D138836: [UpdateTestChecks] Fix `update_test_checks.py` to add "unused" prefixes

2022-11-28 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. In D138836#3954782 , @lebedev.ri wrote: > Thanks! > There's also the one for MCA, but this situation basically never happens for > those tests. Yup, checked that and the mir one. The latter seems to be implementing its own "ad

  1   2   3   >