summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-11-11 19:30:41 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-11-11 19:30:41 +0000
commit57e18ac96dc24540c4b512a3ad02a6255425e4a1 (patch)
treea44731ca7e48098ca30166dad18b90e6e13b5162 /clang/lib/Sema
parent981f31ac51006c66120d1c4cba0e626b85b3c32a (diff)
downloadbcm5719-llvm-57e18ac96dc24540c4b512a3ad02a6255425e4a1.tar.gz
bcm5719-llvm-57e18ac96dc24540c4b512a3ad02a6255425e4a1.zip
First half of CWG1962: decltype(__func__) should not be a reference type,
because __func__ is supposed to act like a local static variable. llvm-svn: 221698
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaType.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index a6f9483ecdc..5446f86af0f 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -5472,6 +5472,8 @@ static QualType getDecltypeForExpr(Sema &S, Expr *E) {
} else if (const ObjCPropertyRefExpr *PR = dyn_cast<ObjCPropertyRefExpr>(E)) {
if (PR->isExplicitProperty())
return PR->getExplicitProperty()->getType();
+ } else if (auto *PE = dyn_cast<PredefinedExpr>(E)) {
+ return PE->getType();
}
// C++11 [expr.lambda.prim]p18:
OpenPOWER on IntegriCloud