forked from OSchip/llvm-project
[lldb] Centralize type "desugaring" logic in ClangASTContext
Summary: A *lot* of ClangASTContext functions contained repetitive code for "desugaring" certain kinds of clang types. This patch creates a utility function for performing this task. Right now it handles four types (auto, elaborated, paren and typedef), as these are the types that were handled everywhere. There are probably other kinds of types that could/should be added here too (TypeOf, decltype, ...), but I'm leaving that for a separate patch as doing that would not be NFC (though I'm pretty sure that adding them will not hurt, and it may in fact fix some bugs). In another patch I'd like to add "atomic" type to this list to properly display atomic structs. Since sometimes one may want to handle a certain kind of type specially (right now we have code which does that with typedefs), the Desugar function takes a "mask" argument, which can supress desugaring of certain kinds of types. Reviewers: teemperor, shafik Subscribers: jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71212
This commit is contained in:
parent
e9895c612a
commit
f482708149