[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG871ee9414112: [clang][ExprConst] Use call source range for in call to diags (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D156604?vs=548520=550724#toc Repository: rG LLVM

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-10 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D156604#4572994 , @tbaeder wrote: > While both of those suggestions are probably improvements (I haven't > checked), they also seem out of scope for this patch. This is just adding > source ranges. We can improve them

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. While both of those suggestions are probably improvements (I haven't checked), they also seem out of scope for this patch. This is just adding source ranges. We can improve them later (and add better tests for them at that point). CHANGES SINCE LAST ACTION

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-09 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet accepted this revision. hazohelet added a comment. I think it would be helpful to point to the subobject source range when diagnosing errors in subobject dtors, so I left some suggestions. Otherwise this LGTM. Thanks! Comment at: clang/lib/AST/ExprConstant.cpp:6663

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D156604#4572018 , @hazohelet wrote: > We need some tests for dtors because they are handled differently from other > functions. > I think the current ExprConstant part would not cover the explicitly-called > dtors because

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 548520. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604 Files: clang/lib/AST/ExprConstant.cpp clang/lib/AST/Interp/Frame.h clang/lib/AST/Interp/InterpFrame.cpp clang/lib/AST/Interp/InterpFrame.h

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-09 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. We need some tests for dtors because they are handled differently from other functions. I think the current ExprConstant part would not cover the explicitly-called dtors because the `HandleDestructorImpl` only has access to `CallLoc` and not source range. Also new

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM but please give a day or two for @hazohelet to weigh in. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545980. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604 Files: clang/lib/AST/ExprConstant.cpp clang/lib/AST/Interp/Frame.h clang/lib/AST/Interp/InterpFrame.cpp clang/lib/AST/Interp/InterpFrame.h

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-01 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D156604#4549524 , @tbaeder wrote: > @hazohelet I changed this to just return `CallExpr->getSourceRange()` and to > not save a source range separately. Can you give this a look please? I was thinking about removing

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. @hazohelet I changed this to just return `CallExpr->getSourceRange()` and to not save a source range separately. Can you give this a look please? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D156604#4546650 , @aaron.ballman wrote: >> As you can see I have a test case, but I didn't attach it in >> test/Misc/constexpr-source-ranges.cpp because I can't get >> -fdiagnostics-print-source-range-info to actually print

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545934. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156604/new/ https://reviews.llvm.org/D156604 Files: clang/lib/AST/ExprConstant.cpp clang/lib/AST/Interp/Frame.h clang/lib/AST/Interp/InterpFrame.cpp clang/lib/AST/Interp/InterpFrame.h

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > As you can see I have a test case, but I didn't attach it in > test/Misc/constexpr-source-ranges.cpp because I can't get > -fdiagnostics-print-source-range-info to actually print anything for them. That's odd; have you investigated what's going on/filed an

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-07-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: cjdb, aaron.ballman, hazohelet. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before: array.cpp:74:15: error: static assertion expression is