[clang] 984554f - [clang][DR] Test and mark DR1479 as complete

2022-03-29 Thread Markus Böck via cfe-commits
Author: Markus Böck Date: 2022-03-29T09:28:32+02:00 New Revision: 984554f846c44d4017be5b6e3bd694cc233ce7bc URL: https://github.com/llvm/llvm-project/commit/984554f846c44d4017be5b6e3bd694cc233ce7bc DIFF: https://github.com/llvm/llvm-project/commit/984554f846c44d4017be5b6e3bd694cc233ce7bc.diff L

[PATCH] D122620: [clang][DR] Test and mark DR1479 as complete

2022-03-29 Thread Markus Böck 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 rG984554f846c4: [clang][DR] Test and mark DR1479 as complete (authored by zero9178). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122567: [X86][AMX] enable amx cast intrinsics in FE.

2022-03-29 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5413-5415 +if (PTy->isX86_AMXTy()) + ArgValue = Builder.CreateIntrinsic(Intrinsic::x86_cast_vector_to_tile, + {ArgValue->getType()}, {A

[PATCH] D122567: [X86][AMX] enable amx cast intrinsics in FE.

2022-03-29 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5413-5415 +if (PTy->isX86_AMXTy()) + ArgValue = Builder.CreateIntrinsic(Intrinsic::x86_cast_vector_to_tile, + {ArgValue->getType()}, {ArgVal

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. rebase? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/ https://reviews.llvm.org/D122077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D122567: [X86][AMX] enable amx cast intrinsics in FE.

2022-03-29 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5413-5415 +if (PTy->isX86_AMXTy()) + ArgValue = Builder.CreateIntrinsic(Intrinsic::x86_cast_vector_to_tile, + {ArgValue->getType()}, {A

[PATCH] D122231: [clang][dataflow] Add support for `value_or` in a comparison.

2022-03-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:270 + // needed. + BoolValue &ComparisonValue = MakeValue(Env, *HasValueVal); + auto *ComparisonExprLoc = ymandel wrote: > sgatev wrote: > > yma

[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

2022-03-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Can you put provide some flag? Or -fstrict-aliasing controls this generation? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122573/new/ https://reviews.llvm.org/D122573 ___ cfe

[PATCH] D122629: [RISCV] Add index check for vset/vget

2022-03-29 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng accepted this revision. kito-cheng 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/D122629/new/ https://reviews.llvm.org/D122629

[clang] de30408 - [OpenCL] opencl-c.h: remove a/b/c/i/p/n/v arg names

2022-03-29 Thread Sven van Haastregt via cfe-commits
Author: Sven van Haastregt Date: 2022-03-29T10:16:27+01:00 New Revision: de30408b3b0a012f902b8565fa0b7625c1d5fec6 URL: https://github.com/llvm/llvm-project/commit/de30408b3b0a012f902b8565fa0b7625c1d5fec6 DIFF: https://github.com/llvm/llvm-project/commit/de30408b3b0a012f902b8565fa0b7625c1d5fec6.

[PATCH] D118370: [clang-tidy] bugprone-signal-handler: Message improvement and code refactoring.

2022-03-29 Thread Whisperity via Phabricator via cfe-commits
whisperity accepted this revision. whisperity added a comment. This revision is now accepted and ready to land. Alright, I think this is good to go. I like that it makes it clear that the called function is coming from some external source (system header or otherwise). Repository: rG LLVM Gi

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-03-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:153 +diag(HandlerLambda->getBeginLoc(), + "lambda function is not allowed as signal handler (until C++17)") +<< HandlerLambda->getSourceRange();

[PATCH] D122104: [X86][regcall] Support passing / returning structures

2022-03-29 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5238 + for (unsigned i = 0; i < IRCallArgs.size(); ++i) +LargestVectorWidth = std::max(LargestVectorWidth, + getMaxVectorWidth(IRCallArgs[i]->getType())); ---

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Why is this fold preferable to `(X & (X-1)) == 0`? At least on all architectures without native population count, the binary-and based test is preferable and it might even be better with it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D122077#3413550 , @joerg wrote: > Why is this fold preferable to `(X & (X-1)) == 0`? At least on all > architectures without native population count, the binary-and based test is > preferable and it might even be better with

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-29 Thread serge 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 rGf5c666742f7b: [doc] Rely on tblgen to dump supported options value when generating doc (authored by serge-sans-paille). Repository: rG LLVM Github

[clang] f5c6667 - [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-29 Thread via cfe-commits
Author: serge-sans-paille Date: 2022-03-29T12:25:33+02:00 New Revision: f5c666742f7bb4ae79ec79c8acf61dced4d37cc9 URL: https://github.com/llvm/llvm-project/commit/f5c666742f7bb4ae79ec79c8acf61dced4d37cc9 DIFF: https://github.com/llvm/llvm-project/commit/f5c666742f7bb4ae79ec79c8acf61dced4d37cc9.d

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:245 +if (const auto *SuperClassDecl = Decl->getSuperClass()) { + SuperClass.Name = SuperClassDecl->getObjCRuntimeNameAsString(); + SuperClass.USR = API.recordUSR(SuperClassDecl); ---

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto updated this revision to Diff 418832. hkmatsumoto added a comment. Sync with main branch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/ https://reviews.llvm.org/D122077 Files: llvm/lib/Transforms/InstCombine/InstCombineAnd

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int Test3() { return Foo<42>() + Bar(); } +temp

[PATCH] D122064: [clang-format][docs] Fix incorrect 'clang-format 11' option markers

2022-03-29 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry added a comment. Hi. Could you deliver this, please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122064/new/ https://reviews.llvm.org/D122064 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In D122077#3413565 , @xbolva00 wrote: > In D122077#3413550 , @joerg wrote: > >> Why is this fold preferable to `(X & (X-1)) == 0`? At least on all >> architectures without native populatio

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:915 +/// Fold (icmp eq ctpop(X) 1) | (icmp eq X 0) into (icmp ult ctpop(X) 2) and +/// fold (icmp ne ctpop(X) 1) & (icmp ne X 0) into (icmp uge ctpop(X) 2). +static Value *foldIsPowe

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:642-648 +// Instantiate template for FunctionDecl. +template FunctionSignature +DeclarationFragmentsBuilder::getFunctionSignature(const FunctionDecl *); + +// Instantiate template for ObjCMethod

[PATCH] D122648: [clang][extractapi] Tie API and serialization to the FrontendAction

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, ributzka, QuietMisdreavus. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make the API records a property of the action instead of the ASTVisitor so

[PATCH] D122556: [RISCV] Add definitions for Xiangshan processors.

2022-03-29 Thread luxufan via Phabricator via cfe-commits
StephenFan added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:547 +def : ProcessorModel<"xiangshan-nanhu", NoSchedModel, [Feature64Bit, + FeatureStdExtM, + F

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:245 +if (const auto *SuperClassDecl = Decl->getSuperClass()) { + SuperClass.Name = SuperClassDecl->getObjCRuntimeNameAsString(); + SuperClass.USR = API.recordUSR(SuperClassDecl); ---

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang requested changes to this revision. dang added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:660 + +// Subheading of an Objective-C method is a `+` or `-` sign indicating whether +// it's a class met

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-29 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd updated this revision to Diff 418861. mgehre-amd added a comment. Herald added a subscriber: dexonsmith. - Remove diagnostics for float-to-bitint - Remove lexer changes (will be another PR) - Add -fexperimental-max-bitint-width=N Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-29 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:315 #define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) -#define BENIGN_VALUE_LANGOPT(Name, Type, Bits, Default, Description) +#define BENIGN_VALUE_LANGOPT(Name, Bits, Default, De

[PATCH] D122589: Additionally set f32 mode with denormal-fp-math

2022-03-29 Thread David Candler via Phabricator via cfe-commits
dcandler updated this revision to Diff 418865. dcandler added a comment. Added a test that checks attributes based on the -fdenormal-fp-math and -fdenormal-fp-math-f32 flags. Only the cases where -fdenormal-fp-math is set to preserve-sign or positive-zero and -fdenormal-fp-math-f32 is unset are

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:915 +/// Fold (icmp eq ctpop(X) 1) | (icmp eq X 0) into (icmp ult ctpop(X) 2) and +/// fold (icmp ne ctpop(X) 1) & (icmp ne X 0) into (icmp uge ctpop(X) 2). +static Value *foldI

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto updated this revision to Diff 418869. hkmatsumoto added a comment. Create ctpop(X) > 1 instead of ctpop(X) >= 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/ https://reviews.llvm.org/D122077 Files: llvm/lib/Transforms/Ins

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel accepted this revision. spatel 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/D122077/new/ https://reviews.llvm.org/D122077 ___

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: eli.friedman, rjmccall, jyknight, erichkeane, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Member access for an atomic structure or union is uncon

[PATCH] D122069: [Object] Add binary format for bundling offloading metadata

2022-03-29 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added reviewers: grokos, ABataev, ronlieb, tianshilei1992. JonChesterfield added a comment. Added some reviewers. I'd much prefer this used an existing binary format, DIY is prone to errors and maintenance hassles down the road. Don't care as much about which format as about it b

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto added a comment. @spatel Since I don't have commit access, can you land this patch? Please use "Hirochika Matsumoto as my identity. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/ https://reviews.llvm.org/D122077 ___

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaExprMember.cpp:1300 + // warning defaults to an error. + if (const auto *ATy = BaseType->getAs()) { +S.Diag(OpLoc, diag::warn_atomic_member_access); This seems to apply to both C and C++. I g

[clang] 5b6207f - [ADT] Flesh out HLSL raytracing environments

2022-03-29 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-03-29T09:43:03-05:00 New Revision: 5b6207f3cd5e266f3fda8085fcebe6dcf45dacbf URL: https://github.com/llvm/llvm-project/commit/5b6207f3cd5e266f3fda8085fcebe6dcf45dacbf DIFF: https://github.com/llvm/llvm-project/commit/5b6207f3cd5e266f3fda8085fcebe6dcf45dacbf.diff

[PATCH] D122657: [NFC] Use range based loop.

2022-03-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: v.g.vassilev, rsmith. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://re

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-03-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 418876. balazske added a comment. rebase, applied the review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ https://reviews.llvm.org/D118996 Files: clang-tools-extra/clang-tidy/bugprone/

[PATCH] D122657: [NFC] Use range based loop.

2022-03-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 418877. junaire added a comment. use const when possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122657/new/ https://reviews.llvm.org/D122657 Files: clang/lib/AST/ASTDiagnostic.cpp Index: clang/lib/

[PATCH] D122231: [clang][dataflow] Add support for `value_or` in a comparison.

2022-03-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 418880. ymandel marked 3 inline comments as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122231/new/ https://reviews.llvm.org/D122231 Files: clang/lib/Analysi

[PATCH] D122657: [NFC] Use range based loop.

2022-03-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 418882. junaire added a comment. Simplify code a little bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122657/new/ https://reviews.llvm.org/D122657 Files: clang/lib/AST/ASTDiagnostic.cpp Index: clang/l

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-03-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 29 inline comments as done. balazske added a comment. Code is updated, documentation (rst) not yet. I want to use `\` format of tags in the code comments. Many review comments are now out of place (because the list of functions was moved around in the file.) C

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-03-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 5 inline comments as done. balazske added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:254 + return DC->isTranslationUnit(); +}*/ + This will be removed (`FunctionDecl::isGlobal` should work for this p

[PATCH] D122069: [Object] Add binary format for bundling offloading metadata

2022-03-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D122069#3413960 , @JonChesterfield wrote: > Added some reviewers. I'd much prefer this used an existing binary format, > DIY is prone to errors and maintenance hassles down the road. Don't care as > much about which format a

[PATCH] D122231: [clang][dataflow] Add support for `value_or` in a comparison.

2022-03-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 7 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:142 + // `opt.value_or(nullptr) != nullptr` and `opt.value_or(0) != 0`. Ideally, + // we'd support this pattern for any

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprMember.cpp:1300 + // warning defaults to an error. + if (const auto *ATy = BaseType->getAs()) { +S.Diag(OpLoc, diag::warn_atomic_member_access); -

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 418884. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Added test cases based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122656/new/ https://reviews.llvm.org/D122656 Files: clang/docs/R

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaExprMember.cpp:1300 + // warning defaults to an error. + if (const auto *ATy = BaseType->getAs()) { +S.Diag(OpLoc, diag::warn

[PATCH] D122659: [clang][preprocessor] Allow calling DumpToken() on annotation tokens

2022-03-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `getSpelling()` call otherwise ultimately runs into an assertion because `getL

[PATCH] D122231: [clang][dataflow] Add support for `value_or` in a comparison.

2022-03-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Wow. This did take some iterations and I feel like I just added to the confusion at some point :D But the latest iteration looks much simpler and I'm confident it is right this time. Tha

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-29 Thread Sanjay Patel 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 rGa3cffc11509b: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2 (authored by hkmatsumoto, committed by spatel). Repository: rG LLVM

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-03-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. const auto & var = ObjectWithSideEffects(); Fixes https://github.com/llvm/llvm-project/issues/54489 Repository: rG LL

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-03-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 418891. cor3ntin added a comment. Cleanup test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122661/new/ https://reviews.llvm.org/D122661 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaCXX/warn-unused

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Danny Mösch via Phabricator via cfe-commits
SimplyDanny added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int Test3() { return Foo<42>() + Bar(); } +templa

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa created this revision. yihanaa added reviewers: erichkeane, aaron.ballman. yihanaa added projects: LLVM, clang. Herald added a project: All. yihanaa requested review of this revision. Herald added a subscriber: cfe-commits. 1. Add constant array support for __builtin_dump_sturct, the style

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int Test3() { return Foo<42>() + Bar(); } +temp

[PATCH] D120662: [clang-offload-bundler] add -input/-output options

2022-03-29 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/D120662/new/ https://reviews.llvm.org/D120662 __

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This looks to be quite the large patch, can you split this up into individual patches? It isn't clear to me what all is going on everywhere. Comment at: clang/docs/ReleaseNotes.rst:93 and `51641

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa updated this revision to Diff 418895. yihanaa added a comment. Remove unnecessary code format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122662/new/ https://reviews.llvm.org/D122662 Files: clang/docs/LanguageExtensions.rst clang/doc

[PATCH] D122231: [clang][dataflow] Add support for `value_or` in a comparison.

2022-03-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. In D122231#3414109 , @xazax.hun wrote: > Wow. This did take some iterations and I feel like I just added to the > confusion at some point :D But the latest iteration looks much simpler an

[clang-tools-extra] f10cee9 - [clang-tidy] Fix test failing on 32-bit architectures due to missing `__int128_t`

2022-03-29 Thread Danny Mösch via cfe-commits
Author: Danny Mösch Date: 2022-03-29T17:58:12+02:00 New Revision: f10cee91ae07022e602d6a47e504e86796d49a7d URL: https://github.com/llvm/llvm-project/commit/f10cee91ae07022e602d6a47e504e86796d49a7d DIFF: https://github.com/llvm/llvm-project/commit/f10cee91ae07022e602d6a47e504e86796d49a7d.diff L

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Danny Mösch via Phabricator via cfe-commits
SimplyDanny marked 3 inline comments as done. SimplyDanny added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. Thanks for review @erichkeane ,maybe i should split this patch. Comment at: clang/docs/ReleaseNotes.rst:93 and `51641 `_. +- The builtin function __builtin_dump_struct would crash clang when the targ

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-03-29 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk created this revision. hvdijk added a reviewer: rsmith. hvdijk added a project: clang. Herald added a project: All. hvdijk requested review of this revision. Herald added a subscriber: cfe-commits. The Itanium C++ ABI says prefixes are substitutable. For most prefixes we already handle thi

[PATCH] D121951: [AMDGPU][OpenCL] Add "amdgpu-no-hostcall-ptr" in Clang codegen pre-COV_5

2022-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. In D121951#3411856 , @scott.linder wrote: > @yaxunl Does excluding device-libs via COV_None make sense? That should work. Hopefully, it can cover most spurious warnings. Repository: rG LLVM Gith

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-03-29 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. Question: does this need to be covered by `-fclang-abi-compat=` when the prior mangling resulted in names that even llvm-cxxfilt agreed made no sense? (If it is needed, it should be an easy change.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa updated this revision to Diff 418901. yihanaa added a comment. split another patch to fix ReleaseNotes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122662/new/ https://reviews.llvm.org/D122662 Files: clang/docs/ReleaseNotes.rst clang

[PATCH] D121951: [AMDGPU][OpenCL] Add "amdgpu-no-hostcall-ptr" in Clang codegen pre-COV_5

2022-03-29 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added a comment. In D121951#3411856 , @scott.linder wrote: > @yaxunl Does excluding device-libs via COV_None make sense? > > @sameerds Would you still rather we just not add this attribute in the > frontend at all? I'm OK with it if that is the

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122662#3414199 , @erichkeane wrote: > This looks to be quite the large patch, can you split this up into individual > patches? It isn't clear to me what all is going on everywhere. Thanks @erichkeane ,i have splited this p

[clang] 3c84e4a - [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-03-29T12:14:36-04:00 New Revision: 3c84e4a0dbd08fc03bbcdd8354a984e0efcf7672 URL: https://github.com/llvm/llvm-project/commit/3c84e4a0dbd08fc03bbcdd8354a984e0efcf7672 DIFF: https://github.com/llvm/llvm-project/commit/3c84e4a0dbd08fc03bbcdd8354a984e0efcf7672.diff

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review, I've commit in 3c84e4a0dbd08fc03bbcdd8354a984e0efcf7672 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122656/new/ https://revi

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'd also suggest splitting into the '3' things that you're trying to accomplish above. The CGBuiltin.cpp code has way too much going on to reasonably review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122662/new/ ht

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122662#3414284 , @erichkeane wrote: > I'd also suggest splitting into the '3' things that you're trying to > accomplish above. The CGBuiltin.cpp code has way too much going on to > reasonably review. These three things ar

[clang] 43b34c9 - Fix a test failure.

2022-03-29 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-03-29T12:27:23-04:00 New Revision: 43b34c981ad303e5e030c7c619cb54997c2fc341 URL: https://github.com/llvm/llvm-project/commit/43b34c981ad303e5e030c7c619cb54997c2fc341 DIFF: https://github.com/llvm/llvm-project/commit/43b34c981ad303e5e030c7c619cb54997c2fc341.diff

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122662#3414284 , @erichkeane wrote: > I'd also suggest splitting into the '3' things that you're trying to > accomplish above. The CGBuiltin.cpp code has way too much going on to > reasonably review. In D122662#3414284

[PATCH] D122648: [clang][extractapi] Tie API and serialization to the FrontendAction

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 418907. dang added a comment. Some errors slipped by when splitting this out of the macros patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122648/new/ https://reviews.llvm.org/D122648 Files: clang/include/

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang marked 7 inline comments as done. dang added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:117 - GlobalRecord(GVKind Kind, StringRef Name, StringRef USR, PresumedLoc Loc, + GlobalRecord(StringRef Name, GVKind Kind, StringRef USR, PresumedLoc Loc,

[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

2022-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D122573#3412109 , @rjmccall wrote: > Hmm. We know that the big picture here, distinguishing pointers by pointee > type, is going to be disruptive and will probably need a specific > enabling/disabling option. I'm not sure tha

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D122662#3414319 , @yihanaa wrote: > In D122662#3414284 , @erichkeane > wrote: > >> I'd also suggest splitting into the '3' things that you're trying to >> accomplish above. The CG

[PATCH] D122662: [Clang][CodeGen] Add constant array support for __builtin_dump_sturct, and beautify dump format

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122662#3414364 , @erichkeane wrote: > In D122662#3414319 , @yihanaa wrote: > >> In D122662#3414284 , @erichkeane >> wrote: >> >>> I'd also s

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang 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/D122495/new/ https://reviews.llvm.org/D122495 ___ cf

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-29 Thread Zixu Wang 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 rG15bf0e567375: [clang][extract-api] Use correct language info from inputs (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[clang] 15bf0e5 - [clang][extract-api] Use correct language info from inputs

2022-03-29 Thread Zixu Wang via cfe-commits
Author: Zixu Wang Date: 2022-03-29T10:06:08-07:00 New Revision: 15bf0e567375c977cf7d7b48465eb1561e890b54 URL: https://github.com/llvm/llvm-project/commit/15bf0e567375c977cf7d7b48465eb1561e890b54 DIFF: https://github.com/llvm/llvm-project/commit/15bf0e567375c977cf7d7b48465eb1561e890b54.diff LOG

[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

2022-03-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Maybe we should try improve our tooling to detect violations in parallel to >> the effort in this patch? I am planning on trying to resurrect the >> type-sanitizer patches. I've also been playing around with a simple tool >> that's inserting assertions to check 2 po

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang marked an inline comment as done. dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:446-457 +void ExtractAPIAction::EndSourceFileAction() { + if (!OS) +return; + + // Setup a SymbolGraphSerializer to write out collected API information

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa created this revision. yihanaa added reviewers: erichkeane, aaron.ballman. Herald added a project: All. yihanaa requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove duplicate items in ReleaseNotes for __builtin_dump_struct, the co

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 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. 2 small bits, otherwise LGTM. Comment at: clang/docs/ReleaseNotes.rst:94 +- The builtin function __builtin_dump_struct would crash clang when the target + struct ha

[PATCH] D122669: [AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic

2022-03-29 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. Herald added subscribers: hsmhsm, foad, Naghasan, ldrumm, kerbowa, hiraditya, t-tye, Anastasia, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm. Herald added a project: All. scott.linder requested review of this revision. Herald added subscribers: ll

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa updated this revision to Diff 418920. yihanaa added a comment. Fixed "Description" issue and removed useless newlines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122668/new/ https://reviews.llvm.org/D122668 Files: clang/docs/ReleaseNot

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. LGTM. Let me know if you need this committed for you, just provide "name " for the commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122668/new/ https://reviews.llvm.org/D122668 _

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa marked 2 inline comments as done. yihanaa added a comment. In D122668#3414445 , @erichkeane wrote: > 2 small bits, otherwise LGTM. Thanks for review @erichkeane ,i have update the diff, but i don’t have commit access, can you land this patch fo

[PATCH] D121951: [AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic

2022-03-29 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 418922. scott.linder retitled this revision from "[AMDGPU][OpenCL] Add "amdgpu-no-hostcall-ptr" in Clang codegen pre-COV_5" to "[AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic". scott.linder edited the summary of this revision. scott.linder adde

[PATCH] D121951: [AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic

2022-03-29 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D121951#3414271 , @sameerds wrote: > In D121951#3411856 , @scott.linder > wrote: > >> @yaxunl Does excluding device-libs via COV_None make sense? >> >> @sameerds Would you still r

[clang] 6c32075 - [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Erich Keane via cfe-commits
Author: wangyihan Date: 2022-03-29T10:30:34-07:00 New Revision: 6c32075d29d4fe3985aa8a98b23c33902190a15d URL: https://github.com/llvm/llvm-project/commit/6c32075d29d4fe3985aa8a98b23c33902190a15d DIFF: https://github.com/llvm/llvm-project/commit/6c32075d29d4fe3985aa8a98b23c33902190a15d.diff LOG

[PATCH] D122668: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes

2022-03-29 Thread Erich Keane via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6c32075d29d4: [Clang][doc][NFC]Remove duplicate items in ReleaseNotes (authored by yihanaa, committed by erichkeane). Repository: rG LLVM Github M

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw marked an inline comment as done. zixuw added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:642-648 +// Instantiate template for FunctionDecl. +template FunctionSignature +DeclarationFragmentsBuilder::getFunctionSignature(const FunctionDecl *);

[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

2022-03-29 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Maybe we should try improve our tooling to detect violations in parallel to > the effort in this patch? I am planning on trying to resurrect the > type-sanitizer patches. I've also been playing around with a simple tool > that's inserting assertions to check 2 pointe

  1   2   >