File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -398,6 +398,8 @@ Bug Fixes in This Version
398
398
399
399
#if 1 ? 1 : 999999999999999999999
400
400
#endif
401
+ - Fixed a clang 20 regression where diagnostics attached to some calls to member functions
402
+ using C++23 "deducing this" did not have a diagnostic location (#GH135522)
401
403
402
404
Bug Fixes to Compiler Builtins
403
405
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -1652,8 +1652,11 @@ SourceLocation CallExpr::getBeginLoc() const {
1652
1652
if (!isTypeDependent ()) {
1653
1653
if (const auto *Method =
1654
1654
dyn_cast_if_present<const CXXMethodDecl>(getCalleeDecl ());
1655
- Method && Method->isExplicitObjectMemberFunction ())
1656
- return getArg (0 )->getBeginLoc ();
1655
+ Method && Method->isExplicitObjectMemberFunction ()) {
1656
+ if (auto FirstArgLoc = getArg (0 )->getBeginLoc (); FirstArgLoc.isValid ()) {
1657
+ return FirstArgLoc;
1658
+ }
1659
+ }
1657
1660
}
1658
1661
1659
1662
SourceLocation begin = getCallee ()->getBeginLoc ();
Original file line number Diff line number Diff line change @@ -1134,3 +1134,10 @@ struct S {
1134
1134
static_assert ((S{} << 11 ) == a);
1135
1135
// expected-error@-1 {{use of undeclared identifier 'a'}}
1136
1136
}
1137
+
1138
+ namespace GH135522 {
1139
+ struct S {
1140
+ auto f (this auto ) -> S;
1141
+ bool g () { return f (); } // expected-error {{no viable conversion from returned value of type 'S' to function return type 'bool'}}
1142
+ };
1143
+ }
You can’t perform that action at this time.
0 commit comments