From b8a9a41dd6ea0b0d652edb5be0a78dd21e0e271d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 4 Feb 2009 15:01:18 +0000 Subject: Fix our semantic analysis of unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) llvm-svn: 63733 --- clang/lib/Sema/SemaExprCXX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Sema/SemaExprCXX.cpp') diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index e9dbc849b00..2a7c9a85f00 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -35,7 +35,7 @@ Sema::ActOnCXXConversionFunctionExpr(Scope *S, SourceLocation OperatorLoc, DeclarationName ConvName = Context.DeclarationNames.getCXXConversionFunctionName(ConvTypeCanon); return ActOnDeclarationNameExpr(S, OperatorLoc, ConvName, HasTrailingLParen, - &SS, /*ForceRes*/false, isAddressOfOperand); + &SS, isAddressOfOperand); } /// ActOnCXXOperatorFunctionIdExpr - Parse a C++ overloaded operator @@ -51,7 +51,7 @@ Sema::ActOnCXXOperatorFunctionIdExpr(Scope *S, SourceLocation OperatorLoc, bool isAddressOfOperand) { DeclarationName Name = Context.DeclarationNames.getCXXOperatorName(Op); return ActOnDeclarationNameExpr(S, OperatorLoc, Name, HasTrailingLParen, &SS, - /*ForceRes*/false, isAddressOfOperand); + isAddressOfOperand); } /// ActOnCXXTypeidOfType - Parse typeid( type-id ). -- cgit v1.2.3