================
@@ -339,6 +463,40 @@ std::string DILParser::ParseUnqualifiedId() {
return identifier;
}
+CompilerType
+DILParser::ResolveTypeDeclarators(CompilerType type,
+ const std::vector<Token> &ptr_operators) {
+ CompilerType bad_type;
+ // Resolve pointers/references.
+ for (Token tk : ptr_operators) {
+ uint32_t loc = tk.GetLocation();
+ if (tk.GetKind() == Token::star) {
+ // Pointers to reference types are forbidden.
+ if (type.IsReferenceType()) {
+ BailOut(llvm::formatv("'type name' declared as a pointer to a "
+ "reference of type {0}",
+ type.TypeDescription()),
+ loc, CurToken().GetSpelling().length());
+ return bad_type;
+ }
----------------
jimingham wrote:
The DIL implements the inspection of values in memory. The operations it
supports aren't intended to be "language accurate", for instance we aren't
calling overloaded operators, etc. And because of the ways you can name the
children provided by synthetic child providers, it may even not describe the
objects as they might appear in the source language.
So for that reason, I don't want to give the impression that this IS the
expression parser. That's one reason why I think it isn't terribly important
that we support each (or even the current) language's way to express cast,
dereference, etc. That's just doing work to make an impression that isn't
correct.
https://github.com/llvm/llvm-project/pull/165199
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits