aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2023-01-10 12:41:11 -0800
committerVolodymyr Sapsai <vsapsai@apple.com>2023-01-18 16:15:53 -0600
commit304d7307aee15b6eb88d198ae94b595f4e09f485 (patch)
tree8925002ec068a9f822e14c3596b2461dd44ece55 /clang/lib/Frontend/TestModuleFileExtension.cpp
parentd3da9067d143f3d4ce59b6d9ab4606a8ef1dc937 (diff)
downloadllvm-304d7307aee15b6eb88d198ae94b595f4e09f485.zip
llvm-304d7307aee15b6eb88d198ae94b595f4e09f485.tar.gz
llvm-304d7307aee15b6eb88d198ae94b595f4e09f485.tar.bz2
[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
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions