diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2012-10-19 08:08:02 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2012-10-19 08:08:02 +0000 |
commit | 2e3b7169595c02fd62cf4348772c3d2d68db17e3 (patch) | |
tree | eb438d78e63359c727e981aefc99be4b9541f5e3 /clang/lib/Sema/SemaExpr.cpp | |
parent | e0fc42580b026d1845b52174a3749b7686ea709d (diff) | |
download | bcm5719-llvm-2e3b7169595c02fd62cf4348772c3d2d68db17e3.tar.gz bcm5719-llvm-2e3b7169595c02fd62cf4348772c3d2d68db17e3.zip |
Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid.
Richard has an unreduced testcase to work with.
llvm-svn: 166272
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
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 |