summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-10-19 08:08:02 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-10-19 08:08:02 +0000
commit2e3b7169595c02fd62cf4348772c3d2d68db17e3 (patch)
treeeb438d78e63359c727e981aefc99be4b9541f5e3 /clang/lib/Sema/SemaExpr.cpp
parente0fc42580b026d1845b52174a3749b7686ea709d (diff)
downloadbcm5719-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.cpp14
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
OpenPOWER on IntegriCloud