[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. sorry for the hassle 2133e8b9f942f91ec54e28c580fccf6d6b26c62e should fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140875/new/

[clang-tools-extra] 2133e8b - [clangd] Fix shared lib builds

2023-01-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-01-20T08:57:21+01:00 New Revision: 2133e8b9f942f91ec54e28c580fccf6d6b26c62e URL: https://github.com/llvm/llvm-project/commit/2133e8b9f942f91ec54e28c580fccf6d6b26c62e DIFF:

[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-19 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment. > How does this affect LTO? This problem appeared only under lto as far as it's processed as one module. > Is this not just one of many symptoms of RISC-V not having the right > module-level subtarget under LTO, which is a real problem that needs fixing? Not

[PATCH] D142085: [Clang][RISCV] Add `__riscv_` prefix for all RVV intrinsics

2023-01-19 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. (For some reason Phab won't let me comment inline from the Changeset View page, just does nothing when I click reply or click a line...) Or just leave the test names alone? The __riscv_ is for namespacing the intrinsics, you don't need to namespace the tests when

[PATCH] D142085: [Clang][RISCV] Add `__riscv_` prefix for all RVV intrinsics

2023-01-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Basic/riscv_vector.td:1535 enum RVV_CSR { RVV_VSTART = 0, RVV_VXSAT, Not related to this patch, but this enum should probably be using double underscores for its names. Repository:

[PATCH] D142085: [Clang][RISCV] Add `__riscv_` prefix for all RVV intrinsics

2023-01-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vaadd.c:5-14 // RUN: FileCheck --check-prefix=CHECK-RV64 %s #include -// CHECK-RV64-LABEL: @test_vaadd_vv_i8mf8( +// CHECK-RV64-LABEL:

[PATCH] D141796: [15/15][Clang][RISCV][NFC] Set data member under Policy as constants

2023-01-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D141796/new/ https://reviews.llvm.org/D141796

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Chris Lattner via Phabricator via cfe-commits
lattner added a comment. Got it this time, sorry for the confusion! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 ___ cfe-commits mailing list

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. with `-DLLVM_LINK_LLVM_DYLIB=ON`, in case it matters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140875/new/ https://reviews.llvm.org/D140875 ___ cfe-commits mailing list

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. I'm still seeing the build error on clangd-fuzzer on a commit that clearly has e84d69f52d9a9fab9162128d8fe8ebec99ea60da in its history. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D142174: [OpenMP] Don't set rpath for system paths

2023-01-19 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:799 +.Default(false); +} + I wasn't sure exactly how to determine if something is a system path, so I'm open to other ideas here. Repository: rG LLVM Github Monorepo

[PATCH] D142174: [OpenMP] Don't set rpath for system paths

2023-01-19 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. tstellar added reviewers: JonChesterfield, MaskRay. Herald added subscribers: guansong, yaxunl. Herald added a project: All. tstellar requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added

[PATCH] D142022: [Clang][OpenMP] Fix handling of -mcode-object-version for OpenMP

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Is this patch really necessary? `-mcode-object-version=` option does not go through any translation in derived args. If it is in derived args, it should also be in the original args. HIPAMD toolchain just uses the original driver args. Why OpenMP toolchain needs to use

[PATCH] D142075: [Clang][OpenMP] Allow `f16` literal suffix when compiling OpenMP target offloading for NVPTX

2023-01-19 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 rG9c2cfaaada66: [Clang][OpenMP] Allow `f16` literal suffix when compiling OpenMP target… (authored by tianshilei1992). Repository: rG LLVM Github

[clang] 9c2cfaa - [Clang][OpenMP] Allow `f16` literal suffix when compiling OpenMP target offloading for NVPTX

2023-01-19 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-19T22:24:38-05:00 New Revision: 9c2cfaaada66f323d10e25ac961ce1524d7b5f1f URL: https://github.com/llvm/llvm-project/commit/9c2cfaaada66f323d10e25ac961ce1524d7b5f1f DIFF: https://github.com/llvm/llvm-project/commit/9c2cfaaada66f323d10e25ac961ce1524d7b5f1f.diff

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-19 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 490701. ccotter added a comment. - cleanup comments, docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141133/new/ https://reviews.llvm.org/D141133 Files:

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 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 rG3006cb2aa8d9: [HIP] Unbundler allows missing host entry (authored by yaxunl). Herald added a project:

[clang] 3006cb2 - [HIP] Unbundler allows missing host entry

2023-01-19 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-01-19T22:13:17-05:00 New Revision: 3006cb2aa8d9fb1cbcb15a7e4dcd321614fa7478 URL: https://github.com/llvm/llvm-project/commit/3006cb2aa8d9fb1cbcb15a7e4dcd321614fa7478 DIFF:

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureDefaultWhenCapturingThisCheck.cpp:1 +//===--- AvoidCaptureDefaultWhenCapturingThisCheck.cpp - clang-tidy +//-===// Ditto.

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski updated this revision to Diff 490698. calebzulawski added a comment. This revision is basically the same as before, but with two changes: - `darwin` targets (e.g. `x86_64-apple-darwin`) do not automatically detect the SDK. There is another bug where these targets don't seem to

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-19 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked 2 inline comments as done. ccotter added a comment. Would someone with merge access mind committing this? I double checked and this diff can be applied on the latest upstream/main. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski reopened this revision. calebzulawski added a comment. This revision is now accepted and ready to land. @thakis thanks. I have an updated revision that can be reviewed properly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment. In D140875#4065824 , @hokein wrote: > In D140875#4065763 , @ckandeler > wrote: > >> With this, I now get: >> FAILED: bin/clangd-fuzzer >> : && /usr/lib/icecream/libexec/icecc/bin/c++

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D139705#4067370 , @lattner wrote: > I'm pretty sure I'm on top of commit access requests now, plz let me know if > I missed you or something! Could be spam filter or who knows what I sent an email from to on last

[PATCH] D141745: [clang] Don't short-circuit constant evaluation for array or record types

2023-01-19 Thread Charles Magahern 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 rG3ac4299d3798: [clang] Dont short-circuit constant evaluation for array or record types (authored by cmagahern). Herald added a project: clang.

[clang] 3ac4299 - [clang] Don't short-circuit constant evaluation for array or record types

2023-01-19 Thread Charles Magahern via cfe-commits
Author: Charles Magahern Date: 2023-01-19T18:04:00-08:00 New Revision: 3ac4299d3798eb7078905d5fc8f23781556c90a1 URL: https://github.com/llvm/llvm-project/commit/3ac4299d3798eb7078905d5fc8f23781556c90a1 DIFF:

[PATCH] D78441: Delete NaCl support

2023-01-19 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Sorry, no :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78441/new/ https://reviews.llvm.org/D78441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. If it's not too much trouble, maybe you could cherry-pick and amend 8d498e08deaf6e06a578cfedb4eb259b722ac7f6 into the commit that relands this. (If not, no worries.) Repository: rG LLVM Github

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2023-01-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:520 + getOpenMPRuntime().emitDeclareTargetVarDefinition(D, Addr, PerformInit)) +return; + I don't really like the copy-pasted bits here. Comment at:

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Reverted in a5f446bc4bb1ac78d6852cc8e251a1229899b783 for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136315/new/ https://reviews.llvm.org/D136315 ___ cfe-commits mailing

[clang] a5f446b - Revert "[clang][Darwin] Try to guess the SDK root with xcrun when unspecified"

2023-01-19 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2023-01-19T20:05:11-05:00 New Revision: a5f446bc4bb1ac78d6852cc8e251a1229899b783 URL: https://github.com/llvm/llvm-project/commit/a5f446bc4bb1ac78d6852cc8e251a1229899b783 DIFF: https://github.com/llvm/llvm-project/commit/a5f446bc4bb1ac78d6852cc8e251a1229899b783.diff

[PATCH] D142167: [clang][modules] Disallow importing private framework in the implementation

2023-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:544 // FIXME: Should we warn on a redundant import of the current module? - if (Mod->getTopLevelModuleName() == getLangOpts().CurrentModule && + if (Mod->isForBuilding(getLangOpts()) &&

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I've confirmed that this breaks a pretty vanilla build setup. /Applications/CMake.app/Contents/bin/cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS='clang;compiler-rt;clang-tools-extra;lld' -DLLVM_APPEND_VC_REV=NO

[PATCH] D142167: [clang][modules] Disallow importing private framework in the implementation

2023-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: benlangmuir. Herald added subscribers: ChuanqiXu, ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Whenever we are

[PATCH] D139395: Add CFI integer types normalization

2023-01-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D139395#4066948 , @samitolvanen wrote: > Thanks for the patch, Ramon. This looks like a reasonable approach to me, and > just for reference, here appears to be the corresponding rustc change: > >

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski added a comment. @jryans thanks. I've confirmed that this is specifically a bug with `darwin` targets (not `macos`) not respecting platform versions when an SDK is present, I can even reproduce this with clang provided with Xcode. The following patch, for example, completely

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Chris Lattner via Phabricator via cfe-commits
lattner added a comment. I'm pretty sure I'm on top of commit access requests now, plz let me know if I missed you or something! Could be spam filter or who knows what Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/

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

2023-01-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:385 + +class Strategy; + There's already a forward declaration on line 144! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:412 +

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread J. Ryan Stinnett via Phabricator via cfe-commits
jryans added a comment. Since we seem to have several breakages here, it does seem best to revert for now so that a revised approach can be investigated. I will aim to revert tomorrow when back at my desk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2023-01-19 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:551-555 +allOf(declStmt().bind("any_ds"), notInSafeBufferOptOut()) +// We match all DREs regardless of whether they are in safe-buffer +// opt-out region. Because an

[PATCH] D142165: [clang][deps] Account for transitive spurious dependencies

2023-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In D106100

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2023-01-19 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:543 #define GADGET(x) \ -x ## Gadget::matcher().bind(#x), +allOf(x ## Gadget::matcher().bind(#x),

[PATCH] D141738: Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang toolchain

2023-01-19 Thread Haowei Wu via Phabricator via cfe-commits
haowei marked 2 inline comments as done. haowei added inline comments. Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:73 + +if(WIN32 OR (LINUX AND WINDOWS_SDK_DIR)) +#if(WINDOWS_SDK_DIR) phosek wrote: > I'd drop this part altogether, let's build these

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2023-01-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:551-555 +allOf(declStmt().bind("any_ds"), notInSafeBufferOptOut()) +// We match all DREs regardless of whether they are in safe-buffer +// opt-out region. Because an unclaimed

[PATCH] D141738: Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang toolchain

2023-01-19 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 490679. haowei retitled this revision from "[WIP] Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang toolchain" to "Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/OffloadBundler.cpp:1063 // in case host bundle name was provided in command line. - if (!FoundHostBundle && BundlerConfig.HostInputIndex != ~0u) + if (!FoundHostBundle &&

[PATCH] D140059: [APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues/59515

2023-01-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140059/new/ https://reviews.llvm.org/D140059 ___ cfe-commits mailing list

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. akyrtzi marked an inline comment as done. Closed by commit rGed6d09dd4ead: [Lex] For dependency directive lexing, angled includes in `__has_include`… (authored by

[clang] ed6d09d - [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via cfe-commits
Author: Argyrios Kyrtzidis Date: 2023-01-19T15:23:21-08:00 New Revision: ed6d09dd4ead70d2858d56c530af38eefa1ef595 URL: https://github.com/llvm/llvm-project/commit/ed6d09dd4ead70d2858d56c530af38eefa1ef595 DIFF:

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D141625#4066961 , @steven_wu wrote: > No, reverse iteration will not break diff test for a small number of decls. > Everything will be in reverse order so it is the same. Hmm, I'm not sure I'm following why that is - could

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-01-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Thanks for your effort on this! FYI I landed parenthesized aggregate initialization in D141546 , so CTAD for that feature should no longer be blocked. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski added a comment. One thing to throw into the mix: Apple's clang has a default sysroot configured, so with the default system compiler, there is no way to replicate this "build without a sysroot" scenario as far as I can tell. For the system compiler, I believe this behavior is a

[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

2023-01-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139741/new/ https://reviews.llvm.org/D139741 ___ cfe-commits mailing list

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Daniele Castagna 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 rG32c26e27b6fc: CUDA/HIP: Use kernel name to map to symbol (authored by dcastagna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 32c26e2 - CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Daniele Castagna via cfe-commits
Author: Daniele Castagna Date: 2023-01-19T15:02:14-08:00 New Revision: 32c26e27b6fcd12703dcd00adf178330d0ad8449 URL: https://github.com/llvm/llvm-project/commit/32c26e27b6fcd12703dcd00adf178330d0ad8449 DIFF:

[PATCH] D141310: [clang] add -Wcompare-function-pointers

2023-01-19 Thread Adrian Dole via Phabricator via cfe-commits
adriandole updated this revision to Diff 490671. adriandole added a comment. Only trigger this warning when comparing function pointers of the same type, since comparing distinct types is already an error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142101: [clang] [extract-api] Don't crash for category in libclang APIs

2023-01-19 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:537-544 + generatePathComponents(Record, API, + [Lang, ](const PathComponent ) { + ParentContexts.push_back( +

[PATCH] D142113: [clang][nfc] refactor Module::Header to use OptionalFileEntryRef

2023-01-19 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142113/new/ https://reviews.llvm.org/D142113

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Daniel Thornburgh via Phabricator via cfe-commits
mysterymath added a comment. This also appears to be breaking the Darwin build for the Fuchsia toolchain, with similar test failures to those seen by @thakis. Given the scope of the breakages, can we revert this and reland later? See:

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/OffloadBundler.cpp:1063 // in case host bundle name was provided in command line. - if (!FoundHostBundle && BundlerConfig.HostInputIndex !=

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 490659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2023-01-19 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/include/clang/Basic/Diagnostic.h:1040-1043 + // An ordered sequence of "-Wunsafe-buffer-usage" opt-out regions in one + // translation unit. Each region is represented by a pair of start and end + // locations. +

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Frederic Riss via Phabricator via cfe-commits
friss added a comment. In D136651#4067012 , @glandium wrote: > Oh yes, we're using `-DLLVM_LINK_LLVM_DYLIB=ON` too, so that would be the > main trigger. This was indeed the main trigger. Thanks for the help narrowing this down. I reverted for now.

[clang] cf12709 - Revert "[Clang] Give Clang the ability to use a shared stat cache"

2023-01-19 Thread Fred Riss via cfe-commits
Author: Fred Riss Date: 2023-01-19T14:07:34-08:00 New Revision: cf12709222a4699ff5a4bb257cb891b55b5f6fba URL: https://github.com/llvm/llvm-project/commit/cf12709222a4699ff5a4bb257cb891b55b5f6fba DIFF: https://github.com/llvm/llvm-project/commit/cf12709222a4699ff5a4bb257cb891b55b5f6fba.diff

[PATCH] D71734: [ODRHash] Hash `RecordDecl` and diagnose discovered mismatches.

2023-01-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. vsapsai marked an inline comment as done. Closed by commit rG160bc160b9b1: [ODRHash] Hash `RecordDecl` and diagnose discovered mismatches. (authored by vsapsai).

[PATCH] D140055: [ODRHash] Detect mismatches in anonymous `RecordDecl`.

2023-01-19 Thread Volodymyr Sapsai 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 rGf33b5b1bf703: [ODRHash] Detect mismatches in anonymous `RecordDecl`. (authored by vsapsai). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] f33b5b1 - [ODRHash] Detect mismatches in anonymous `RecordDecl`.

2023-01-19 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-01-19T15:58:31-06:00 New Revision: f33b5b1bf703ee5ff73126fefe2a9bcbd54db457 URL: https://github.com/llvm/llvm-project/commit/f33b5b1bf703ee5ff73126fefe2a9bcbd54db457 DIFF:

[clang] 160bc16 - [ODRHash] Hash `RecordDecl` and diagnose discovered mismatches.

2023-01-19 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-01-19T15:57:48-06:00 New Revision: 160bc160b9b114069a8cb9b4cc887aa86e5ca7c4 URL: https://github.com/llvm/llvm-project/commit/160bc160b9b114069a8cb9b4cc887aa86e5ca7c4 DIFF:

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. Oh yes, we're using `-DLLVM_LINK_LLVM_DYLIB=ON` too, so that would be the main trigger. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136651/new/ https://reviews.llvm.org/D136651

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

2023-01-19 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 490648. ziqingluo-90 added a comment. Rebased the code w.r.t. a series of refactoring in [-Wunsafe-buffer-usage]. Added a `FixableGadget` for array subscripts of the form `DRE[*]` in the context of lvalue-to-rvalue casting. Also did a refactoring at

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Frederic Riss via Phabricator via cfe-commits
friss added a comment. In D136651#4066960 , @mstorsjo wrote: > In D136651#4066949 , @friss wrote: > >> Thanks for the report, unfortunately I have no way of testing this setup. > > Can you try a build with

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140663/new/ https://reviews.llvm.org/D140663

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Daniele Castagna via Phabricator via cfe-commits
dcastagna updated this revision to Diff 490644. dcastagna added a comment. Add a check for device side kernel name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140663/new/ https://reviews.llvm.org/D140663 Files: clang/lib/CodeGen/CGCUDANV.cpp

[clang] 31b0be4 - [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-19 Thread Alexander Shaposhnikov via cfe-commits
Author: Alexander Shaposhnikov Date: 2023-01-19T20:57:24Z New Revision: 31b0be4eba9e8e9244799f0ebcb18175faff69ab URL: https://github.com/llvm/llvm-project/commit/31b0be4eba9e8e9244799f0ebcb18175faff69ab DIFF:

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-19 Thread Alexander Shaposhnikov 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 rG31b0be4eba9e: [Clang] Add lifetimebound attribute to std::move/std::forward (authored by alexander-shaposhnikov). Repository: rG LLVM Github

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. No, reverse iteration will not break diff test for a small number of decls. Everything will be in reverse order so it is the same. Current test will fail early in reverse iteration and will fail in the end statistically for forward iteration. Will pass in all

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D136651#4066949 , @friss wrote: > Thanks for the report, unfortunately I have no way of testing this setup. Can you try a build with `-DLLVM_LINK_LLVM_DYLIB=ON`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-19 Thread Frederic Riss via Phabricator via cfe-commits
friss added a comment. In D136651#4064474 , @glandium wrote: > In D136651#4064260 , @glandium > wrote: > >> This broke our mac builds with errors like: >> >> ld64.lld: error: undefined symbol: CFRunLoopRun >>

[PATCH] D139395: Add CFI integer types normalization

2023-01-19 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added a comment. Thanks for the patch, Ramon. This looks like a reasonable approach to me, and just for reference, here appears to be the corresponding rustc change: https://github.com/rust-lang/rust/pull/105452/commits/9087c336103d0fa0b465acf8dbc1e4651250fb05 @pcc did you have

[PATCH] D140891: [analyzer] Fix assertion failure in SMT conversion for unary operator on floats.

2023-01-19 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho accepted this revision. mikhail.ramalho 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/D140891/new/ https://reviews.llvm.org/D140891

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. This breaks macOS bot too: https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/33839/ I think this changes might be more disruptive than expected. While it is encouraged to use `-isysroot` when building anything on Darwin platform, it is also

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D141625#4066681 , @steven_wu wrote: > In D141625#4066466 , @dblaikie > wrote: > >> In D141625#4066362 , @steven_wu >> wrote: >> >>>

[PATCH] D142001: [clang] Use FP options from AST for emitting code for casts

2023-01-19 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142001/new/ https://reviews.llvm.org/D142001

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

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Don't let me hold this up - I think it all feels a bit too ad-hoc for my own preferences (feels like there should be fairly general solutions to this - rather than playing whack-a-mole on only the biggest temporary files - both in terms of the options KDevelop

[PATCH] D141744: [Clang] Add lifetimebound attribute to std::move/std::forward

2023-01-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 490637. alexander-shaposhnikov added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141744/new/ https://reviews.llvm.org/D141744 Files:

[PATCH] D137753: [Clang][AIX][p]Enable -p Functionality

2023-01-19 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 490638. francii added a comment. Specifically check for AIX before pushing pg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137753/new/ https://reviews.llvm.org/D137753 Files:

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3318 +for (const auto : Attr->getValueAsListOfDefs("Spellings")) { + if (Spelling->getValueAsString("Variety") == Variety || + Spelling->getValueAsString("Variety") ==

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/incomplete-func-ptr-type.cu:22 +// CHECK: define internal void @__hip_register_globals(ptr %0) { +// CHECK:%1 = call i32 @__hipRegisterFunction(ptr %0, ptr @_Z4kern7TempValIjE, ptr @0, ptr @0, i32 -1, ptr

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-19 Thread Alex Lorenz via Phabricator via cfe-commits
--- erichkeane wrote: > For standards version numbers, we tend to set this to a 'date' more or less, > so something like `20230119`. I wonder if there is value to making THAT how > we do this here too? That's a good idea, I can update it to be a specific date.

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142123#4066805 , @KyleFromKitware wrote: > The refactoring that I've done in D142121 > is most of the way to being able to implement my above proposal. I just need > to shift a few

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi marked an inline comment as done. akyrtzi added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4415 +if (Result.isNot(tok::header_name)) + return true; +// Advance the index of lexed tokens. benlangmuir wrote: > This case is missing a

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi updated this revision to Diff 490629. akyrtzi added a comment. Add test case for dependency directive lexing of ill-formed include inside `__has_include` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142143/new/

[PATCH] D142113: [clang][nfc] refactor Module::Header to use OptionalFileEntryRef

2023-01-19 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 490624. rmaz added a comment. rebase on last successful build: https://buildkite.com/llvm-project/llvm-main/builds/6356 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142113/new/ https://reviews.llvm.org/D142113

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4420 + DepDirectives.front().Tokens[NextDepDirectiveTokenIndex]; + if (BufferStart + NextTok.Offset >= BufferPtr) +break; benlangmuir wrote: > How do we know this will

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I can relax the warning to note to be on the same page with GCC, the reason I didn't is that similar things in DiagnosticDriverKinds.td are warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. Basically, anything that extends `HeaderGuardCheck` (or `HeaderGuardBase` from D142121 ) is really just a fancy configuration option, rather than a separate check, and should be treated as such. My proposal is this: 1. Create

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Sorry, I double checked. '-fstack-protector -fno-stack-protector' will not result in warnings. So the patch LGTM. So gentoo people can add -fno-stack-protector to suppress warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D142123#4066460 , @aaron.ballman wrote: > In D142123#4066447 , @lebedev.ri > wrote: > >> In D142123#4066351 , @njames93 >> wrote: >> >>>

[PATCH] D141868: [Clang] [Sema] Removed a fix-it for system headers

2023-01-19 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/docs/ReleaseNotes.rst:356 ^^^ +- Disabled FIT-IT suggested for a case of bad conversion in system

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added a comment. In D142046#4066758 , @yonghong-song wrote: > @ast With this patch, gentoo clang compilation will hit the warning even if > people appends -fno-stack-protector. Is this okay? In general, if the option > is '-fstack-protector

  1   2   3   >