[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta added a comment. This revision is now accepted and ready to land. LGTM, Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158540/new/ https://reviews.llvm.org/D158540 ___ cfe-commits mailing list

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a subscriber: rsmith. xgupta added a comment. Just address @rsmith, I think after that we are fine to commit this review. > + "%sub{select_special_member_kind}0 cannot be 'constexpr' in a class or > struct with virtual base classes">; Please don't say "class or struct" here.

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-29 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D158540#4620286 , @NoumanAmir657 wrote: > @xgupta It passed the test cases now Thanks, I think we also want a note similar to MSVC diagnostic: (6): note: see reference to function 'Derived::Derived(void)' CHANGES SINCE

[PATCH] D158540: Improve error message for constexpr constructors of virtual base classes

2023-08-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added reviewers: shafik, aaron.ballman. xgupta added a comment. Test case updates are missing due to which 7 test cases are failing on pre-merge check - https://buildkite.com/llvm-project/premerge-checks/builds/172995#018a2776-1461-4f98-b12d-bd0521352d50/6-14972. Repository: rG LLVM

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-08-07 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D142609#4566418 , @aaron.ballman wrote: > Concerns have been raised in > https://github.com/llvm/llvm-project/issues/64356 that this is an undesirable > change in diagnostic behavior. The diagnostic is supposed to fire when

[PATCH] D157352: Revert "[Clang] Fix -Wconstant-logical-operand when LHS is a constant"

2023-08-07 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa84525233776: Revert [Clang] Fix -Wconstant-logical-operand when

[PATCH] D157352: Revert "[Clang] Fix -Wconstant-logical-operand when LHS is a constant"

2023-08-07 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta created this revision. Herald added a project: All. xgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit dfdfd306cfaf54fbc43e2d5eb36489dac3eb9976

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-07-30 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D147357/new/ https://reviews.llvm.org/D147357

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-07-30 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/OptionalValueConversionCheck.cpp:61 + matchers::matchesAnyListedName(ValueMethods) + .bind("fun")), + hasType(qualType().bind("value-type")));

[PATCH] D149015: [clang-tidy] Added bugprone-inc-dec-in-conditions check

2023-07-29 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D149015/new/ https://reviews.llvm.org/D149015

[PATCH] D149015: [clang-tidy] Added bugprone-inc-dec-in-conditions check

2023-07-28 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/IncDecInConditionsCheck.cpp:30 +void IncDecInConditionsCheck::registerMatchers(MatchFinder *Finder) { + auto OperatorMacher = expr( + anyOf(binaryOperator(anyOf(isComparisonOperator(),

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D146368/new/ https://reviews.llvm.org/D146368

[PATCH] D149084: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D149084/new/ https://reviews.llvm.org/D149084

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 544732. xgupta added a comment. minor update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 544728. xgupta added a comment. updated code as per the comment of @cor3ntin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4535941 , @aaron.ballman wrote: > In D155457#4526168 , @xgupta wrote: > >> In D155457#4523388 , @cor3ntin >> wrote: >> >>> I'm not

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 544622. xgupta added a comment. Update as per comment of @cor3ntin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-26 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. This LGTM, I will wait for two days before accepting the revision in case other reviewers might have some more comments/suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + PiotrZSL wrote: > xgupta wrote: > > The below comment is not matching, do you

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D144135/new/ https://reviews.llvm.org/D144135

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:20 + +struct NotExtendedByDeclBoundToPredicate { + bool operator()(const internal::BoundNodesMap ) const { A comment might be good to

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4523388 , @cor3ntin wrote: > I'm not sure I understand the motivation for this change. Sure, people do > that but they also might do the same thing for ssize_t, intmax_t, or to > compare int to int32_t. > I think a

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4523227 , @aaron.ballman wrote: > In D155457#4513812 , @xgupta wrote: > >> In D155457#4511652 , >> @aaron.ballman wrote: >> >>> In

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1e512688376c: [clang-tidy] performance-* checks: Also allow allow member expressions to be… (authored by shivam-amd). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 543307. xgupta added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 Files: clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 543300. xgupta marked 2 inline comments as done. xgupta added a comment. minor update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 Files:

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 543299. xgupta added a comment. Update release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 Files: clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 543287. xgupta added a comment. Added release note and fix unit test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 Files:

[PATCH] D78223: [clang-tidy] performance-range-for-copy only for copy.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Herald added subscribers: PiotrZSL, carlosgalvezp. Herald added a project: All. Reverse ping, this patch was never gets committed after being accepted. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78223/new/

[PATCH] D82784: [clang-tidy] For `run-clang-tidy.py` do not treat `allow_enabling_alpha_checkers` as a none value.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta closed this revision. xgupta added a comment. Herald added subscribers: wangpc, PiotrZSL, carlosgalvezp. Herald added a reviewer: njames93. Herald added projects: clang-tools-extra, All. This was committed in

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 543282. xgupta added a comment. Rebase and address one last comment. I think now it will be fine to commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 Files:

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta added a comment. This revision is now accepted and ready to land. LGTM, but we can wait for a couple of before committing in case other reviewers have more review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D101037: [clang-tidy] Change shebang from python to python3

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta closed this revision. xgupta added a comment. Herald added a reviewer: njames93. Herald added a subscriber: PiotrZSL. Herald added a project: All. https://reviews.llvm.org/rG475440703238ca32adab6c3fe5e0039c3f96d1a5 committed the remaining shebang change from python to python3.

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-07-23 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Other than these three points everything looks good to me. Comment at: clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp:71 + +bool EmptyCatchCheck::isLanguageVersionSupported( +const LangOptions ) const { This can be

[PATCH] D142800: [Clang][Diagnostic] Add `-Wcomparison-op-parentheses` to warn on chained comparisons

2023-07-22 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Wanted to point out that there is a clang-tidy check in review doing the similar thing - https://reviews.llvm.org/D144429. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142800/new/ https://reviews.llvm.org/D142800

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-07-22 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. This LGTM, but can't officially accept the patch so please wait for another reviewer to accept it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144135/new/ https://reviews.llvm.org/D144135

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-21 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Just normal ping, @aaron.ballman, can please take a look, pre-merge checks are also passing now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-21 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 542846. xgupta added a comment. update test for Windows system Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4511652 , @aaron.ballman wrote: > In the x86 compilation: `sizeof(std::size_t) < sizeof(uint64_t)` is true, so > we test the other expression; because `Size` is greater than `__SIZE_MAX__` > the function returns

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 541866. xgupta added a comment. Add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Thanks, @nickdesaulniers for reviewing and @nathanchance for testing the change. @aaron.ballman, I also agree with @xbolva00 seems warning in kernel code is valid but I also agree with your comment about macro, may be better to track the macro-related issue with another

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGdfdfd306cfaf: [Clang] Fix -Wconstant-logical-operand when LHS is a constant (authored by shivam-amd). Changed prior to

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-18 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D142609#4510995 , @aaron.ballman wrote: > In D142609#4510596 , @xbolva00 > wrote: > >> In my opinion it makes sense to adjust that kernel code based on this >> warning in the current

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-18 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4511392 , @aaron.ballman wrote: > Whether `size_t` comes from the system header or whether it's manually > deduced from `decltype(sizeof(0))` should make no difference as far as the > frontend is concerned; they

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-18 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D142609#4507696 , @nathanchance wrote: > I took the most recent version for a spin against the Linux kernel. The > couple of issues that a previous revision of the warning flagged >

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-18 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4507124 , @aaron.ballman wrote: > In D155457#4507107 , @xgupta wrote: > >> In D155457#4506405 , @xbolva00 >> wrote: >> >>> You should

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4506405 , @xbolva00 wrote: > You should add a testcase which uses “expected no diagnostics”. There is some issue writing test $ cat type-limit-compare.cpp // RUN: %clang_cc1 -fsyntax-only

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. I am not sure if this is correct but this passes `ninja check-clang`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 ___ cfe-commits

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta created this revision. xgupta added reviewers: aaron.ballman, xbolva00. Herald added a project: All. xgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The issue with size_t comes when we are trying to addd -Wtype-limits to

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540922. xgupta added a comment. Address xbolva00's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaExpr.cpp clang/test/C/drs/dr4xx.c

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13635 + if (ECDHS && ECDHS->getInitVal() != 0 && ECDHS->getInitVal() != 1) +EnumConstantInBoolContext = true; +} xgupta wrote: > nickdesaulniers wrote: > > Hmm...I wonder if

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540914. xgupta marked 5 inline comments as done. xgupta added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/include/clang/Sema/Sema.h

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D4784#4504690 , @PiotrZSL wrote: > Just few nits (column numbers in test, missing doxygen comment, ...). > Please fix those before committing. > > Except that, looking good to me. Thanks for this nice code review. Repository:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta 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 rG42179bbf6bcc: [clang-tidy] Add check for possibly incomplete switch statements (authored by shivam-amd). Repository: rG LLVM Github Monorepo

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540857. xgupta marked 6 inline comments as done. xgupta added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540845. xgupta marked an inline comment as done. xgupta added a comment. Updated testcase [WIP] Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:19 + Finder->addMatcher( + switchStmt(has(implicitCastExpr().bind("cast")), + unless(hasAncestor(switchStmt(has(defaultStmt())

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540818. xgupta marked 5 inline comments as done. xgupta added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta marked 3 inline comments as done. xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:16-29 +void SwitchMissingDefaultCaseCheck::registerMatchers( +ast_matchers::MatchFinder *Finder) { +

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540798. xgupta marked an inline comment as done. xgupta added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta marked an inline comment as done. xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst:52 +.. note:: + Enum types are already covered by compiler warnings when a switch statement + does not handle

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540119. xgupta marked an inline comment as done. xgupta added a comment. Address latest two comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540102. xgupta added a comment. Updated SwitchMissingDefaultCaseCheck.cpp but still WIP Will look again on saturday/sunday Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:225 + + Ensures that incomplete switch statements without default cases are + flagged, covering cases beyond enums where the compiler may not issue warnings. PiotrZSL wrote: >

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539857. xgupta marked 12 inline comments as done. xgupta added a comment. Address all comments excpet in SwitchMissingDefaultCaseCheck.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539602. xgupta added a comment. Add documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539593. xgupta marked 3 inline comments as done. xgupta added a comment. Address more comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539558. xgupta edited the summary of this revision. xgupta added a comment. Address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-11 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539390. xgupta added a comment. Update ReleaseNotes.rst CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-11 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539389. xgupta added a comment. Address bkramer's comments except one for "checking that you're casting from an enum". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-11 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539383. xgupta added a comment. . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/misc/IncompleteSwitchCheck.cpp

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-11 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539378. xgupta retitled this revision from "[clang-tidy] Add check for possibly incomplete switch statements " to "[clang-tidy] Add check for possibly incomplete switch statements". xgupta added a reviewer: PiotrZSL. xgupta added a comment. Herald added a

[PATCH] D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-05-06 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc1ab19850d5c: [Clang][OpenMP]Solved the the always truth condition in Arm64 (authored by samuelmaina, committed by xgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149713: [Sema] Avoid emitting warnings for constant destruction.

2023-05-06 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd6a58babc85: [Sema] Avoid emitting warnings for constant destruction. (authored by pkasting, committed by xgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149456: Basic documentation of -mrecip=... option

2023-04-30 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG85ed0fb5037b: Basic documentation of -mrecip=... option (authored by tim.schmielau, committed by xgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149405: [Clang][Doc] Added an open project for improving command line docs

2023-04-28 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D149405#4305856 , @aaron.ballman wrote: > Thank you, this is a great suggestion! Just some minor wording changes, but > otherwise LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149405: [Clang][Doc] Added an open project for improving command line docs

2023-04-28 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. xgupta marked an inline comment as done. Closed by commit rGa70485493803: [Clang][Doc] Added an open project for improving command line docs (authored by xgupta).

[PATCH] D149405: [Clang][Doc] Added an open project for improving command line docs

2023-04-28 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 517996. xgupta added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149405/new/ https://reviews.llvm.org/D149405 Files: clang/www/OpenProjects.html Index:

[PATCH] D149405: [Clang][Doc] Added an open project for improving command line docs

2023-04-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta created this revision. xgupta added a reviewer: aaron.ballman. Herald added a project: All. xgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There seems to be a lot of documentation is missing for different command line flags

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-26 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D148439#4298606 , @aaron.ballman wrote: > LGTM, but please add a release note when landing the changes. Thanks for the review, added a release note for change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-26 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG62eec1584d2c: [clang-rename] Exit gracefully when no input provided (authored by xgupta). Changed prior to commit:

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Ping for reivew. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang/tools/clang-rename/ClangRename.cpp:233 + if (!Entry) { +errs() << "clang-rename: input file does not exist.\n"; +return 1; kbobyrev wrote: > It is worth including the filename in the error

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 514842. xgupta marked an inline comment as done. xgupta added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 Files:

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D148439#4272904 , @kbobyrev wrote: > Oh, wait, I'm sorry, I didn't look into it closely :( Yeah, the `Input` file > is not really needed, most of the time the users of `clang-rename` (not sure > there are many with `clangd`

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-17 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 514262. xgupta added a comment. adjust the return and add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 Files: clang/test/clang-rename/NonExistFile.cpp

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D148439#4272813 , @dyung wrote: > This change is also causing 33 test failures on a build bot > https://lab.llvm.org/buildbot/#/builders/139/builds/39267 Yes, checking for the reason, and honestly I never tried to run

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D148439#4272810 , @dyung wrote: > Is there a reason a test was not added with this change? Sorry, I missed that. Adding. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Shivam Gupta via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. xgupta marked an inline comment as done. Closed by commit rG726199146a0b: [clang-rename] Exit gracefully when no input provided (authored by xgupta). Repository: rG

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta marked an inline comment as done. xgupta added inline comments. Comment at: clang/tools/clang-rename/ClangRename.cpp:130 + } else { +errs() << "clang-rename: No input provided.\n"; +return 1; kbobyrev wrote: > Probably something like "input must

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 514093. xgupta added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 Files: clang/tools/clang-rename/ClangRename.cpp Index:

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-15 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta created this revision. xgupta added reviewers: vmiklos, alexander-shaposhnikov, kbobyrev, aaron.ballman. Herald added a project: All. xgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. clang-rename on a non existing file

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-16 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. gentle ping for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-06 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta marked 5 inline comments as done. xgupta added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13635 + if (ECDHS && ECDHS->getInitVal() != 0 && ECDHS->getInitVal() != 1) +EnumConstantInBoolContext = true; +} nickdesaulniers

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-06 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 495375. xgupta added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/include/clang/Sema/Sema.h

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-06 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 495122. xgupta added a comment. remove old code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaExpr.cpp

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-06 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 495116. xgupta added a comment. use function to avoid code duplication Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/include/clang/Sema/Sema.h

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13611-13653 if (RHS.get()->EvaluateAsInt(EVResult, Context)) { llvm::APSInt Result = EVResult.Val.getInt(); if ((getLangOpts().Bool && !RHS.get()->getType()->isBooleanType() &&

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 494631. xgupta added a comment. remov blank Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/lib/Sema/SemaExpr.cpp clang/test/C/drs/dr4xx.c

  1   2   3   >