diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-09-26 19:10:34 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-09-26 19:10:34 +0000 |
commit | deedc3a6bd948d4194270d9e24a36951461461e0 (patch) | |
tree | 7a00e995cf62bbed57d5845d22ada25c0304470b /clang/lib | |
parent | 95995be7a35167e404a844b7156448814c33d7ea (diff) | |
download | bcm5719-llvm-deedc3a6bd948d4194270d9e24a36951461461e0.tar.gz bcm5719-llvm-deedc3a6bd948d4194270d9e24a36951461461e0.zip |
Fix a bug in the typo correction replacement location.
I noticed the wrong text was being replaced with the correction while
working on expanding the "namespace-aware" typo correction to include
classes.
llvm-svn: 191450
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index d0366122934..10ed15a2903 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3978,10 +3978,12 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, // arguments for the remaining parameters), don't make the call. if (Args.size() < NumArgsInProto) { if (Args.size() < MinArgs) { + MemberExpr *ME = dyn_cast<MemberExpr>(Fn); TypoCorrection TC; if (FDecl && (TC = TryTypoCorrectionForCall( *this, DeclarationNameInfo(FDecl->getDeclName(), - Fn->getLocStart()), + (ME ? ME->getMemberLoc() + : Fn->getLocStart())), Args))) { unsigned diag_id = MinArgs == NumArgsInProto && !Proto->isVariadic() |