From 4c26494f856896823a2fa1776761337eedf44097 Mon Sep 17 00:00:00 2001 From: Sean Cannella Date: Fri, 7 Jun 2013 15:01:07 -0700 Subject: [PATCH] Make Nemo aware of functions defined in systemlib Now that we define functions in systemlib they also need to be available during static (Nemo) analysis. --- hphp/compiler/builtin_symbols.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hphp/compiler/builtin_symbols.cpp b/hphp/compiler/builtin_symbols.cpp index 8c8482db6b3..e8eddeedf6d 100644 --- a/hphp/compiler/builtin_symbols.cpp +++ b/hphp/compiler/builtin_symbols.cpp @@ -357,6 +357,14 @@ bool BuiltinSymbols::Load(AnalysisResultPtr ar, bool extOnly /* = false */) { assert(!s_classes[iter->first]); s_classes[iter->first] = iter->second[0]; } + + const StringToFunctionScopePtrMap &functions = + iterFile->second->getFunctions(); + for (StringToFunctionScopePtrMap::const_iterator iter = functions.begin(); + iter != functions.end(); ++iter) { + iter->second->setSystem(); + s_functions[iter->first] = iter->second; + } } } else { NoSuperGlobals = true; -- 2.11.4.GIT