diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-11-11 19:30:41 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-11-11 19:30:41 +0000 |
| commit | 57e18ac96dc24540c4b512a3ad02a6255425e4a1 (patch) | |
| tree | a44731ca7e48098ca30166dad18b90e6e13b5162 /clang/lib/Sema | |
| parent | 981f31ac51006c66120d1c4cba0e626b85b3c32a (diff) | |
| download | bcm5719-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.cpp | 2 |
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: |

