File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1665,8 +1665,11 @@ SourceLocation CallExpr::getBeginLoc() const {
16651665 Method && Method->isExplicitObjectMemberFunction ()) {
16661666 bool HasFirstArg = getNumArgs () > 0 && getArg (0 );
16671667 assert (HasFirstArg);
1668- if (HasFirstArg)
1669- return getArg (0 )->getBeginLoc ();
1668+ if (HasFirstArg) {
1669+ if (auto FirstArgLoc = getArg (0 )->getBeginLoc (); FirstArgLoc.isValid ()) {
1670+ return FirstArgLoc;
1671+ }
1672+ }
16701673 }
16711674 }
16721675
Original file line number Diff line number Diff line change @@ -1134,3 +1134,10 @@ struct S {
11341134static_assert ((S{} << 11 ) == a);
11351135// expected-error@-1 {{use of undeclared identifier 'a'}}
11361136}
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