[all-commits] [llvm/llvm-project] c673d6: [AST] Dont invalidate a ref-type var decl if it ha...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Wed May 25 06:14:55 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c673d67bc76bfa31b78e3eee23899b9f262158ea
https://github.com/llvm/llvm-project/commit/c673d67bc76bfa31b78e3eee23899b9f262158ea
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2022-05-25 (Wed, 25 May 2022)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/AST/ast-dump-invalid-initialized.cpp
Log Message:
-----------
[AST] Dont invalidate a ref-type var decl if it has no initializer.
This would allow more AST nodes being preserved for broken code, and
have a more consistent valid bit for ref-type var decl (currently, a
ref-type var decl with a broken initializer is valid).
Per https://reviews.llvm.org/D76831#1973053, the initializer of a variable
should play no part in its "invalid" bit.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D122935
More information about the All-commits
mailing list