From 34866c7719f893c957d93f5918f760b6edebd6be Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 31 Aug 2012 00:14:07 +0000 Subject: Change the representation of builtin functions in the AST (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962 --- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 56858f4883e..8881f26366b 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -266,7 +266,8 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, case CK_NoOp: case CK_ConstructorConversion: case CK_UserDefinedConversion: - case CK_FunctionToPointerDecay: { + case CK_FunctionToPointerDecay: + case CK_BuiltinFnToFnPtr: { // Copy the SVal of Ex to CastE. ProgramStateRef state = Pred->getState(); const LocationContext *LCtx = Pred->getLocationContext(); -- cgit v1.2.3