summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-10-11 23:14:30 +0000
committerJohn McCall <rjmccall@apple.com>2011-10-11 23:14:30 +0000
commit50a2c2c19de5ec57b7dc7201637547cab5109aca (patch)
treebf60e7ea2281948b0df2cafa4772547c5ec79ad0 /clang/lib/Sema/SemaExprCXX.cpp
parent8d4f74a6b12bccc879b7ea44e9634d6c5c71f523 (diff)
downloadbcm5719-llvm-50a2c2c19de5ec57b7dc7201637547cab5109aca.tar.gz
bcm5719-llvm-50a2c2c19de5ec57b7dc7201637547cab5109aca.zip
Catch placeholder types in DefaultLvalueConversion
and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. llvm-svn: 141738
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 0db8cd494ee..6a2b76adfe0 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -295,6 +295,12 @@ ExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
SourceLocation RParenLoc) {
bool isUnevaluatedOperand = true;
if (E && !E->isTypeDependent()) {
+ if (E->getType()->isPlaceholderType()) {
+ ExprResult result = CheckPlaceholderExpr(E);
+ if (result.isInvalid()) return ExprError();
+ E = result.take();
+ }
+
QualType T = E->getType();
if (const RecordType *RecordT = T->getAs<RecordType>()) {
CXXRecordDecl *RecordD = cast<CXXRecordDecl>(RecordT->getDecl());
OpenPOWER on IntegriCloud