diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2020-05-06 08:56:42 +0200 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2020-05-06 11:47:03 +0200 |
commit | c6e1fd70fb24d52daff4ec3fca1a89adfe7c2a0b (patch) | |
tree | 3e833225fc0a49498b6a9260d0266f622416f90b /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
parent | fb4574df52fd7ffed206569e74161008e95b1922 (diff) | |
download | llvm-c6e1fd70fb24d52daff4ec3fca1a89adfe7c2a0b.zip llvm-c6e1fd70fb24d52daff4ec3fca1a89adfe7c2a0b.tar.gz llvm-c6e1fd70fb24d52daff4ec3fca1a89adfe7c2a0b.tar.bz2 |
[clang] Fix a crash on invalid auto.
Summary:
The crash is triggered on accessing a null InitExpr.
For group declaration, e.g. `auto c = a, &d = {a};`, what's happening:
1. each VarDecl is built separately during the parsing stage.
2. perform the semantic analysis (Sema::BuildDeclaratorGroup) to check
whether the type of the two VarDecl is the same, if not mark it as invalid.
in step 1, VarDecl c and d are built, both of them are valid (after D77395),
but d is without the InitExpr attached (under -fno-recovery-ast), crash
happens in step 2 when accessing the source range of d's InitExpr.
Reviewers: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79473
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
0 files changed, 0 insertions, 0 deletions