[PATCH] D151033: [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration when it has a dependent type

2023-05-21 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 524095. hazohelet retitled this revision from "[clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable template definition" to "[clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration

[PATCH] D151033: [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration when it has a dependent type

2023-05-22 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG986cbd80d1dc: [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr… (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D151033?vs=524095&id=524346#toc Re

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-23 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 524655. hazohelet added a comment. The cause of the regression has been fixed in the other patch. This is a resubmission with rebase to the upstream. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files

[PATCH] D151214: [clang][Sema] `-Wshadow` warns about shadowings by static local variables

2023-05-23 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch makes `-Wshadow` warn about the shadowings by static local variables. Fixes https://githu

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-24 Thread Takuya Shimizu 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 rG456d072405d2: Reland: [clang][AST] Print name instead of type when diagnosing uninitialized… (authored by hazohelet). Repository: rG LLVM Github M

[PATCH] D151214: [clang][Sema] `-Wshadow` warns about shadowings by static local variables

2023-05-24 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG29dc47a9eeeb: [clang][Sema] `-Wshadow` warns about shadowings by static local variables (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D151214?vs=524709&id=525126#toc Reposi

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-30 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, erichkeane, tbaeder, cjdb. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch changes the display of member function calls in constexpr evaluator diagnostics

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-30 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. Thanks for the feedback. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:994 +static_assert(sobj.f(), ""); // expected-error {{constant expression}} expected-note {{in call to 'sobj.f()'}} +static_assert(sptr->f(), ""); // expected-error

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-30 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D151720#4383098 , @tbaeder wrote: > Can you show the output for an example where the `->` notation is correct, > e.h. https://godbolt.org/z/6a5oExjME ? > > I suppose the patch doesn't change this much, but the current way th

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-31 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 527104. hazohelet added a comment. I think the proper message here can be obtained by letting the stack frame keep the syntactical structure of the function call, although it introduces additional memory footprint. - Add `const Expr *` new field to `CallS

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-31 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 527294. hazohelet added a comment. Address comments from @tbaeder - Change `dyn_cast_or_null` to `dyn_cast_if_present` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151720/new/ https://reviews.llvm.org/D151720 Files: clang/docs/ReleaseNotes.rs

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-05-31 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked 2 inline comments as done. hazohelet added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:1933 +} else if (const auto *OCE = + dyn_cast_or_null(CallExpr)) { + OCE->getArg(0)->printPretty(Out, nullptr, Info.Ctx.getPrintingPo

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-06-01 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 527363. hazohelet added a comment. Address comments from @tbaeder - Add new suggested test case - NFC stylistic changes in test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151720/new/ https://reviews.llvm.org/D151720 Files: clang/docs/

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-06-01 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked 5 inline comments as done. hazohelet added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:1931 + else + Out << "."; +} else if (const auto *OCE = tbaeder wrote: > Did you `clang-format` these changes? The two if/els

[PATCH] D152093: [clang][Analysis] Handle && and || against variable and its negation as tautology

2023-06-04 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, erichkeane. Herald added a reviewer: NoQ. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch introduces a new warning flag `-Wtautological-negation-c

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-08 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-15 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 522165. hazohelet added a comment. Rebase and Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146358/new/ https://reviews.llvm.org/D146358 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td clang/lib/AST/E

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-16 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4343281 , @aaron.ballman wrote: > LGTM! Did you end up requesting commit access? If not, now is probably a good > time: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Thanks, I have commit acces

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-16 Thread Takuya Shimizu 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 rG0e167fc0a214: [clang][AST] Print name instead of type when diagnosing uninitialized subobject… (authored by hazohelet). Repository: rG LLVM Github

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-05-17 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D146358#4350810 , @erichkeane wrote: > Our downstream discovered that this causes a regression when compiling > `utility` with `ast-dump`. I've put up a minimal reproducer: > https://godbolt.org/z/oaezas7Ws > > @hazohelet

[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

2023-06-08 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. @aaron.ballman I would like to hear what's your take on this approach. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151720/new/ https://reviews.llvm.org/D151720 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions

2023-06-08 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch marks the declarations with initializations in condition expressions such as `if (int var

[PATCH] D152548: [Clang][Interp] Diagnose uninitialized ctor of global record arrays

2023-06-09 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. This patch adds a check for uninitialized subobjects of global variables that are record arrays. e.g

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, cjdb, tbaeder. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. When the diagnosed function/variable is a template specialization, the source range covers the special

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D152707#4413899 , @tbaeder wrote: > Precommit-CI also found some problems on Windows It's a littile surprising to me that clang outputs different diagnostics on windows. I suspect it might be related to the clang driver, so

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 530834. hazohelet added a comment. - Change `%clang` to `%clang_cc1 -fcxx-exceptions` in the test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDec

[PATCH] D152796: [clang][Sema] Fix diagnostic message for unused constant varialbe templates

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, tbaeder, shafik. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. BEFORE this patch, unused const-qualified variable templates such as `template const double var_t =

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1350 continue; // Deleted functions are supposed to be unused. +SourceRange DiagRange = SourceRange(DiagD->getLocation()); +if (const ASTTemplateArgumentListInfo *ASTTAL =

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 530912. hazohelet added a comment. Address review comments - Move the test header to `Inputs` folder - Remove explicit constructor call of `SourceRange` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 F

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked 3 inline comments as done. hazohelet added a comment. Thanks for the review. I'll check the pre-commit CI result before landing this just in case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 ___

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-14 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1386 +if (const auto *VTSD = dyn_cast(DiagD)) + DiagRange.setEnd(VTSD->getTemplateArgsInfo()->RAngleLoc); if (DiagD->isReferenced()) { It looks like `VarTemplateSpecial

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-14 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 531266. hazohelet added a comment. Added an additional null check that I mentioned earlier CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDecl.cpp

[PATCH] D152796: [clang][Sema] Fix diagnostic message for unused constant varialbe templates

2023-06-14 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb8c08f7ae86d: [clang][Sema] Fix diagnostic message for unused constant variable templates (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D152796?vs=530844&id=531293#toc Repo

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-16 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64083172eea2: [clang][Sema] Provide source range to several Wunused warnings (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D152707?vs=531266&id=532079#toc Repository: rG

<    1   2   3