aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-07-08 14:20:50 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-07-13 00:13:56 +0800
commit5791bcf9db0a3ec8bbce586dd99fce71fd773134 (patch)
treece37d7fc00a2c19b6d782ee28068e8d5071a8513 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parentaf0a26b476617af8d56d201a861bdece9c888434 (diff)
downloadllvm-5791bcf9db0a3ec8bbce586dd99fce71fd773134.zip
llvm-5791bcf9db0a3ec8bbce586dd99fce71fd773134.tar.gz
llvm-5791bcf9db0a3ec8bbce586dd99fce71fd773134.tar.bz2
[AST] [Modules] Handle full cases of DefaultArgStorage::setInherited
There were two assertions in DefaultArgStorage::setInherited previously. It requires the DefaultArgument is either empty or an argument value. It would crash if it has a pointer refers to the previous declaration or contains a chain to the previous declaration. But there are edge cases could hit them actually. One is InheritDefaultArguments.cppm that I found recently. Another one is pr31469.cpp, which was created fives years ago. This patch tries to fix the two failures by handling full cases in DefaultArgStorage::setInherited. This is guaranteed to not introduce any breaking change since it lives in the path we wouldn't touch before. And the added assertions for sameness should keep the correctness. Reviewed By: v.g.vassilev Differential Revision: https://reviews.llvm.org/D128974
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions