[cfe-commits] r51188 - /cfe/trunk/lib/AST/Expr.cpp
Eli Friedman
eli.friedman at gmail.com
Fri May 16 06:28:55 PDT 2008
Author: efriedma
Date: Fri May 16 08:28:37 2008
New Revision: 51188
URL: http://llvm.org/viewvc/llvm-project?rev=51188&view=rev
Log:
Minor cleanup to isBuiltinConstantExpr.
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=51188&r1=51187&r2=51188&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri May 16 08:28:37 2008
@@ -141,9 +141,8 @@
return false;
// We have a builtin that is a constant expression
- if (builtinID == Builtin::BI__builtin___CFStringMakeConstantString)
- return true;
- return false;
+ return builtinID == Builtin::BI__builtin___CFStringMakeConstantString ||
+ builtinID == Builtin::BI__builtin_classify_type;
}
bool CallExpr::isBuiltinClassifyType(llvm::APSInt &Result) const {
@@ -517,10 +516,6 @@
return true;
case CallExprClass: {
const CallExpr *CE = cast<CallExpr>(this);
- llvm::APSInt Result(32);
- Result.zextOrTrunc(static_cast<uint32_t>(Ctx.getTypeSize(getType())));
- if (CE->isBuiltinClassifyType(Result))
- return true;
if (CE->isBuiltinConstantExpr())
return true;
if (Loc) *Loc = getLocStart();
More information about the cfe-commits
mailing list