From 7b417f22f68069357e85a7d9deae6aa678f2533e Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Wed, 1 Jan 2014 20:44:55 -0500 Subject: [PATCH] Tests contributed by Barry OReilly * test/manual/cedet/integ_src/globalref/src/Util.cc: These test files contributed by Barry OReilly, modified for use in the automated tests for CEDET, and with additional comments. inc/Util.hh, src/Util.cc: Search symbol both in and outside of namespaces. --- .../cedet/integ_src/globalref/src/Util.cc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/manual/cedet/integ_src/globalref/src/Util.cc diff --git a/test/manual/cedet/integ_src/globalref/src/Util.cc b/test/manual/cedet/integ_src/globalref/src/Util.cc new file mode 100644 index 00000000000..5c1b327b07f --- /dev/null +++ b/test/manual/cedet/integ_src/globalref/src/Util.cc @@ -0,0 +1,22 @@ +#include +#include "Util.hh" + +// +// This file contains the impl for the symbols in inc/Util.hh +// and this is the destination of some symref jumps. +// +namespace play { namespace prod { + + // The symbol in namespaces. + int myUtilFunc(const int param) { + printf("Inside myUtilFunc(%d).\n", param); + return param; + } + + }} + +// The symbol outside of namespaces. +int myUtilFuncNoNS(const int param) { + printf("Inside myUtilFuncNoNS(%d).\n", param); + return param; +} -- 2.39.5