summaryrefslogtreecommitdiffstats
path: root/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp')
-rw-r--r--lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp b/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
new file mode 100644
index 00000000000..3785cd3c64c
--- /dev/null
+++ b/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
@@ -0,0 +1,20 @@
+namespace N0 {
+namespace N1 {
+
+char *buf0 = nullptr;
+char buf1[] = {0, 1, 2, 3, 4, 5, 6, 7};
+
+char sum(char *buf, int size) {
+ char result = 0;
+ for (int i = 0; i < size; i++)
+ result += buf[i];
+ return result;
+}
+
+} // namespace N1
+} // namespace N0
+
+int main() {
+ char result = N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1));
+ return 0;
+}
OpenPOWER on IntegriCloud