diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-11-25 01:10:54 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-11-25 01:10:54 +0000 |
commit | de232cb16674e83b373aaac41552ec543c8cc126 (patch) | |
tree | 08fff40d4baf8ae000941c40df1361e513d87408 /clang/lib/Sema/SemaOverload.cpp | |
parent | d65a44447844feecfbdae3a7b030bd88c1d04e54 (diff) | |
download | bcm5719-llvm-de232cb16674e83b373aaac41552ec543c8cc126.tar.gz bcm5719-llvm-de232cb16674e83b373aaac41552ec543c8cc126.zip |
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside a friend function definition at class scope.
Basically we have to look into the parent *lexical* DeclContext for friend functions at class scope. That's because calling GetParent() return the namespace or file DeclContext.
This fixes all remaining cases of "Unqualified lookup into dependent bases of class templates" when parsing MFC code with clang.
llvm-svn: 145127
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 9b605c9319d..b54f1a30ab1 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -8825,7 +8825,7 @@ Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, // to instantiation time to be able to search into type dependent base // classes. if (getLangOptions().MicrosoftMode && CurContext->isDependentContext() && - (isa<CXXMethodDecl>(CurContext) || isa<CXXRecordDecl>(CurContext))) { + (isa<FunctionDecl>(CurContext) || isa<CXXRecordDecl>(CurContext))) { CallExpr *CE = new (Context) CallExpr(Context, Fn, Args, NumArgs, Context.DependentTy, VK_RValue, RParenLoc); |