]> granicus.if.org Git - clang/commitdiff
Change condition to be the same as in SemaTemplateInstantiate.
authorNico Weber <nicolasweber@gmx.de>
Fri, 29 Jun 2012 16:39:58 +0000 (16:39 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 29 Jun 2012 16:39:58 +0000 (16:39 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159436 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index cd3c93b720d5ce92cb3d68b1c17e39cdf02cd932..e65c21d085b12c5fc62e6df497398e0703b73daa 100644 (file)
@@ -2498,7 +2498,7 @@ ExprResult Sema::ActOnPredefinedExpr(SourceLocation Loc, tok::TokenKind Kind) {
     unsigned Length = PredefinedExpr::ComputeName(IT, currentDecl).length();
 
     llvm::APInt LengthI(32, Length + 1);
-    if (Kind == tok::kw_L__FUNCTION__)
+    if (IT == PredefinedExpr::LFunction)
       ResTy = Context.WCharTy.withConst();
     else
       ResTy = Context.CharTy.withConst();