File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const {
1648
1648
if (const auto *Method =
1649
1649
dyn_cast_if_present<const CXXMethodDecl>(getCalleeDecl ());
1650
1650
Method && Method->isExplicitObjectMemberFunction ()) {
1651
- assert (getNumArgs () > 0 && getArg (0 ));
1652
- return getArg (0 )->getBeginLoc ();
1651
+ if (!isTypeDependent ()) {
1652
+ assert (getNumArgs () > 0 && getArg (0 ));
1653
+ if (getNumArgs () > 0 && getArg (0 ))
1654
+ return getArg (0 )->getBeginLoc ();
1655
+ }
1653
1656
}
1654
1657
1655
1658
SourceLocation begin = getCallee ()->getBeginLoc ();
Original file line number Diff line number Diff line change @@ -13,3 +13,16 @@ void main() {
13
13
// CHECK-NEXT: | `-DeclRefExpr 0x{{[^ ]*}} <col:13> 'int (S &)' lvalue CXXMethod 0x{{[^ ]*}} 'f' 'int (S &)'
14
14
}
15
15
}
16
+
17
+ namespace GH1269720 {
18
+ template <typename T>
19
+ struct S {
20
+ void f (this S&);
21
+ void g (S s) {
22
+ s.f ();
23
+ }
24
+ // CHECK: CallExpr 0x{{[^ ]*}} <line:22:5, col:9> '<dependent type>'
25
+ // CHECK-NEXT: `-MemberExpr 0x{{[^ ]*}} <col:5, col:7> '<bound member function type>' .f
26
+ // CHECK-NEXT: `-DeclRefExpr 0x{{[^ ]*}} <col:5> 'S<T>' lvalue ParmVar 0x{{[^ ]*}} 's' 'S<T>'
27
+ };
28
+ }
You can’t perform that action at this time.
0 commit comments