[PATCH] D118552: [clang] [concepts] Correctly(?) handle placeholder types in ExprRequirements.
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 30 07:22:12 PST 2022
Quuxplusone added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:3375
+ assert(T->isSpecificPlaceholderType(BuiltinType::UnknownAny) && "Unresolved placeholder type");
+ }
----------------
Quuxplusone wrote:
> Btw, I strongly suspect that the presence of placeholder type `UnknownAny` all the way down in here is a bug (@rjmccall, thoughts?). But I found that the test suite didn't pass without this exception, and I'm not terribly interested in tracking down why; I don't have any idea what `UnknownAny` is, myself.
>>! In D118552#3282538, @rjmccall wrote:
> It's a type that the debugger integration uses when it doesn't know the type of a symbol. If it's a data symbol, you make a `VarDecl` with `UnknownAny` type; if it's a function symbol, you make a `FunctionDecl` with `UnknownAny`. In either case, if the user fails to cast it, it gets diagnosed as an error.
>
> I can't think of any reason why we'd want to build a reference to `UnknownAny` type; generally it's bad if the type "escapes" into subordinate positions. Probably we should be diagnosing something before we try to propagate the `UnknownAny` type.
I've found https://github.com/llvm/llvm-project/issues/32247 on the same topic, and updated it with a comment and my own test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118552/new/
https://reviews.llvm.org/D118552
More information about the cfe-commits
mailing list