[clang] [clang-format] Add .clang-format-ignore for ignoring files (PR #76327)

2023-12-28 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/76327 >From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 24 Dec 2023 01:18:55 -0800 Subject: [PATCH 1/7] [clang-format] Add .clang-format.ignore for ignoring files Closes

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -184,13 +199,24 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() || Ty->

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -105,13 +105,34 @@ static bool isValidBaseType(QualType QTy) { if (RD->hasFlexibleArrayMember()) return false; // RD can be struct, union, class, interface or enum. -// For now, we only handle struct and class. -if (RD->isStruct() || RD->isClass()) +

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -184,13 +205,59 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() || Ty->

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -4598,8 +4602,7 @@ LValue CodeGenFunction::EmitLValueForField(LValue base, if (base.getTBAAInfo().isMayAlias() || rec->hasAttr() || FieldType->isVectorType()) { FieldTBAAInfo = TBAAAccessInfo::getMayAliasInfo(); - } else if (rec->isUnion()) { -// TODO: S

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/76553 This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef` from LangRef

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-clang Author: Yingwei Zheng (dtcxzyw) Changes This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poi

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Yingwei Zheng (dtcxzyw) Changes This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef` f

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) { verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", Style); + + verifyFormat("[[maybe_unused]]\n" + "foo f;", + Style); owenca w

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) { verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", Style); + + verifyFormat("[[maybe_unused]]\n" + "foo f;", owenca wrote: ```suggestion

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Mark de Wever via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" mordante wrote: returning an empty string give

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/76492 >From ec31d400915dba372501c49db8bab7c8123228df Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 28 Dec 2023 02:47:04 -0500 Subject: [PATCH] [clangd] Avoid crash when summarizing pointer-to-member exp

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > btw, it looks like there is a FIXME > (https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprCXX.cpp#L677) > for supporting this particular case. I saw it, but I'm not clear on what that would look like. Which member function a member function pointer resolv

[clang-tools-extra] dbd1fb8 - [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (#76492)

2023-12-28 Thread via cfe-commits
Author: Nathan Ridge Date: 2023-12-29T02:18:48-05:00 New Revision: dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e URL: https://github.com/llvm/llvm-project/commit/dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e DIFF: https://github.com/llvm/llvm-project/commit/dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e.diff

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/76492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Yingwei Zheng via cfe-commits
@@ -206,6 +210,17 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = { {"zvfbfwma", RISCVExtensionVersion{0, 8}}, }; +static const RISCVProfile SupportedProfiles[] = { +{"rvi20u32", "rv32i"}, dtcxzyw wrote: Profile names shou

[clang] [llvm] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,112 @@ +// RUN: %clang -### -c %s 2>&1 -march=rvi20u32 | FileCheck -check-prefix=RVI20U32 %s +// RVI20U32: "-target-cpu" "generic-rv32" +// RVI20U32: "-target-feature" "-a" +// RVI20U32: "-target-feature" "-c" +// RVI20U32: "-target-feature" "-d" +// RVI20U32: "-target

[clang] [llvm] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Wang Pengcheng via cfe-commits
W-angler wrote: Current implementation is based on the comment(https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/36#issuecomment-1867859642), not the RFC. @dtcxzyw https://github.com/llvm/llvm-project/pull/76357 ___ cfe-commits maili

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: But "module: =" doesn't look

<    1   2   3