[PATCH] D132398: Allow static consteval member functions to be used in const expressions.

2022-08-22 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D132398 Files: clang/lib/AST/ExprConstant.cpp clang

[PATCH] D132398: Allow static consteval member functions to be used in const expressions.

2022-08-23 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 454942. usaxena95 added a comment. only allow static members with this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132398/new/ https://reviews.llvm.org/D132398 Files: clang/lib/AST/ExprConstant.cpp cl

[PATCH] D132398: Allow static consteval member functions to be used in const expressions.

2022-08-23 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 454946. usaxena95 added a comment. Add constexpr tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132398/new/ https://reviews.llvm.org/D132398 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX

[PATCH] D132398: Allow constant static members to be used with 'this'

2022-08-23 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 454947. usaxena95 added a comment. Format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132398/new/ https://reviews.llvm.org/D132398 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/cxx2a-conste

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D132659 Files: clang/include/clang/Sema/Sema.h clan

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 455667. usaxena95 marked 6 inline comments as done. usaxena95 added a comment. Thanks for the quick review. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132659/new/ https://reviews.llvm.o

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 455668. usaxena95 added a comment. Added release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132659/new/ https://reviews.llvm.org/D132659 Files: clang/docs/ReleaseNotes.rst clang/include/clang/S

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. FYI: Alternative fix for this issue: https://reviews.llvm.org/D132659 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119651/new/ https://reviews.llvm.org/D119651 ___ cfe-commits

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-26 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 rG4a043c637646: PotentiallyEvaluatedContext in a ImmediateFunctionContext. (authored by usaxena95). Changed prior to commit: https://reviews.llvm.or

[PATCH] D131154: FoldingRanges: Handle LineFoldingsOnly clients.

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

[PATCH] D131154: FoldingRanges: Handle LineFoldingsOnly clients.

2022-08-26 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp:391 +/* No folding for this comment. +*/ int b_token=0; + )cpp", kadircet wrote: > it'd be nice to have a test case like: > ``` > templ

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-23 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. Implement https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2468r2.html. Primarily we now accept template st

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-27 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 463237. usaxena95 added a comment. Added better diagnostic for non-const symmetric operator==. Added release notes. Updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llv

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 464010. usaxena95 marked 7 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 Files: clang/do

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 464012. usaxena95 added a comment. Added test for static operator. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 Files: clang/docs/ReleaseNotes.rst clang/incl

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-09-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:887 -bool OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed( -OverloadedOperatorKind Op) { ilya-biryukov wrote: > Why do we need to move this from `OperatorRewriteInfo`

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-05 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 465393. usaxena95 marked 11 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 Files: clang/d

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-05 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/include/clang/Sema/Overload.h:1024 /// candidates for operator Op. - bool shouldAddReversed(OverloadedOperatorKind Op); + bool mayAddReversed(OverloadedOperatorKind Op); ilya-biryukov wrote: >

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-06 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 465686. usaxena95 marked 2 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 Files: clang/do

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-06 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 rG38b9d313e694: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D135608 Files: clang/www/cxx_status.html Index: cla

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. Sent out https://reviews.llvm.org/D135608 to update implementation status. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134529/new/ https://reviews.llvm.org/D134529 ___ cfe-co

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 466571. 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/D135608/new/ https://reviews.llvm.org/D135608 Files: clang/www

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 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 rGe66cfb63ceed: Update implementation status of P2468R2 (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-12 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. In D134529#3852990 , @erichkeane wrote: > Note that @BertalanD noticed an issue with what I expect to be this patch: > https://godbolt.org/z/Wjb9rsEYG > > Can someone more knowledgable about this paper please make sure it is

[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For

2022-10-12 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. In D134529#3853086 , @BertalanD wrote: > Does it deserve a mention in the Potentially Breaking Changes section of the > release notes? You are right. I was thinking the same after this discussion. I will add this to the secti

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-12-19 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 484013. usaxena95 added a comment. Herald added a subscriber: arphaman. Removed use of SubstitutionDiagnostic from NestedRequirement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138914/new/ https://reviews.

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-12-19 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. usaxena95 marked an inline comment as done. Closed by commit rGb3ce87285186: Make evaluation of nested requirement consistent with requires expr. (authored by usaxena95

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-12-21 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:2339 +Req->getConstraintExpr()->getSourceRange(), Satisfaction)) + TransConstraint = Result[0]; +assert(!Trap.hasErrorOccurred(

[PATCH] D140547: Perform access checking to private members in simple requirement.

2022-12-22 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D140547 Files: clang/lib/Sema/SemaTemplateInstantiate

[PATCH] D140547: Perform access checking to private members in simple requirement.

2022-12-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 485725. usaxena95 added a comment. Perform access-dependent checks after transforming requires clause. This is more generic and less invasive than the previous version which changed `RebuildMemberExpr` and also produced duplicate diagnostics. Repository:

[PATCH] D140547: Perform access checking to private members in simple requirement.

2022-12-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 485726. usaxena95 added a comment. Improved comment and added comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https://reviews.llvm.org/D140547 Files: clang/lib/Sema/SemaTemplateInstantia

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-03 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. Access to members in a non-dependent context would always yield an invalid expression. When it appears in a requires-exp

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-03 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 485939. usaxena95 added a comment. More tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140876/new/ https://reviews.llvm.org/D140876 Files: clang/lib/Parse/ParseExprCXX.cpp clang/test/CXX/expr/expr.

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added a comment. In D140876#4023286 , @ilya-biryukov wrote: > Should access checks should happen in the context where `concept` is written > or where it's used? > If access-checking should happen whe

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486255. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Adding access check related changes from https://reviews.llvm.org/D140876 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 abandoned this revision. usaxena95 marked an inline comment as done. usaxena95 added a comment. Moving the changes to https://reviews.llvm.org/D140547 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140876/new/ https://reviews.llvm.org/D140

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1367 + if (E->getBody()->isDependentContext()) { +Sema::SFINAETrap Trap(SemaRef); +// We recreate the RequiresExpr body, but no

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486313. usaxena95 marked an inline comment as done. usaxena95 added a comment. Added more tests. Still investigating libcxx failure and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https:/

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486357. usaxena95 added a comment. Return a valid RequriesExpr instead of a ExprError in case of depenedent diagnositcs. We would also need to store the diagnositcs in the RequiresExpr for better diagnosis. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-05 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486604. usaxena95 added a comment. Use ParsingDeclRAIIObject instead of ContextRAII. This creates a separate diagnostic pool for diagnositcs associated to the RequiresExprBodyDecl. This is important because dependent diagnostics should not leak to higher

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 487865. usaxena95 marked 6 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https://reviews.llvm.org/D140547 Files: clang/in

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1375 +if (Trap.hasErrorOccurred()) + TransReq.getAs()->setSatisfied(false); + } ilya-biryukov wrote: > ilya-biryukov wrote: > > `TransReq` may be `ExprEr

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 487866. usaxena95 added a comment. Remove new lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https://reviews.llvm.org/D140547 Files: clang/include/clang/AST/ExprConcepts.h clang/lib/Par

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-11 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 rG9e0474fbb9c5: Perform access checking to private members in simple requirement. (authored by usaxena95). Changed prior to commit: https://reviews.

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-09 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D137712 Files: clang/include/clang/AST/ExprConcepts.h

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-11 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 474716. usaxena95 added a comment. Moving closer to show diagnostic of entity for which SFNIAE occurred. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137712/new/ https://reviews.llvm.org/D137712 Files: cl

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-13 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 475054. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Addressed commented. Added Release notes. Removed infrastructure changes and deferred them to a future patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-13 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/include/clang/AST/ExprConcepts.h:103 + bool hasSubstitutionFailureInArgs() const { +return ArgsHasSubstitutionFailure; erichkeane wrote: > Does this really belong here instead of as a part of the > Concep

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-01-24 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 491661. usaxena95 edited the summary of this revision. usaxena95 added a comment. Use `getDefinition` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142384/new/ https://reviews.llvm.org/D142384 Files: clang

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-01-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 493489. usaxena95 marked an inline comment as done. usaxena95 added a comment. Add message in the assertion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142384/new/ https://reviews.llvm.org/D142384 Files:

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-01-31 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 493538. usaxena95 added a comment. Moved the use of definition where fields are accessed. This now resolves several other C++20/Module related crashes as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-01-31 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 493652. usaxena95 added a comment. Use definition based field access only for CXXRecordDecl. Avoid dynamic dispatch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142384/new/ https://reviews.llvm.org/D142384

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-01 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 493926. usaxena95 added a comment. Moved to RecordDecl::field_begin. Assertion is no more valid in RecordDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142384/new/ https://reviews.llvm.org/D142384 Files

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-01 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. In D142384#4096935 , @ilya-biryukov wrote: > @usaxena95 could you give an example of the code that fails the assertion? Is > it some of the tests? `assert(getDefinition())` fails about 3.6k tests. `assert(!isa(this) || getDef

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-02 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 494314. 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/D142384/new/ https://reviews.llvm.org/D142384 Files: clang/li

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-02 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 rGb6121432da79: [C++20] Fix a crash with modules. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-13 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked 4 inline comments as done. usaxena95 added a comment. I have deleted the test in https://github.com/llvm/llvm-project/commit/a3b632ab8772237ae23638f702bdceda028b2016. It is safe to delete as this is a brittle test trying to generate an invalid requirement using very deep templat

[PATCH] D141818: Add test for an invalid requirement in requires expr.

2023-01-15 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added reviewers: ilya-biryukov, erichkeane. Herald added a project: All. usaxena95 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The one introduced in D140547 w

[PATCH] D141818: Add test for an invalid requirement in requires expr.

2023-01-16 Thread Utkarsh Saxena via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15ad244670a9: Add test for an invalid requirement in requires expr. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141818/new/ https

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-01-23 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D142384 Files: clang/lib/AST/ExprConstant.cpp Index

[PATCH] D127863: [clang] Dont print implicit forrange initializer

2022-06-15 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127863/new/ https://reviews.llvm.org/D127863 __

[PATCH] D155614: [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).

2023-07-18 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1361-1362 }); - if (Results.References.empty()) -return std::nullopt; - Sorry for the confusion. This looks intentional and somewhat valuable for unused headers. We could

[PATCH] D155898: [clangd] Fix go-to-type target location

2023-07-21 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 accepted this revision. usaxena95 added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/XRefs.cpp:347 +void enhanceLocatedSymbolsFromIndex( +llvm::MutableArrayRef Result, +const llvm::DenseMap &ResultIndex,

[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.

2023-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added reviewers: massberg, sammccall. Herald added a subscriber: kadircet. Herald added a project: All. usaxena95 requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. This is similar t

[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.

2023-08-31 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 554955. usaxena95 marked 2 inline comments as done. usaxena95 added a comment. Rebased over AST changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158842/new/ https://reviews.llvm.org/D158842 Files: cl

[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.

2023-08-31 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp:217 +void $2^func2() requires $Bar4^Bar {} + )cpp"); + Inputs.Code = Code.code(); sammccall wrote: > to complete the set I think you want > > `void fo

[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.

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

[PATCH] D158842: [include-cleaner] Handle decls/refs to concepts.

2023-08-31 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 closed this revision. usaxena95 added a comment. closed by ac2d2652db8de9ea2b750dd2bf1232941039dffe Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158842/new/ https://r

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 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/45563 template concept True = true; template concept C1 =

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 abandoned this revision. usaxena95 added a comment. Second attempt along the lines of the last comment: https://reviews.llvm.org/D138914 PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137712/new/ https://reviews.llvm.org/D137712 __

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 478658. usaxena95 marked an inline comment as done. usaxena95 added a comment. Added tests. Fixed regressions in diagnositcs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138914/new/ https://reviews.llvm.org

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 478814. usaxena95 marked 4 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138914/new/ https://reviews.llvm.org/D138914 Files: clang/in

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/include/clang/AST/ExprConcepts.h:428 + : Requirement(RK_Nested, +Constraint && Constraint->isInstantiationDependent(), +Constraint && Constraint->containsUnexpandedParameterPack(), --

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 478818. usaxena95 added a comment. Removed extraneous colons from diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138914/new/ https://reviews.llvm.org/D138914 Files: clang/include/clang/AST/ASTCo

[PATCH] D138914: Make evaluation of nested requirement consistent with requires expr.

2022-11-29 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 478819. usaxena95 added a comment. Remove unintended whitespaces and new lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138914/new/ https://reviews.llvm.org/D138914 Files: clang/include/clang/AST/AST

[PATCH] D76741: [clangd] Support multiple cursors in selectionRange.

2020-03-25 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added a comment. Mostly looks good. Few nits. Thanks. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1194-1201 if (Params.positions.size() != 1) { elog("{0} positions provided to SelectionRange. Supports exactly one " "position.",

[PATCH] D76741: [clangd] Support multiple cursors in selectionRange.

2020-03-25 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. LG. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76741/new/ https://reviews.llvm.org/D76741 __

[PATCH] D74906: [clang][analyzer] Modify include AllocationState.h in PutenvWithAutoChecker.cpp

2020-02-20 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: kadircet. Herald added subscribers: cfe-commits, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. PutenvWithAutoChecker.cpp used to inclu

[PATCH] D74906: [clang][analyzer] Modify include AllocationState.h in PutenvWithAutoChecker.cpp

2020-02-20 Thread UTKARSH SAXENA via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb54c13c217b: [clang][analyzer] Modify include AllocationState.h in PutenvWithAutoChecker.cpp (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This patch adds an instrumentation mode for clangd (enabled by corresponding option in cc_opts). If th

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 248160. usaxena95 added a comment. Addressed linter issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75603/new/ https://reviews.llvm.org/D75603 Files: clang-tools-extra/clangd/CodeComplete.cpp clang

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 248233. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Changed to invoke callback on all code completion items. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75603/new/ https://reviews

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 marked 3 inline comments as done. usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1465 +if (Opts.EnableInstrumentationMode) + (*Opts.RecordCCResults)(toCodeCompleteResult(Top)); + kadircet wrote: > can't w

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 248240. usaxena95 marked 2 inline comments as done. usaxena95 added a comment. Remove ununsed import. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75603/new/ https://reviews.llvm.org/D75603 Files: clang-t

[PATCH] D69162: [clangd] Remove using-namespace present inside a namespace.

2019-10-29 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 226962. usaxena95 marked 7 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69162/new/ https://reviews.llvm.org/D69162 Files: clang-tool

[PATCH] D69162: [clangd] Remove using-namespace present inside a namespace.

2019-10-29 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:180 + if (ContainingNS) +findExplicitReferences(ContainingNS, SelectRefToQualify); + else ilya-biryukov wrote: > Do we also need to run in the re

[PATCH] D69162: [clangd] Remove using-namespace present inside a namespace.

2019-10-31 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 227267. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69162/new/ https://reviews.llvm.org/D69162 Files: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNa

[PATCH] D69162: [clangd] Remove using-namespace present inside a namespace.

2019-10-31 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 marked 3 inline comments as done. usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:179 + + if (ContainingNS) { +for (auto ReDeclNS : ContainingNS->redecls()) ilya-biryukov wrote: > Coul

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We use the name from the IdentifierInfo of the Macro to compute its SymbolID. It is better to just take t

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228220. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/c

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added a comment. We actually use both the name and the **source location** of the macro to calculate its ID. I see that the subject of the patch might suggest otherwise. This is a trivial change which just changes the params of the function so that users don't have to carry the Identi

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228431. usaxena95 added a comment. Hopefully reverting unintended changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D69937: [clangd] Use name of Macro to compute its SymbolID.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228430. usaxena95 added a comment. - [clangd] Store xref for Macros in ParsedAST. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69937/new/ https://reviews.llvm.org/D69937 Files: clang-tools-extra/clangd/AS

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added a comment. Please ignore the changes from patch https://reviews.llvm.org/D69937 Will fix this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70008/new/ https://reviews.llvm.org/D70008 _

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: hokein. usaxena95 added a project: clang. This patch adds the cross references for Macros in the MainFile. We add references for the main file to the ParsedAST. We query the references from it using the SymbolID. Xref outside main file w

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-08 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228456. usaxena95 added a comment. Removing changes from different patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70008/new/ https://reviews.llvm.org/D70008 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-11 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:898 + // Handle macros. + if (auto Macro = locateMacroAt(Loc, AST.getPreprocessor())) { +if (auto MacroSID = getSymbolID(Macro->Name, Macro->Info, SM)) { hokein wrote: > this is

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-11 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228679. usaxena95 marked an inline comment as done. usaxena95 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70008/new/ https://reviews.llvm.org/D70008 Files: clang-tools-extra/clang

[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

2019-11-12 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 228869. usaxena95 marked 2 inline comments as done. usaxena95 added a comment. Herald added a subscriber: mgorny. Added tests for CollectMacros.h Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

<    1   2   3   4   5   >