--- /srv/rebuilderd/tmp/rebuilderdWXEbYA/inputs/clang-20-doc_20.1.8-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdWXEbYA/out/clang-20-doc_20.1.8-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-11-06 11:51:02.000000 debian-binary │ --rw-r--r-- 0 0 0 8068 2025-11-06 11:51:02.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1796408 2025-11-06 11:51:02.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 7876 2025-11-06 11:51:02.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 1693124 2025-11-06 11:51:02.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── file list │ │ │ @@ -1,3 +1,3 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-11-06 11:51:02.000000 ./ │ │ │ -rw-r--r-- 0 root (0) root (0) 683 2025-11-06 11:51:02.000000 ./control │ │ │ --rw-r--r-- 0 root (0) root (0) 25581 2025-11-06 11:51:02.000000 ./md5sums │ │ │ +-rw-r--r-- 0 root (0) root (0) 24825 2025-11-06 11:51:02.000000 ./md5sums │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: clang-20-doc │ │ │ Source: llvm-toolchain-20 │ │ │ Version: 1:20.1.8-1 │ │ │ Architecture: all │ │ │ Maintainer: LLVM Packaging Team │ │ │ -Installed-Size: 10353 │ │ │ +Installed-Size: 10231 │ │ │ Depends: libjs-mathjax │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: https://www.llvm.org/ │ │ │ Description: C, C++ and Objective-C compiler - Documentation │ │ │ Clang project is a C, C++, Objective C and Objective C++ front-end │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -113,20 +113,14 @@ │ │ │ │ usr/share/doc/clang-20/html/_images/analyzer_xcode.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_attribute_nonnull.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_cf_returns_retained.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_custom_assert.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_ns_returns_retained.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_null_pointer.png │ │ │ │ usr/share/doc/clang-20/html/_images/example_use_assert.png │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-0fc8c8b233b963d253c9932bcac5cacbcad64c55.png │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-0fc8c8b233b963d253c9932bcac5cacbcad64c55.png.map │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-8bd6c343217e10c1eaa15158ed422b754dadd774.png │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-8bd6c343217e10c1eaa15158ed422b754dadd774.png.map │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-b62509796e43fe87e51988caafb8ab5c16f15616.png │ │ │ │ -usr/share/doc/clang-20/html/_images/graphviz-b62509796e43fe87e51988caafb8ab5c16f15616.png.map │ │ │ │ usr/share/doc/clang-20/html/_images/scan_build_cmd.png │ │ │ │ usr/share/doc/clang-20/html/_sources/AMDGPUSupport.rst.txt │ │ │ │ usr/share/doc/clang-20/html/_sources/APINotes.rst.txt │ │ │ │ usr/share/doc/clang-20/html/_sources/AddressSanitizer.rst.txt │ │ │ │ usr/share/doc/clang-20/html/_sources/AutomaticReferenceCounting.rst.txt │ │ │ │ usr/share/doc/clang-20/html/_sources/Block-ABI-Apple.rst.txt │ │ │ │ usr/share/doc/clang-20/html/_sources/BlockLanguageSpec.rst.txt ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -24,15 +24,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 30848 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangFormat.html │ │ │ -rw-r--r-- 0 root (0) root (0) 658021 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangFormatStyleOptions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13293 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangLinkerWrapper.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7962 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangNVLinkWrapper.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53144 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangOffloadBundler.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14801 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangOffloadPackager.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24715 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangPlugins.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31909 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangRepl.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35461 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangRepl.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7558 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangSYCLLinker.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5762 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangStaticAnalyzer.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14310 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangTools.html │ │ │ -rw-r--r-- 0 root (0) root (0) 45808 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/ClangTransformerTutorial.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/CommandGuide/ │ │ │ -rw-r--r-- 0 root (0) root (0) 73999 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/CommandGuide/clang.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5208 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/CommandGuide/diagtool.html │ │ │ @@ -124,20 +124,14 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 87697 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/analyzer_xcode.png │ │ │ -rw-r--r-- 0 root (0) root (0) 25028 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_attribute_nonnull.png │ │ │ -rw-r--r-- 0 root (0) root (0) 43528 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_cf_returns_retained.png │ │ │ -rw-r--r-- 0 root (0) root (0) 23686 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_custom_assert.png │ │ │ -rw-r--r-- 0 root (0) root (0) 40406 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_ns_returns_retained.png │ │ │ -rw-r--r-- 0 root (0) root (0) 23580 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_null_pointer.png │ │ │ -rw-r--r-- 0 root (0) root (0) 25513 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/example_use_assert.png │ │ │ --rw-r--r-- 0 root (0) root (0) 12155 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-0fc8c8b233b963d253c9932bcac5cacbcad64c55.png │ │ │ --rw-r--r-- 0 root (0) root (0) 57 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-0fc8c8b233b963d253c9932bcac5cacbcad64c55.png.map │ │ │ --rw-r--r-- 0 root (0) root (0) 64698 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-8bd6c343217e10c1eaa15158ed422b754dadd774.png │ │ │ --rw-r--r-- 0 root (0) root (0) 55 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-8bd6c343217e10c1eaa15158ed422b754dadd774.png.map │ │ │ --rw-r--r-- 0 root (0) root (0) 47040 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-b62509796e43fe87e51988caafb8ab5c16f15616.png │ │ │ --rw-r--r-- 0 root (0) root (0) 49 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_images/graphviz-b62509796e43fe87e51988caafb8ab5c16f15616.png.map │ │ │ -rw-r--r-- 0 root (0) root (0) 29669 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_images/scan_build_cmd.png │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_sources/ │ │ │ -rw-r--r-- 0 root (0) root (0) 2143 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/AMDGPUSupport.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 11820 2025-07-17 07:29:49.000000 ./usr/share/doc/clang-20/html/_sources/APINotes.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 13823 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/AddressSanitizer.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 119174 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/AutomaticReferenceCounting.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 33816 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/Block-ABI-Apple.rst.txt │ │ │ @@ -155,15 +149,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 8760 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangPlugins.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 22078 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangRepl.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 3674 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangSYCLLinker.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 541 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangStaticAnalyzer.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 5905 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangTools.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 18275 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ClangTransformerTutorial.rst.txt │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_sources/CommandGuide/ │ │ │ --rw-r--r-- 0 root (0) root (0) 23325 2025-11-05 17:06:48.000000 ./usr/share/doc/clang-20/html/_sources/CommandGuide/clang.rst.txt │ │ │ +-rw-r--r-- 0 root (0) root (0) 23325 2025-11-06 11:51:02.000000 ./usr/share/doc/clang-20/html/_sources/CommandGuide/clang.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 1125 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/CommandGuide/diagtool.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 521 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/CommandGuide/index.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 11893 2025-07-17 07:29:49.000000 ./usr/share/doc/clang-20/html/_sources/ConstantInterpreter.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 19228 2025-07-17 07:29:49.000000 ./usr/share/doc/clang-20/html/_sources/ControlFlowIntegrity.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 31670 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/ControlFlowIntegrityDesign.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 9559 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/CrossCompilation.rst.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 30873 2025-07-05 11:22:45.000000 ./usr/share/doc/clang-20/html/_sources/DataFlowAnalysisIntro.md.txt │ │ ├── ./usr/share/doc/clang-20/html/ClangRepl.html │ │ │ @@ -230,16 +230,48 @@ │ │ │

How Execution Results are captured (Value Synthesis):

│ │ │

The synthesizer chooses which expression to synthesize, and then it replaces │ │ │ the original expression with the synthesized expression. Depending on the │ │ │ expression type, it may choose to save an object (LastValue) of type ‘value’ │ │ │ while allocating memory to it (SetValueWithAlloc()), or not ( │ │ │ SetValueNoAlloc()).

│ │ │
│ │ │ -
Shows how an object of type 'Value' is synthesized
│ │ │ -
│ │ │ + digraph "valuesynthesis" { │ │ │ + rankdir="LR"; │ │ │ + graph [fontname="Verdana", fontsize="12"]; │ │ │ + node [fontname="Verdana", fontsize="12"]; │ │ │ + edge [fontname="Sans", fontsize="9"]; │ │ │ + │ │ │ + start [label=" Create an Object \n 'Last Value' \n of type 'Value' ", shape="note", fontcolor=white, fillcolor="#3333ff", style=filled]; │ │ │ + assign [label=" Assign the result \n to the 'LastValue' \n (based on respective \n Memory Allocation \n scenario) ", shape="box"] │ │ │ + print [label=" Pretty Print \n the Value Object ", shape="Msquare", fillcolor="yellow", style=filled]; │ │ │ + start -> assign; │ │ │ + assign -> print; │ │ │ + │ │ │ + subgraph SynthesizeExpression { │ │ │ + synth [label=" SynthesizeExpr() ", shape="note", fontcolor=white, fillcolor="#3333ff", style=filled]; │ │ │ + mem [label=" New Memory \n Allocation? ", shape="diamond"]; │ │ │ + withaloc [label=" SetValueWithAlloc() ", shape="box"]; │ │ │ + noaloc [label=" SetValueNoAlloc() ", shape="box"]; │ │ │ + right [label=" 1. RValue Structure \n (a temporary value)", shape="box"]; │ │ │ + left2 [label=" 2. LValue Structure \n (a variable with \n an address)", shape="box"]; │ │ │ + left3 [label=" 3. Built-In Type \n (int, float, etc.)", shape="box"]; │ │ │ + output [label=" move to 'Assign' step ", shape="box"]; │ │ │ + │ │ │ + synth -> mem; │ │ │ + mem -> withaloc [label="Yes"]; │ │ │ + mem -> noaloc [label="No"]; │ │ │ + withaloc -> right; │ │ │ + noaloc -> left2; │ │ │ + noaloc -> left3; │ │ │ + right -> output; │ │ │ + left2 -> output; │ │ │ + left3 -> output; │ │ │ + } │ │ │ + output -> assign │ │ │ + }
│ │ │

Value Synthesis

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │

Where is the captured result stored?

│ │ │

LastValue holds the last result of the value printing. It is a class member │ │ │ @@ -360,16 +392,29 @@ │ │ │

How value printing is simplified (Automatic Printf)

│ │ │

The Automatic Printf feature makes it easy to display variable values during │ │ │ program execution. Using the printf function repeatedly is not required. │ │ │ This is achieved using an extension in the libclangInterpreter library.

│ │ │

To automatically print the value of an expression, simply write the expression │ │ │ in the global scope without a semicolon.

│ │ │
│ │ │ -
Shows how Automatic PrintF can be used
│ │ │ -
│ │ │ + digraph "AutomaticPrintF" { │ │ │ + size="6,4"; │ │ │ + rankdir="LR"; │ │ │ + graph [fontname="Verdana", fontsize="12"]; │ │ │ + node [fontname="Verdana", fontsize="12"]; │ │ │ + edge [fontname="Sans", fontsize="9"]; │ │ │ + │ │ │ + manual [label=" Manual PrintF ", shape="box"]; │ │ │ + int1 [label=" int ( &) 42 ", shape="box"] │ │ │ + auto [label=" Automatic PrintF ", shape="box"]; │ │ │ + int2 [label=" int ( &) 42 ", shape="box"] │ │ │ + │ │ │ + auto -> int2 [label="int x = 42; \n x"]; │ │ │ + manual -> int1 [label="int x = 42; \n printf("(int &) %d \\n", x);"]; │ │ │ + }
│ │ │

Automatic PrintF

│ │ │
│ │ │
│ │ │
│ │ │
│ │ │

Significance of this feature

│ │ │

Inspired by a similar implementation in Cling, │ │ │ @@ -389,16 +434,39 @@ │ │ │

Parsing mechanism:

│ │ │

The Interpreter in Clang-Repl (Interpreter.cpp) includes the function │ │ │ ParseAndExecute() that can accept a ‘Value’ parameter to capture the result. │ │ │ But if the value parameter is made optional and it is omitted (i.e., that the │ │ │ user does not want to utilize it elsewhere), then the last value can be │ │ │ validated and pushed into the dump() function.

│ │ │
│ │ │ -
Shows the Parsing Mechanism for Pretty Printing
│ │ │ -
│ │ │ + digraph "prettyprint" { │ │ │ + rankdir="LR"; │ │ │ + graph [fontname="Verdana", fontsize="12"]; │ │ │ + node [fontname="Verdana", fontsize="12"]; │ │ │ + edge [fontname="Verdana", fontsize="9"]; │ │ │ + │ │ │ + parse [label=" ParseAndExecute() \n in Clang ", shape="box"]; │ │ │ + capture [label=" Capture 'Value' parameter \n for processing? ", shape="diamond"]; │ │ │ + use [label=" Use for processing ", shape="box"]; │ │ │ + dump [label=" Validate and push \n to dump()", shape="box"]; │ │ │ + callp [label=" call print() function ", shape="box"]; │ │ │ + type [label=" Print the Type \n ReplPrintTypeImpl()", shape="box"]; │ │ │ + data [label=" Print the Data \n ReplPrintDataImpl() ", shape="box"]; │ │ │ + output [label=" Output Pretty Print \n to the user ", shape="box", fontcolor=white, fillcolor="#3333ff", style=filled]; │ │ │ + │ │ │ + parse -> capture [label="Optional 'Value' Parameter"]; │ │ │ + capture -> use [label="Yes"]; │ │ │ + use -> End; │ │ │ + capture -> dump [label="No"]; │ │ │ + dump -> callp; │ │ │ + callp -> type; │ │ │ + callp -> data; │ │ │ + type -> output; │ │ │ + data -> output; │ │ │ + }
│ │ │

Parsing Mechanism

│ │ │
│ │ │
│ │ │

Note: Following is a sample code snippet. Actual code may vary over time.

│ │ │
llvm::Error Interpreter::ParseAndExecute(llvm::StringRef Code, Value *V) {
│ │ │  
│ │ │  auto PTU = Parse(Code);
│ │ │ ├── html2text {}
│ │ │ │ @@ -145,15 +145,33 @@
│ │ │ │  compiled program. This result can be stored in an object of type VVaalluuee.
│ │ │ │  ******** HHooww EExxeeccuuttiioonn RReessuullttss aarree ccaappttuurreedd ((VVaalluuee SSyynntthheessiiss))::_?¶ ********
│ │ │ │  The synthesizer chooses which expression to synthesize, and then it replaces
│ │ │ │  the original expression with the synthesized expression. Depending on the
│ │ │ │  expression type, it may choose to save an object (LastValue) of type ‘value’
│ │ │ │  while allocating memory to it (SetValueWithAlloc()), or not ( SetValueNoAlloc
│ │ │ │  ()).
│ │ │ │ -[Shows how an object of type 'Value' is synthesized]
│ │ │ │ +digraph "valuesynthesis" { rankdir="LR"; graph [fontname="Verdana",
│ │ │ │ +fontsize="12"]; node [fontname="Verdana", fontsize="12"]; edge
│ │ │ │ +[fontname="Sans", fontsize="9"]; start [label=" Create an Object \n 'Last
│ │ │ │ +Value' \n of type 'Value' ", shape="note", fontcolor=white,
│ │ │ │ +fillcolor="#3333ff", style=filled]; assign [label=" Assign the result \n to the
│ │ │ │ +'LastValue' \n (based on respective \n Memory Allocation \n scenario) ",
│ │ │ │ +shape="box"] print [label=" Pretty Print \n the Value Object ",
│ │ │ │ +shape="Msquare", fillcolor="yellow", style=filled]; start -> assign; assign -
│ │ │ │ +> print; subgraph SynthesizeExpression { synth [label=" SynthesizeExpr() ",
│ │ │ │ +shape="note", fontcolor=white, fillcolor="#3333ff", style=filled]; mem [label="
│ │ │ │ +New Memory \n Allocation? ", shape="diamond"]; withaloc [label="
│ │ │ │ +SetValueWithAlloc() ", shape="box"]; noaloc [label=" SetValueNoAlloc() ",
│ │ │ │ +shape="box"]; right [label=" 1. RValue Structure \n (a temporary value)",
│ │ │ │ +shape="box"]; left2 [label=" 2. LValue Structure \n (a variable with \n an
│ │ │ │ +address)", shape="box"]; left3 [label=" 3. Built-In Type \n (int, float,
│ │ │ │ +etc.)", shape="box"]; output [label=" move to 'Assign' step ", shape="box"];
│ │ │ │ +synth -> mem; mem -> withaloc [label="Yes"]; mem -> noaloc [label="No"];
│ │ │ │ +withaloc -> right; noaloc -> left2; noaloc -> left3; right -> output; left2 -
│ │ │ │ +> output; left3 -> output; } output -> assign }
│ │ │ │  Value Synthesis_¶
│ │ │ │  ******** WWhheerree iiss tthhee ccaappttuurreedd rreessuulltt ssttoorreedd??_?¶ ********
│ │ │ │  LastValue holds the last result of the value printing. It is a class member
│ │ │ │  because it can be accessed even after subsequent inputs.
│ │ │ │  NNoottee:: If no value printing happens, then it is in an invalid state.
│ │ │ │  ******** IImmpprroovviinngg EEffffiicciieennccyy aanndd UUsseerr EExxppeerriieennccee_?¶ ********
│ │ │ │  The Value object is essentially used to create a mapping between an expression
│ │ │ │ @@ -244,15 +262,21 @@
│ │ │ │  interpreter during interactive programming.
│ │ │ │  ******** HHooww vvaalluuee pprriinnttiinngg iiss ssiimmpplliiffiieedd ((AAuuttoommaattiicc PPrriinnttff))_?¶ ********
│ │ │ │  The Automatic Printf feature makes it easy to display variable values during
│ │ │ │  program execution. Using the printf function repeatedly is not required. This
│ │ │ │  is achieved using an extension in the libclangInterpreter library.
│ │ │ │  To automatically print the value of an expression, simply write the expression
│ │ │ │  in the global scope wwiitthhoouutt aa sseemmiiccoolloonn.
│ │ │ │ -[Shows how Automatic PrintF can be used]
│ │ │ │ +digraph "AutomaticPrintF" { size="6,4"; rankdir="LR"; graph
│ │ │ │ +[fontname="Verdana", fontsize="12"]; node [fontname="Verdana", fontsize="12"];
│ │ │ │ +edge [fontname="Sans", fontsize="9"]; manual [label=" Manual PrintF ",
│ │ │ │ +shape="box"]; int1 [label=" int ( &) 42 ", shape="box"] auto [label=" Automatic
│ │ │ │ +PrintF ", shape="box"]; int2 [label=" int ( &) 42 ", shape="box"] auto -> int2
│ │ │ │ +[label="int x = 42; \n x"]; manual -> int1 [label="int x = 42; \n printf("
│ │ │ │ +(int &) %d \\n", x);"]; }
│ │ │ │  Automatic PrintF_¶
│ │ │ │  ******** SSiiggnniiffiiccaannccee ooff tthhiiss ffeeaattuurree_?¶ ********
│ │ │ │  Inspired by a similar implementation in _C_l_i_n_g, this feature added to upstream
│ │ │ │  Clang repo has essentially extended the syntax of C++, so that it can be more
│ │ │ │  helpful for people that are writing code for data science applications.
│ │ │ │  This is useful, for example, when you want to experiment with a set of values
│ │ │ │  against a set of functions, and you’d like to know the results right away. This
│ │ │ │ @@ -262,15 +286,27 @@
│ │ │ │  ********** IImmpplleemmeennttaattiioonn DDeettaaiillss_?¶ **********
│ │ │ │  ******** PPaarrssiinngg mmeecchhaanniissmm::_?¶ ********
│ │ │ │  The Interpreter in Clang-Repl (Interpreter.cpp) includes the function
│ │ │ │  ParseAndExecute() that can accept a ‘Value’ parameter to capture the result.
│ │ │ │  But if the value parameter is made optional and it is omitted (i.e., that the
│ │ │ │  user does not want to utilize it elsewhere), then the last value can be
│ │ │ │  validated and pushed into the dump() function.
│ │ │ │ -[Shows the Parsing Mechanism for Pretty Printing]
│ │ │ │ +digraph "prettyprint" { rankdir="LR"; graph [fontname="Verdana",
│ │ │ │ +fontsize="12"]; node [fontname="Verdana", fontsize="12"]; edge
│ │ │ │ +[fontname="Verdana", fontsize="9"]; parse [label=" ParseAndExecute() \n in
│ │ │ │ +Clang ", shape="box"]; capture [label=" Capture 'Value' parameter \n for
│ │ │ │ +processing? ", shape="diamond"]; use [label=" Use for processing ",
│ │ │ │ +shape="box"]; dump [label=" Validate and push \n to dump()", shape="box"];
│ │ │ │ +callp [label=" call print() function ", shape="box"]; type [label=" Print the
│ │ │ │ +Type \n ReplPrintTypeImpl()", shape="box"]; data [label=" Print the Data \n
│ │ │ │ +ReplPrintDataImpl() ", shape="box"]; output [label=" Output Pretty Print \n to
│ │ │ │ +the user ", shape="box", fontcolor=white, fillcolor="#3333ff", style=filled];
│ │ │ │ +parse -> capture [label="Optional 'Value' Parameter"]; capture -> use
│ │ │ │ +[label="Yes"]; use -> End; capture -> dump [label="No"]; dump -> callp; callp -
│ │ │ │ +> type; callp -> data; type -> output; data -> output; }
│ │ │ │  Parsing Mechanism_¶
│ │ │ │  NNoottee:: Following is a sample code snippet. Actual code may vary over time.
│ │ │ │  llvm::Error Interpreter::ParseAndExecute(llvm::StringRef Code, Value *V) {
│ │ │ │  
│ │ │ │  auto PTU = Parse(Code);
│ │ │ │  if (!PTU)
│ │ │ │      return PTU.takeError();