[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488497. ccotter added a comment. - Does not offer fixits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CMake

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. I usually use `dump()` when authoring/debugging clang-tidy or similar checks. I don't always have ASTContext handy when working with a DynTypedNode (without temporarily changing my call stack to pass the ASTContext around for the purposes of `dump`). I put up this as a

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488495. ccotter added a comment. remove accidental change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141570/new/ https://reviews.llvm.org/D141570 Files: clang/include/clang/AST/ASTTypeTraits.h clang/lib

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 488494. ccotter added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141570/new/ https://reviews.llvm.org/D141570 Files: clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp clang/in

[PATCH] D141570: [clang] Add no-argument dump to DynTypedNode

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. Provide a no-argument dump me

[clang] d851a79 - [NFC] Refactor the outdated warning message about removing std::experimental::coroutine

2023-01-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-01-12T15:32:40+08:00 New Revision: d851a7937e7669cf1f04768ffb4593ba179fd32a URL: https://github.com/llvm/llvm-project/commit/d851a7937e7669cf1f04768ffb4593ba179fd32a DIFF: https://github.com/llvm/llvm-project/commit/d851a7937e7669cf1f04768ffb4593ba179fd32a.diff LO

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2023-01-11 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EnumToIntCheck.cpp:45 + } else { +Note << FixItHint::CreateInsertion(MatchedExpr->getBeginLoc(), "(int)"); + } pfultz2 wrote: > carlosgalvezp wrote: > > I don't think we

[PATCH] D141569: Implement CppCoreGuideline F.18

2023-01-11 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, shchenz, kbarton, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Warn whe

[PATCH] D141546: [clang] Reland parenthesized aggregate init patches

2023-01-11 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 488486. ayzhao added a comment. fix spelling + improve diagnostics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141546/new/ https://reviews.llvm.org/D141546 Files: clang/docs/ReleaseNotes.rst clang/include

[PATCH] D141531: [OpenMP][FIX] Allow multiple `depend` clauses on a `taskwait nowait`

2023-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8eccca93415: [OpenMP][FIX] Allow multiple `depend` clauses on a `taskwait nowait` (authored by jdoerfert). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Git

[PATCH] D141540: [OpenMP][5.1] Support `thread_limit` on `omp target`

2023-01-11 Thread Johannes Doerfert 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 rG5e4369e53d3c: [OpenMP][5.1] Support `thread_limit` on `omp target` (authored by jdoerfert). Herald added a project: clang. Herald added a subscriber:

[clang] 5e4369e - [OpenMP][5.1] Support `thread_limit` on `omp target`

2023-01-11 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-01-11T22:24:23-08:00 New Revision: 5e4369e53d3c33b3ec69c0b7ec180db8851e792a URL: https://github.com/llvm/llvm-project/commit/5e4369e53d3c33b3ec69c0b7ec180db8851e792a DIFF: https://github.com/llvm/llvm-project/commit/5e4369e53d3c33b3ec69c0b7ec180db8851e792a.d

[clang] a8eccca - [OpenMP][FIX] Allow multiple `depend` clauses on a `taskwait nowait`

2023-01-11 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-01-11T22:24:23-08:00 New Revision: a8eccca934156943f02c4423e4b7df12fe77dca8 URL: https://github.com/llvm/llvm-project/commit/a8eccca934156943f02c4423e4b7df12fe77dca8 DIFF: https://github.com/llvm/llvm-project/commit/a8eccca934156943f02c4423e4b7df12fe77dca8.d

[PATCH] D141105: [OpenMP] Add support for '--offload-arch=native' to OpenMP offloading

2023-01-11 Thread Caroline Tice via Phabricator via cfe-commits
cmtice added a comment. Just a heads up: This commit is causing our bootstrap build to fail (your new openmp-system-arch.c test is failing in our stage1 compiler). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141105/new/ https://reviews.llvm.org/

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2023-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1315 + if (InterpretBuiltin(S, PC, Func->getBuiltinID())) { +NewFrame.release(); +return true; We don't have to update `S.Current`? Comment at: clang/lib/AST/Inter

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

2023-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:291 /// Returns whether we should create a global variable for the /// given VarDecl. + bool isGlobalDecl(const ValueDecl *VD) const { Comment at: clang/te

[PATCH] D141215: [clang-repl][WIP] Implement pretty printing

2023-01-11 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 488466. junaire added a comment. Let's try a better approach to determine whether we should pretty print the expression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D1412

RE: [PATCH] D141437: [HIP] Use .hipi as preprocessor output extension

2023-01-11 Thread Liu, Yaxun (Sam) via cfe-commits
[AMD Official Use Only - General] Fixed by 503e02e861662ef84940fdc05e26c12fc0fca7f3. Thanks. Sam -Original Message- From: Nico Weber via Phabricator Sent: Wednesday, January 11, 2023 11:25 PM To: Liu, Yaxun (Sam) ; t...@google.com Cc: tha...@chromium.org; mask...@google.com; cfe-commits

[clang] 503e02e - Fix test hip-windows-filename.hip

2023-01-11 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-01-11T23:31:49-05:00 New Revision: 503e02e861662ef84940fdc05e26c12fc0fca7f3 URL: https://github.com/llvm/llvm-project/commit/503e02e861662ef84940fdc05e26c12fc0fca7f3 DIFF: https://github.com/llvm/llvm-project/commit/503e02e861662ef84940fdc05e26c12fc0fca7f3.dif

[PATCH] D141437: [HIP] Use .hipi as preprocessor output extension

2023-01-11 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I think this breaks tests on Windows: http://45.33.8.238/win/73191/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141437/new/ https://reviews.llvm.

[PATCH] D141563: [clang-format] Fix a bug in DerivePointerAlignment fallback

2023-01-11 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, HazardyKnusperkeks, rymiel. owenpan added a project: clang-format. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://gi

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-11 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/implicit-widening-of-multiplication-result-array-subscript-expression.cpp:18 // CHECK-NOTES-C:(ptrdiff_t)( ) // CHECK-NOTES-CXX: static_cast( )

[PATCH] D141182: [mips][clang] Do not define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for MIPS-I

2023-01-11 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. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141182/new/ https://reviews.llvm.org/D141182 _

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked an inline comment as done. ChuanqiXu added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5736 + C.getArgs().hasArg(options::OPT_fmodule_output) && + C.getArgs().hasArg(options::OPT_o)) { +SmallString<128> OutputPath; dbla

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 488455. ChuanqiXu added a comment. Address comments: - Extract the logic to compute the output path of `-fmodule-output` to a reusable function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137058/new/ https://reviews.llvm.org/D137058 Files:

[PATCH] D141545: [OpenMP] Implement `omp_get_mapped_ptr`

2023-01-11 Thread Shilei Tian 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 rG6e18277a5118: [OpenMP] Implement `omp_get_mapped_ptr` (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 6e18277 - [OpenMP] Implement `omp_get_mapped_ptr`

2023-01-11 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-11T22:05:42-05:00 New Revision: 6e18277a51187ce8e861cdf0ab1395235e5b83d4 URL: https://github.com/llvm/llvm-project/commit/6e18277a51187ce8e861cdf0ab1395235e5b83d4 DIFF: https://github.com/llvm/llvm-project/commit/6e18277a51187ce8e861cdf0ab1395235e5b83d4.diff L

[PATCH] D138958: [clang] Better UX for Clang’s unwind-affecting attributes

2023-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D138958#4045567 , @efriedma wrote: > From an IR semantics standpoint, I'm not sure the `memory(none)` marking is > right if the function throws an exception. Then `memory(read)` would be wrong, either. A bit of a hot take:

[PATCH] D141561: [clang] True `noexcept` (`-fstrict-noexcept` language dialect)

2023-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, rjmccall, efriedma, jcranmer, jyknight, rsmith. lebedev.ri added a project: LLVM. Herald added subscribers: StephenFan, dschuff. Herald added a project: All. lebedev.ri requested review of this revision. Herald added subs

[PATCH] D140867: [C++20] [Modules] Don't generate global ctors/dtors for variables which are available externally

2023-01-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D140867#4043763 , @Jake-Egan wrote: > In D140867#4042405 , @ChuanqiXu > wrote: > >> In D140867#4042351 , @Jake-Egan >> wrote: >> Would

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2023-01-11 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 488445. pfultz2 added a comment. Merge from main. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129570/new/ https://reviews.llvm.org/D129570 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/clang-tidy/bugpro

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher 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/D141550/new/ https://reviews.llvm.org/D141550 _

[PATCH] D140455: [Clang] Diagnose undefined behavior in a constant expression while evaluating a compound assignment with remainder as operand

2023-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 488441. shafik added a comment. - Moving back HandleOverflowResult to before the switch statement to avoid "jump bypasses variable initialization" error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140455/new/ https://reviews.llvm.org/D140455 Fil

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2023-01-11 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 488440. pfultz2 added a comment. Improve null checking, use the correct type in the fixit, and updated the tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129570/new/ https://reviews.llvm.org/D129570 Files: clang-tools-extra/clang-tidy/bugpr

[clang] e97caa9 - Fixed Clang::Driver 'netbsd.c' test on Windows/Cross builders. NFC.

2023-01-11 Thread Vladimir Vereschaka via cfe-commits
Author: Vladimir Vereschaka Date: 2023-01-11T17:30:23-08:00 New Revision: e97caa9a2855bd928d1d4ff5503262baa92b3b7f URL: https://github.com/llvm/llvm-project/commit/e97caa9a2855bd928d1d4ff5503262baa92b3b7f DIFF: https://github.com/llvm/llvm-project/commit/e97caa9a2855bd928d1d4ff5503262baa92b3b7f

[PATCH] D141240: [SVE][Builtins] Add metadata to intrinsic calls for builtins that don't define the result of inactive lanes.

2023-01-11 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added a comment. In D141240#4035438 , @sdesmalen wrote: > Using metadata seems sensible, but did you also identify any downsides? I > could imagine that we'd need to manually propagate metadata to any nodes > after we do a combine (which

[PATCH] D139737: [-Wunsafe-buffer-usage] Initiate Fix-it generation for local variable declarations

2023-01-11 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:46 +/// The text indicating that the user needs to provide input there: +constexpr static const char *const UserFillPlaceHolder = "..."; } // end namespace clang ---

[PATCH] D141558: [MemProf] Collect access density statistics during profiling

2023-01-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: snehasish, davidxl. Herald added subscribers: Enna1, wenlei. Herald added a project: All. tejohnson requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: Sanitizers, cfe-commits. Trac

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2023-01-11 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EnumToIntCheck.cpp:45 + } else { +Note << FixItHint::CreateInsertion(MatchedExpr->getBeginLoc(), "(int)"); + } carlosgalvezp wrote: > I don't think we can assume the type of th

[PATCH] D141338: [WIP][-Wunsafe-buffer-usage] Filter out conflicting fix-its

2023-01-11 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. In D141338#4042050 , @NoQ wrote: > Looks awesome! > > I'm worried that the test is going to rapidly become stale as you develop > fixits for `DeclStmt` further. It might make sense to write some > //unittests// for this cla

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Yeah, my thoughts too. Though if we don't compile with -g, does that mean if > I use DILocation (or w/e metadata for "inlining occurred") that .debug_info > will get emitted, even if the user didn't ask for it? If not, I can probably > switch everything to use DILoca

[PATCH] D141338: [WIP][-Wunsafe-buffer-usage] Filter out conflicting fix-its

2023-01-11 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 488429. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141338/new/ https://reviews.llvm.org/D141338 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/lib/Analysis/UnsafeBufferUsage.cpp clang/unittests/Analysis/CMakeList

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-11 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.h:494 + CGBuilderTy &Builder, + const bool UsePointerValue = false); dblaikie wrote: > fdeazeve wrote: > > FWIW I used a `const` bool h

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-11 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 488427. paulkirth added a comment. Update clang test for windows file separators. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.org/D135488 Files: clang/test/Frontend/stack

[PATCH] D141056: [SVE][CGBuiltins] Remove need for instcombine from ACLE tests.

2023-01-11 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm marked an inline comment as done. paulwalker-arm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9092 + if (BytesPerElt > 1) { +Value *Scale = ConstantInt::get(Int64Ty, Log2_32(BytesPerElt)); +Ops[2] = Builder.CreateShl(Ops[2

[PATCH] D141056: [SVE][CGBuiltins] Remove need for instcombine from ACLE tests.

2023-01-11 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm updated this revision to Diff 488418. paulwalker-arm added a comment. Rebase and use simpler IRBuilder interface. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141056/new/ https://reviews.llvm.org/D141056 Files: clang/lib/CodeGen/

[PATCH] D138958: [clang] Better UX for Clang’s unwind-affecting attributes

2023-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added subscribers: nikic, efriedma. efriedma added reviewers: nikic, jdoerfert. efriedma added a comment. From an IR semantics standpoint, I'm not sure the `memory(none)` marking is right if the function throws an exception. LangRef doesn't explicitly exclude the possibility, but take

[PATCH] D137944: [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

2023-01-11 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137944/new/ https://reviews.llvm.org/D137944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: compiler-rt/lib/ubsan/CMakeLists.txt:118 +if (NOT APPLE) + add_compiler_rt_runtime(clang_rt.ubsan +STATIC usama54321 wrote: > delcypher wrote: > > I think you may have accidentally added tabs here when

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 marked an inline comment as done. usama54321 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:219 +def err_drv_unsupported_static_ubsan_darwin : Error< + "Static UBSan runtime is not supported on darwin">; def err_drv_duplicate_co

[PATCH] D141175: [test] Split out Annotations from `TestingSupport`

2023-01-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This looks good, i think it also doesn't belong in Testing/Support because it's not a peer to anything in Support/. I think you can use `PARTIAL_SOURCES_INTENDED` to partition directories, but it's unusual and a bit of a hassle. Eithe

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D141451#4045414 , @efriedma wrote: > There are two different approaches we use for getting source locations for > diagnostics coming out of the backend; either embedding clang SourceLocations > into IR, or trying to t

[PATCH] D141172: [ModuleUtils][KCFI] Set patchable-function-prefix for synthesized functions

2023-01-11 Thread Sami Tolvanen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd5e26270660: [ModuleUtils][KCFI] Set patchable-function-prefix for synthesized functions (authored by samitolvanen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[clang] fd5e262 - [ModuleUtils][KCFI] Set patchable-function-prefix for synthesized functions

2023-01-11 Thread Sami Tolvanen via cfe-commits
Author: Sami Tolvanen Date: 2023-01-11T23:45:49Z New Revision: fd5e2627066075f3d15ef774ef368e08735a9ac9 URL: https://github.com/llvm/llvm-project/commit/fd5e2627066075f3d15ef774ef368e08735a9ac9 DIFF: https://github.com/llvm/llvm-project/commit/fd5e2627066075f3d15ef774ef368e08735a9ac9.diff LOG:

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 marked 3 inline comments as done. usama54321 added inline comments. Comment at: compiler-rt/lib/ubsan/CMakeLists.txt:118 +if (NOT APPLE) + add_compiler_rt_runtime(clang_rt.ubsan +STATIC delcypher wrote: > I think you may have accidenta

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5736 + C.getArgs().hasArg(options::OPT_fmodule_output) && + C.getArgs().hasArg(options::OPT_o)) { +SmallString<128> OutputPath; tahonermann wrote: > dblaikie wrote: > > ChuanqiX

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 updated this revision to Diff 488408. usama54321 added a comment. Addressing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141550/new/ https://reviews.llvm.org/D141550 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D141551: Require input target triples to have Environment field

2023-01-11 Thread Jacob Lambert via Phabricator via cfe-commits
lamb-j created this revision. Herald added a project: All. lamb-j requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D141551 Files: clang/lib/Driver/OffloadBundler.cpp

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. libclang functions like `clang_reparseTranslationUnit_Impl` call `clang/lib/Frontend/ASTUnit.cpp:1397` and build the preamble with `/*StoreInMemory=*/false`. If `StoreInMemory` is configurable (true), then you can avoid the temporary file `preamble-*.pch`. Repository:

[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

2023-01-11 Thread James Le Cuirot via Phabricator via cfe-commits
chewi added a comment. James Le Cuirot I'm new to this process, so thanks for bearing with me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141092/new/ https://reviews.llvm.org/D141092 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D139737: [-Wunsafe-buffer-usage] Initiate Fix-it generation for local variable declarations

2023-01-11 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:46 +/// The text indicating that the user needs to provide input there: +constexpr static const char *const UserFillPlaceHolder = "..."; } // end namespace clang

[PATCH] D141280: [clang][wip] Build UsingType for elaborated type specifiers.

2023-01-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 488403. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141280/new/ https://reviews.llvm.org/D141280 Files: clang-tools-extra/i

[PATCH] D141437: [HIP] Use .hipi as preprocessor output extension

2023-01-11 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGe8f41fdb5c6f: [HIP] Use .hipi as preprocessor output extension (authored by yaxunl). Herald added a project:

[clang] e8f41fd - [HIP] Use .hipi as preprocessor output extension

2023-01-11 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-01-11T18:39:58-05:00 New Revision: e8f41fdb5c6fd7903f65216d70c64eb52c898b51 URL: https://github.com/llvm/llvm-project/commit/e8f41fdb5c6fd7903f65216d70c64eb52c898b51 DIFF: https://github.com/llvm/llvm-project/commit/e8f41fdb5c6fd7903f65216d70c64eb52c898b51.dif

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D141381#4045215 , @rjmccall wrote: > That's about what I would expect. One or two extra instructions per argument > that are trivially removed in debug builds. Very small overall impact > because there just aren't very man

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. Overall approach LGTM. I just have some very minor nits. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:219 +def err_drv_unsupported_static_ubsan_darwin : Error< + "Static UBSan runtime is not supported on darwin">; def err_drv_dupli

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. There are two different approaches we use for getting source locations for diagnostics coming out of the backend; either embedding clang SourceLocations into IR, or trying to translate DWARF locations. The advantage of using clang SourceLocations is that we never lose

[PATCH] D141550: [CompilerRT] Remove ubsan static runtime on Apple

2023-01-11 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 created this revision. Herald added a subscriber: Enna1. Herald added a project: All. usama54321 requested review of this revision. Herald added subscribers: Sanitizers, cfe-commits, MaskRay. Herald added projects: clang, Sanitizers. This patch removes the static ubsan runtime on Apple

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137517#4045337 , @jrtc27 wrote: > In D137517#4045315 , @fpetrogalli > wrote: > >> In D137517#4045299 , @jrtc27 wrote: >> >>> In D137517#4

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D139774#4044258 , @aaron.ballman wrote: > In D139774#4043886 , @vedgy wrote: > >> In D139774#4041308 , >> @aaron.ballman wrote: >> >>> Is yo

[PATCH] D141547: Fix format for `case` in .proto files

2023-01-11 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo 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/D141547/new/ https://reviews.llvm.org/D141547 __

[PATCH] D141545: [OpenMP] Implement `omp_get_mapped_ptr`

2023-01-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/src/api.cpp:355 + bool IsHostPtr = false; + auto &Device = *PM->Devices[DeviceNum]; + TargetPointerResultTy TPR = jdoerfert wrote: > And this needs to be (shared) locked too. > > @carlo.be

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D137517#4045315 , @fpetrogalli wrote: > In D137517#4045299 , @jrtc27 wrote: > >> In D137517#4042875 , @fpetrogalli >> wrote: >> >>> In D137517

[PATCH] D141545: [OpenMP] Implement `omp_get_mapped_ptr`

2023-01-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 488391. tianshilei1992 marked 3 inline comments as done. tianshilei1992 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. rebase and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added a comment. In D137517#4045299 , @jrtc27 wrote: > In D137517#4042875 , @fpetrogalli > wrote: > >> In D137517#4042758

[PATCH] D129531: [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2023-01-11 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6198-6199 + dyn_cast(DestType->getAs()->getDecl()); + S.getLangOpts().CPlusPlus20 && RD && RD->isAggregate() && Failed() && + getFailureKind() == FK_ConstructorOverloadFailed &&

[PATCH] D141547: Fix format for `case` in .proto files

2023-01-11 Thread Matt Kulukundis via Phabricator via cfe-commits
fowles created this revision. fowles added a reviewer: krasimir. Herald added a project: All. fowles requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix format for `case` in .proto files Repository: rG LLVM Github Monorepo https://revi

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D137517#4042875 , @fpetrogalli wrote: > In D137517#4042758 , @fpetrogalli > wrote: > >> After submitting this, I had to revert it >>

[PATCH] D141546: [clang] Reland parenthesized aggregate init patches

2023-01-11 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. ayzhao added a reviewer: ilya-biryukov. Herald added subscribers: steakhal, martong, arphaman. Herald added a reviewer: NoQ. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. T

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/include/llvm/TargetParser/CMakeLists.txt:3 +tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/) +add_public_tablegen_target(RISCVTargetParserTableGen) + fpetr

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/include/llvm/TargetParser/CMakeLists.txt:3 +tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/) +add_public_tablegen_target(RISCVT

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-01-11 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Please send separate changes one by one (e.g. first patch would be for `strsep` alone and would include several functions of implementation `__dfsw_strsep` + `__dfso_strsep` + test code for this). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141389/new/ http

[PATCH] D129531: [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2023-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6198-6199 + dyn_cast(DestType->getAs()->getDecl()); + S.getLangOpts().CPlusPlus20 && RD && RD->isAggregate() && Failed() && + getFailureKind() == FK_ConstructorOverloadFailed &&

[PATCH] D140455: [Clang] Diagnose undefined behavior in a constant expression while evaluating a compound assignment with remainder as operand

2023-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 488383. shafik marked 3 inline comments as done. shafik added a comment. - Move HandleOverflowResult closer to where it is used. - move int after constexpr in function rem - Add release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140455/new/ h

[PATCH] D141447: clang/OpenCL: Don't use a Function for the block type

2023-01-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D141447#4044886 , @arsenm wrote: > In D141447#4042273 , @yaxunl wrote: > >> need a test > > This is NFC, this is just fixing the API for the next commit I haven't posted > yet Did you

[PATCH] D140860: [Diagnostics][NFC] Fix -Wlogical-op-parentheses warning inconsistency for const and constexpr values

2023-01-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D140860#4044937 , @aaron.ballman wrote: > In D140860#4031872 , @dblaikie > wrote: > >> The risk now is that this might significantly regress/add new findings for >> this warning tha

[PATCH] D141175: [test] Split out Annotations from `TestingSupport`

2023-01-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht updated this revision to Diff 488381. rupprecht added a comment. - Remove redundant comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141175/new/ https://reviews.llvm.org/D141175 Files: clang-tools-extra/clangd/unittests/Annotation

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That's about what I would expect. One or two extra instructions per argument that are trivially removed in debug builds. I don't really see a need to post about this on Discourse, but it might be worth a release note. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. hmm, did we/do we ever motivate backend diagnostics using the debug info locations? I thought we did in some cases/ways - maybe when the frontend isn't available (eg: when compiling from LLVM IR). It'd be nice not to invent a new way of tracking inlining separate from

[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

2023-01-11 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. Can you please share the `Name ` to use for the commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141092/new/ https://reviews.llvm.org/D141092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:2467-2468 + +const Function *Callee = CI->getCalledFunction(); +if (Callee && (Callee->hasFnAttribute("dontcall-error") || + Callee->hasFnAttribut

[PATCH] D141467: [clang][Driver][CUDA] Get rid of unused LibPath

2023-01-11 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Given that it's indeed unused, I'm fine with removing it. That said, it's somewhat odd that in your setup clang was able to find everything but the library directory. You generally would need to hav

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-11 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5736 + C.getArgs().hasArg(options::OPT_fmodule_output) && + C.getArgs().hasArg(options::OPT_o)) { +SmallString<128> OutputPath; dblaikie wrote: > ChuanqiXu wrote: > > dblaiki

[PATCH] D141092: Optionally install clang-tblgen to aid cross-compiling

2023-01-11 Thread James Le Cuirot via Phabricator via cfe-commits
chewi added a comment. I don't have commit access. Please merge this for me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141092/new/ https://reviews.llvm.org/D141092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D141175: [test] Split out Annotations from `TestingSupport`

2023-01-11 Thread Geoffrey Martin-Noble via Phabricator via cfe-commits
GMNGeoffrey accepted this revision. GMNGeoffrey added a comment. This revision is now accepted and ready to land. LGTM (+/- nits), but maybe good to get review from someone more closely associated with the TestingSupport library Comment at: utils/bazel/llvm-project-overlay/llv

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 488371. nickdesaulniers added a comment. - mention inlined.from in LangRef Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141451/new/ https://reviews.llvm.org/D141451 Files: clang/include/clang/Basic/

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 488368. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - replace inlined-from w/ inlined.from Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141451/new/ https://review

[PATCH] D141175: [bazel] Split out Annotations from `TestingSupport`

2023-01-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D141175#4038017 , @GMNGeoffrey wrote: > It seems like the same logic would extend to the CMake build. Could we make > the same change there? The simplest (only?) way to do that is to have it literally in a separate direct

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-01-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Sonar ping. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D141175: [bazel] Split out Annotations from `TestingSupport`

2023-01-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht updated this revision to Diff 488366. rupprecht added a comment. Herald added subscribers: cfe-commits, kadircet, arphaman, hiraditya. Herald added projects: clang, clang-tools-extra. - Move annotations to a separate package entirely Repository: rG LLVM Github Monorepo CHANGES SINCE

  1   2   3   >