summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-07-28 19:54:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-07-28 19:54:11 +0000
commitf86b0ae196c3a2f8862bf926a5867a5029e8ace7 (patch)
treecba9f291839d7d23ceb0147f0bbb8da7aabe915f /clang/lib/Sema
parentf7759e8fabe036696f2a1352c53ed3806fafbdd6 (diff)
downloadbcm5719-llvm-f86b0ae196c3a2f8862bf926a5867a5029e8ace7.tar.gz
bcm5719-llvm-f86b0ae196c3a2f8862bf926a5867a5029e8ace7.zip
PR13433: In Microsoft mode, don't require function calls within decltype
expressions to have complete return types (or accessible destructors). If the return type is required to be complete for some other reason (for instance, if it is needed by overload resolution), then it will still be required to be complete. This is apparently required in order to parse a MSVC11 header. llvm-svn: 160924
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 278549b4b7d..b47bd970d05 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -4783,6 +4783,11 @@ ExprResult Sema::ActOnDecltypeExpression(Expr *E) {
// Disable the special decltype handling now.
Rec.IsDecltype = false;
+ // In MS mode, don't perform any extra checking of call return types within a
+ // decltype expression.
+ if (getLangOpts().MicrosoftMode)
+ return Owned(E);
+
// Perform the semantic checks we delayed until this point.
CallExpr *TopCall = dyn_cast<CallExpr>(E);
for (unsigned I = 0, N = Rec.DelayedDecltypeCalls.size(); I != N; ++I) {
OpenPOWER on IntegriCloud