From 2e3b7169595c02fd62cf4348772c3d2d68db17e3 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 19 Oct 2012 08:08:02 +0000 Subject: Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid. Richard has an unreduced testcase to work with. llvm-svn: 166272 --- clang/lib/Sema/SemaExpr.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 702d6c7bb7b..86091d50a39 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1895,8 +1895,7 @@ ExprResult Sema::ActOnIdExpression(Scope *S, /// this path. ExprResult Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, - const DeclarationNameInfo &NameInfo, - bool IsAddressOfOperand) { + const DeclarationNameInfo &NameInfo) { DeclContext *DC; if (!(DC = computeDeclContext(SS, false)) || DC->isDependentContext()) return BuildDependentDeclRefExpr(SS, /*TemplateKWLoc=*/SourceLocation(), @@ -1917,16 +1916,7 @@ Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, return ExprError(); } - // Defend against this resolving to an implicit member access. We usually - // won't get here if this might be a legitimate a class member (we end up in - // BuildMemberReferenceExpr instead), but this can be valid if we're forming - // a pointer-to-member or in an unevaluated context in C++11. - if (!R.empty() && (*R.begin())->isCXXClassMember() && !IsAddressOfOperand) - return BuildPossibleImplicitMemberExpr(SS, - /*TemplateKWLoc=*/SourceLocation(), - R, /*TemplateArgs=*/0); - - return BuildDeclarationNameExpr(SS, R, /* ADL */ false); + return BuildDeclarationNameExpr(SS, R, /*ADL*/ false); } /// LookupInObjCMethod - The parser has read a name in, and Sema has -- cgit v1.2.3