[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: bogner, beanz, pow2clk. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Preserve vec3 for

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 456563. jackhong12 added a comment. Annotate `*` as UnaryOperator instead of `PointerOrReference` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132911/new/ https://reviews.llvm.org/D132911 Files: clang/li

[PATCH] D131992: [Support] compression proposal for a enum->spec->impl approach

2022-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. (I was out of town last week so I did not respond then.) In D131992#3748306 , @dblaikie wrote: > @MaskRay I think this change is probably the best point of > comparison/demonstration of this patch direction (taking some minor li

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2379 +Prev->is(tok::kw_delete)) + return TT_UnaryOperator; + Why unary here, doesn’t that make it a multiply? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added a comment. In this case, I think it's dereferencing a pointer instead of multiplying two numbers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132911/new/ https://reviews.llvm.org/D132911

[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-30 Thread chenglin.bi via Phabricator via cfe-commits
bcl5980 added a comment. In D125418#3756223 , @efriedma wrote: > There's no way the calling convention can change based on whether you're > calling a function vs. a function pointer. I can't explain why MSVC is > generating different code. I think we

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2022-08-30 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseEarlyExitsCheck.cpp:66 + if (needsParensAfterUnaryNegation(Condition)) { +Diag << FixItHint::CreateInsertion(Condition->getBeginLoc(), "!(") +

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: aaron.ballman, rjmccall, efriedma. Herald added a subscriber: ormris. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. Set the EmulatedTLS option based on `Triple::hasDefaultEmulatedTLS

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: usaxena95, ilya-biryukov. Herald added a project: All. kadircet requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This was showing up in our internal crash collector. I have no idea ho

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. usaxena95 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository

[PATCH] D132920: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: bkramer. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. This fixes the following warning: In file included from ../tools/clang/lib/Tooling/Transformer/Transformer.cpp:9: ../too

[PATCH] D126498: [clangd] Fix hover crashing on integral or enumeral casts

2022-08-30 Thread Georg Kotheimer via Phabricator via cfe-commits
gkll requested review of this revision. gkll marked an inline comment as done. gkll added a comment. Mhm, I think the change here has gone under the radar 🙈 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126498/new/ https://reviews.llvm.org/D126498 __

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. Whenever I tried this option in the past it crashed clangd. I recommend doing some more testing before flipping the switch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132919/new/ https://reviews.llvm.org/D132919 ___

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:340 desc("Enable preview of FoldingRanges feature"), -init(false), +init(true), Hidden, i think we should just retire the flag altogether, ATM this is only

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D132919#3757685 , @Trass3r wrote: > Whenever I tried this option in the past it crashed clangd. > I recommend doing some more testing before flipping the switch. we've a new implementation of folding ranges based on pseudo pa

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 456584. usaxena95 marked an inline comment as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132919/new/ https://reviews.llvm.org/D132919 Files: clang-to

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2381-2385 if (PrevToken->Tok.isLiteral() || PrevToken->isOneOf(tok::r_paren, tok::r_square, tok::kw_true, tok::kw_false, tok::r_brace)) { return TT_B

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132919/new/ https://reviews.llvm.org/D132919 __

[clang-tools-extra] c338735 - [clangd] Enable folding ranges by default.

2022-08-30 Thread Utkarsh Saxena via cfe-commits
Author: Utkarsh Saxena Date: 2022-08-30T12:04:59+02:00 New Revision: c338735020033e49fe36369ce3e49e316b6d2da0 URL: https://github.com/llvm/llvm-project/commit/c338735020033e49fe36369ce3e49e316b6d2da0 DIFF: https://github.com/llvm/llvm-project/commit/c338735020033e49fe36369ce3e49e316b6d2da0.diff

[PATCH] D132919: [clangd] Enable folding ranges by default.

2022-08-30 Thread Utkarsh Saxena 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 rGc33873502003: [clangd] Enable folding ranges by default. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=

2022-08-30 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 456608. melver added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130888/new/ https://reviews.llvm.org/D130888 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Bas

[PATCH] D132920: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-30 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132920/new/ https://reviews.llvm.org/D132920 ___

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2022-08-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Yeah, this makes sense to me if we factor out the commonalities. I agree that it's nicer to have a single option vs. having to specify every single native tool individually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D132853: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-30 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. Thank you for the updated description! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132853/new/ https://reviews.llvm.org/D13

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 accepted this revision. usaxena95 added a comment. This revision is now accepted and ready to land. Thanks. This looks reasonable. As discussed offline, this verifiably fixes the crash but it is hard to come up with a reduced reproducer. Repository: rG LLVM Github Monorepo CHANGES

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

2022-08-30 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. This LGTM but I'd appreciate it if @dblaikie could also give it a once over so we have more than one sets of eyes on the changes in case I've missed something.

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan created this revision. Herald added a project: All. egorzhdan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a valid HTML5 tag. Previously it triggered a Clang error (`HTML start tag prematurely ended, expected attribute

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/test/Sema/warn-documentation.cpp:78 +/// Aaa bbb +int test_html_img4(int); + Could you also add these tests to clang/test/Index/comment-to-html-xml-conversion.cpp to show that the whole tag is captured correct

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

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456624. wyt added a comment. Replace use of virtual functions with sfinea and CRTP to call transfer functions defined by the user. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org

[clang] 31dd025 - [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-30 Thread via cfe-commits
Author: serge-sans-paille Date: 2022-08-30T14:49:37+02:00 New Revision: 31dd0255aeaab7f2270abd0454e835842cfdcbb0 URL: https://github.com/llvm/llvm-project/commit/31dd0255aeaab7f2270abd0454e835842cfdcbb0 DIFF: https://github.com/llvm/llvm-project/commit/31dd0255aeaab7f2270abd0454e835842cfdcbb0.d

[PATCH] D132853: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-30 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG31dd0255aeaa: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1 (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google marked an inline comment as done. luken-google added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1761 - if (Method->isVirtual()) { + if (Method->isVirtual() && !Method->isConsteval()) { if (Method->isPure()) shafik wrote:

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 456641. luken-google added a comment. Change to method call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132874/new/ https://reviews.llvm.org/D132874 Files: clang/docs/ReleaseNotes.rst clang/lib/Cod

[PATCH] D132821: [clang][Parse] Fix crash when emitting template diagnostic

2022-08-30 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef1bb11a34de: [clang][Parse] Fix crash when emitting template diagnostic (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D132821?vs=456389&id=456643#toc Repository: rG LLVM G

[clang] ef1bb11 - [clang][Parse] Fix crash when emitting template diagnostic

2022-08-30 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2022-08-30T15:11:38+02:00 New Revision: ef1bb11a34de2822514878b99b442575a022a658 URL: https://github.com/llvm/llvm-project/commit/ef1bb11a34de2822514878b99b442575a022a658 DIFF: https://github.com/llvm/llvm-project/commit/ef1bb11a34de2822514878b99b442575a022a658.diff LO

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:220 void UseEqualsDefaultCheck::registerMatchers(MatchFinder *Finder) { - // Skip unions since constructors with empty bodies behave differently - // in comparison wi

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-bounds-constant-array-index.cpp:2 // RUN: %check_clang_tidy %s cppcoreguidelines-pr

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

2022-08-30 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa updated this revision to Diff 456646. yihanaa added a comment. Use custom seam checking on __builtin_assume_aligned. C++ not allow implicit cast from volatile void * to const void *, but C allowed and only emit a warning. This is a general case, volatile in __builtin_assume_aligned just

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

2022-08-30 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D131979#3756474 , @rjmccall wrote: > In D131979#3756067 , @yihanaa wrote: > >> In D131979#3756006 , @rjmccall >> wrote: >> >>> In D131979#3753

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

2022-08-30 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. Now that parameter checking is generic, I think it would be better to use both common seam checking and custom sema checking, like Diff 456142 (https://reviews.llvm.org/differential/diff/456142/), what do you think about? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 456662. yusuke-kadowaki marked 9 inline comments as done. yusuke-kadowaki added a comment. - Fix the newline condition - Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://re

[PATCH] D129488: [Sema] Fix evaluation context of immediate functions in default arguments

2022-08-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 456663. ilya-biryukov added a comment. - Special-case the std::source_location::current calls, delay until codegen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129488/new/ https://reviews.llvm.org/D12948

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments MyDeveloperDay wrote: > may be AcrossEmptyLines should be a number (to mean the number of empty lines) We need

[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. ilya-biryukov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. They must be evaluated in the context where

[PATCH] D129488: [Sema] Fix evaluation context of immediate functions in default arguments

2022-08-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a reviewer: aaron.ballman. ilya-biryukov added a subscriber: aaron.ballman. ilya-biryukov added a comment. This seems to mostly work and ready for another round of review, but I still need to update the codegen test, it seems it has caught an error with default-initilization

[clang] fafa48e - [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-08-30 Thread via cfe-commits
Author: zhijian Date: 2022-08-30T10:38:38-04:00 New Revision: fafa48e7b51899f0fda80b0962679d57a1f58169 URL: https://github.com/llvm/llvm-project/commit/fafa48e7b51899f0fda80b0962679d57a1f58169 DIFF: https://github.com/llvm/llvm-project/commit/fafa48e7b51899f0fda80b0962679d57a1f58169.diff LOG:

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-08-30 Thread 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 rGfafa48e7b518: [AIX][clang][driver] Check the command string to the linker for exportlist opts (authored by zhijian ). Repositor

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I'm confused about this new strategy of special-casing `source_location::current()`. Isn't it wrong to eagerly evaluate _other_ calls in default args, as well? ISTM that source_location is simply _exposing_ the bug in where we evaluate these expressions, but that it's

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: jyknight. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow up to https://reviews.llvm.org/D126864, a

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan updated this revision to Diff 456674. egorzhdan added a comment. - Add tests for conversion of doc comments to HTML/XML - Fix a bug in `StringRef` -> `CXString` conversion logic for an empty string Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan marked an inline comment as done. egorzhdan added inline comments. Comment at: clang/test/Sema/warn-documentation.cpp:78 +/// Aaa bbb +int test_html_img4(int); + gribozavr2 wrote: > Could you also add these tests to > clang/test/Index/comment-to-html-x

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

2022-08-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, jhuber6 wrote: > yaxun

[PATCH] D132945: [clang] Skip re-building lambda expressions in parameters to consteval fns.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a project: All. usaxena95 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes: https://github.com/llvm/llvm-project/issues/56183 Fixes: https://github.com/llvm/llvm-project/issues/51695 Fixes:

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

2022-08-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, yaxunl wrote: > jhube

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 456682. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ https://reviews.llvm.org/D128095 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema/Sema.h clang/include/clang/Sema/SemaInternal.

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack. mizvekov wrote: > erichkeane wro

[PATCH] D132945: [clang] Skip re-building lambda expressions in parameters to consteval fns.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 456684. usaxena95 added a comment. More tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132945/new/ https://reviews.llvm.org/D132945 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaExpr.cpp

[PATCH] D132945: [clang] Skip re-building lambda expressions in parameters to consteval fns.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 456685. usaxena95 added a comment. new line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132945/new/ https://reviews.llvm.org/D132945 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaExpr.cpp cl

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Happy enough, LGTM. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { +

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129488#3758449 , @jyknight wrote: > I'm confused about this new strategy of special-casing > `source_location::current()`. Isn't it wrong to eagerly evaluate _other_ > calls in default args, as well? ISTM that source_l

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/tools/libclang/CXString.cpp:85 + if (String.empty()) +return createEmpty(); + Please split this change into a separate patch and add a unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D132950: Remove unnecessary `REQUIRES: x86-registered-target` from ps4/ps5 driver tests.

2022-08-30 Thread Ying Yi via Phabricator via cfe-commits
MaggieYi created this revision. MaggieYi added reviewers: probinson, wristow. Herald added a subscriber: pengfei. Herald added a project: All. MaggieYi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some PS4/PS45 tests include the line `RE

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. inclyc added a reviewer: aaron.ballman. Herald added a project: All. inclyc added reviewers: rsmith, clang-language-wg. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes: https://github.com/llvm/llv

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:191 + AnalysisOutputs AO{AnnotatedCode, Context, Target, CFCtx, + Analysis, InitEnv, {}}; + if (AI.SetupTest) { --

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4797 } +// Can't access properties of an incomplete type. +if (!RD->hasDefinition()) { It seems to me that we shouldn't GET to this function with an incomplete type. I sus

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Also, without a reduced example lit-test, we shouldn't be making changes. Use creduce or something, but PLEASE come back with a lit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132918/new/ https://reviews.llvm.o

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Just a first glance at the patch, will try to do a more comprehensive review later. Comment at: clang/lib/Sema/SemaConcept.cpp:823 + // + // Using the pattern is suffice because the partial ordering rules guarantee + // the template paramaters are

[PATCH] D132950: Remove unnecessary `REQUIRES: x86-registered-target` from ps4/ps5 driver tests.

2022-08-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM. Checking the tests over by eye, it looks like all run the clang driver with `-###` or `-E` so only the driver itself is invoked, and no backend dependency exists. Repository:

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1760 +// Special builder emitting no diagnostics +SemaDiagnosticBuilder(Sema &S) : S(S) {} SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, I haven't look

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:652 ASTContext &ASTCtx) { -ASSERT_THAT(Results, ElementsAre(Pair("p4", _), Pair("p3", _), -

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1760 +// Special builder emitting no diagnostics +SemaDiagnosticBuilder(Sema &S) : S(S) {} SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, erichkeane wrote:

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! Can you be sure to add more information to the description so that reviewers more quickly understand why the changes are being made? In terms of the changes themselves, I don't think they're heading in the right direction just yet.

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I was also under impression that this should fall out of the C++ semantics, but after playing around with it I am not so sure anymore. > Isn't it wrong to eagerly evaluate _other_ calls in default args, as well? > ISTM that source_location is simply _exposing_ the

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456699. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/ https://reviews.llvm.org/D132377 Files: clang/unittests/Analysis/Flow

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:191 + AnalysisOutputs AO{AnnotatedCode, Context, Target, CFCtx, + Analysis, InitEnv, {}}; + if (AI.SetupTest) { ymandel wrote: > formatting s

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:652 ASTContext &ASTCtx) { -ASSERT_THAT(Results, ElementsAre(Pair("p4", _), Pair("p3", _), - Pair("p2", _), Pair("p1", _))

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4797 } +// Can't access properties of an incomplete type. +if (!RD->hasDefinition()) { erichkeane wrote: > It seems to me that we shouldn't GET to this function with an incomple

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1761 - if (Method->isVirtual()) { + if (Method->isVirtual() && !Method->isConsteval()) { if (Method->isPure()) ---

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D132352#3757433 , @ChuanqiXu wrote: > In D132352#3757415 , @rjmccall > wrote: > >> Stackful coroutine bodies should be straightforward to support on top of the >> other work you've b

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Aaron Siddhartha Mondal via Phabricator via cfe-commits
aaronmondal requested changes to this revision. aaronmondal added a comment. This revision now requires changes to proceed. I just noticed that there probably needs to be one change. The doc sometimes describes `-fprebuilt-module-interface`, which is not a valid option. I think the occurrences w

[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=

2022-08-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Another test under llvm-project/clang/test/CodeGen/ is needed which tests IR generated from C/C++ contains expected info. Random example clang/test/CodeGen/attr-noundef.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[clang] 3a0309c - [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-08-30T18:58:38+02:00 New Revision: 3a0309c53674be56b5cfce038d78a0c2c6e2a98c URL: https://github.com/llvm/llvm-project/commit/3a0309c53674be56b5cfce038d78a0c2c6e2a98c DIFF: https://github.com/llvm/llvm-project/commit/3a0309c53674be56b5cfce038d78a0c2c6e2a98c.dif

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a0309c53674: [clang] Improve diagnostics for expansion length mismatch (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/ ht

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack. --

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan marked an inline comment as done. egorzhdan added inline comments. Comment at: clang/tools/libclang/CXString.cpp:85 + if (String.empty()) +return createEmpty(); + gribozavr2 wrote: > Please split this change into a separate patch and add a unit tes

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > So I think the most valuable optimizations are low-level optimizations to > `ImmutableMap`. There were a few suggestions on the mailing list to use > something more modern than the AVL trees under the hood but I don't think > authors found much success with those. Ba

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:58 +/// them before we initialize the ExternalSemaSource base class. +struct ChainedHLSLExternalSemaSourceMembers { + ChainedHLSLExternalSemaSourceMembers(ExternalSemaSource *ExtSema)

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-08-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 12 inline comments as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1252 +AllocInfo->Info.getMinLifetime()); + SmallVector StackIds; + std::set StackHashSet; ---

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-08-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 456710. tejohnson marked 5 inline comments as done. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128142/new/ https://reviews.llvm.org/D128142 Files: clang/lib/F

[clang] 739a747 - [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-30 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-08-30T12:18:44-05:00 New Revision: 739a747b2368652155ac78f0ac341a6bfe640c60 URL: https://github.com/llvm/llvm-project/commit/739a747b2368652155ac78f0ac341a6bfe640c60 DIFF: https://github.com/llvm/llvm-project/commit/739a747b2368652155ac78f0ac341a6bfe640c60.diff

[PATCH] D132672: [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG739a747b2368: [Docs] [HLSL] Documenting HLSL Entry Functions (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132672/new/ https://reviews.

[clang] de8f372 - [Docs] Fixing incorrect document title

2022-08-30 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-08-30T12:19:05-05:00 New Revision: de8f372bfec7070a364fac57fb5f201fc2d8cb22 URL: https://github.com/llvm/llvm-project/commit/de8f372bfec7070a364fac57fb5f201fc2d8cb22 DIFF: https://github.com/llvm/llvm-project/commit/de8f372bfec7070a364fac57fb5f201fc2d8cb22.diff

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 456715. isuckatcs marked an inline comment as done. isuckatcs added a comment. Removed the unnecessary extra RUN command. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132654/new/ https://reviews.llvm.org/D132654 Files: clang-tools-extra/clang

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129488#3758798 , @ilya-biryukov wrote: > I was also under impression that this should fall out of the C++ semantics, > but after playing around with it I am not so sure anymore. I'm also starting to question that. :-)

[PATCH] D131153: AArch64: disable asynchronous unwind by default for MachO.

2022-08-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I just discovered this and was about to post on Discourse about it. Glad you're already on it :) I don't think this is quite correct though? It'll turn off unwind tables for AArch64 entirely, whereas we want to keep sync unwind tables. If we want to minimize changes to

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/TokenAnnotator.cpp:2381-2385 if (PrevToken->Tok.isLiteral() || PrevToken->isOneOf(tok::r_paren, tok::r_square,

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 456731. beanz added a comment. Updating based on PR feedback and rebasing. - Rebased on main today - Made const subscript return type const & Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131268/new/ https://rev

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > We have the VariableArrayType to represent a VLA type and I think we're using > that type when we should be using a variably modified type The clang AST for function signatures encodes two types: the type as written, and the type after promotion. Semantic analysis a

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3524 + // Preserve vec3 for HLSL. + CmdArgs.push_back("-fpreserve-vec3-type"); } Preserving vec3 is required for HLSL correctness, this shouldn't be tied to the DXC driver mode. In

[PATCH] D132962: [clangd][ObjC] Improve completions for protocols + category names

2022-08-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. - Render prot

  1   2   >