[clang][Sema] Fix uninitialized `SourceLocation` for types with multiple attributes and macros.
Some `TypeLoc`s are considered "sugar" and we go past them in `GetTypeSourceInfoForDeclarator`. The problem is that we peel off only the same kind of `TypeLoc` at the time which makes it impossible to handle mixed sequences like `AttributedTypeLoc - MacroQualifiedTypeLoc - AttributedTypeLoc - PointerTypeLoc` In this situation, as shown in the added test, we don't get to `PointerTypeLoc` and don't set its starLoc leaving it uninitialized. Address FIXME and peel off "sugar" `TypeLoc`s regardless of their order. rdar://102149264 Differential Revision: https://reviews.llvm.org/D141424
Loading
Please sign in to comment