Comments (5)
Comment by Matthias M. Schneider (JIRA)
If you rename Point
to, for example, Pnt
then the stuct will be evaluated correctly and printed without producing the error.
from llvm-project.
Comment by Enrico Granata (JIRA)
Hi,
I am one of the engineers that work on the Swift REPL
I can reproduce the issue you're presenting and it is an issue with the LLDB data formatters subsystem
We have a set of builtin data formatters that help us pretty print different data types (for instance, the elements in a Swift array, or the contents of an NSString, ...)
One of those data formatters is for a type named 'Point' that comes from some old Mac OS X framework
It is defined thusly: `(v=${var.v}, h=${var.h})`
In the LLDB formatters syntax, this means that your point shall be printed as the string "(v=" followed by the value of the member "v" of your Point variable, the string ", h=" the value of your Point variable's "h" member, and then a closed parenthesis
In your example, the Point type you defined has neither a ".v" nor a ".h" member, so the LLDB formatter gets confused, and emits a print error instead of just falling back to normal printing
The workaround is to - before defining your Point structure - type at the REPL prompt:
:type summary delete -l objc Point
I can see a few ways to improve this experience here, and I am going to hold on to this issue so that I can actively track these possible avenues
Thanks for your report!
from llvm-project.
Comment by Matthias M. Schneider (JIRA)
Hi Enrico,
thanks for looking into this and the workaround. I would never have thought along those lines given that a newly started REPL session explicitly tells me that Point
is an "unresolved identifier" and as such I was happily playing along with the struct using this name. 😉
Your explanation is clear to me and I hope you and the team can fix this issue in the near future.
Cheers,
Mati
from llvm-project.
Comment by Matthias M. Schneider (JIRA)
The issue seems to be solved in snapshot 2016-01-11-a on Ubuntu 15.10.
from llvm-project.
Comment by Matthias M. Schneider (JIRA)
The issue seems to be fixed in current builds of Swift 2.2 and Swift 3.0.
from llvm-project.
Related Issues (20)
- Infinite recursion in ParseTrieEntries when parsing libGPUCompilerUtils.dylib HOT 1
- Apple Clang: std::source_location returns a wrong result if called in a function parameter.
- xros and visionos compilation support? HOT 4
- Module not found diagnostics are repeated multiply
- Compiler crash while serializing `std::optional` HOT 1
- A request to Apple to open-source the Metal Shading Language compiler
- [CI] apple-llvm-project-PR-windows fails to checkout `release/5.10`
- Usage of RemoteCachingService?
- CAS Unittests broken on Windows HOT 1
- `-finstrument-functions` linking error on Apple clang
- [IR lower bug] Apple's clang generated code will not abort when empty std::string call pop_back(), while llvm/clang do
- Compiler crash on Windows with `-index-store-path` HOT 1
- Compilation fails on Amazon Linux 2023 aarch64 HOT 1
- Doc Comments Are Ignored for Macros HOT 3
- DAP support
- Apple fork clang++ regression in partial specialization templates for hasher
- [HELP]what's the exactly command to build Xcode toolchain from this apple repo? HOT 1
- LLDB never finishes importing Swift modules/setting up Swift reflection HOT 8
- Clang crash: Idx < Size && "access in bound" in AssignmentTrackingAnalysis HOT 5
- Add support for <bit>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-project.