llvm-project/clang/test/PCH
Aaron Puchert 16975a638d Set InvalidDecl directly when deserializing a Decl
When parsing a C++17 binding declaration, we first create the
BindingDecls in Sema::ActOnDecompositionDeclarator, and then build the
DecompositionDecl in Sema::ActOnVariableDeclarator, so the contained
BindingDecls are never null. But when deserializing, we read the
DecompositionDecl with all properties before filling in the Bindings.
Among other things, reading a declaration reads whether it's invalid,
then calling setInvalidDecl which assumes that all bindings of the
DecompositionDecl are available, but that isn't the case.

Deserialization should just set all properties directly without invoking
subsequent functions, so we just set the flag without using the setter.

Fixes PR34960.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D86207
2020-09-05 14:26:43 +02:00
..
Inputs [clang] When loading preamble from AST file, re-export modules in Sema. 2020-08-20 14:19:52 +02:00
__va_list_tag-typedef.c
__va_list_tag.c
aarch64-sve-types.c [AArch64][SVE] clang: Add missing svbfloat16_t tests 2020-06-29 16:48:53 +00:00
arc-blocks.mm Add triples to the test I committed in r355012 to fix windows bots. 2019-02-27 18:59:52 +00:00
arc.m
asm.c
asm.h Re-check in clang support gun asm goto after fixing tests. 2019-06-03 15:57:25 +00:00
attrs-PR8406.c
attrs.c [Sema] Allow unmarked overloadable functions. 2017-06-27 21:31:31 +00:00
badpch.c
block-helpers.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
block-helpers.h [CodeGen] Merge equivalent block copy/helper functions. 2018-08-10 15:09:24 +00:00
blocks.c
blocks.h
builtin-bit-cast.cpp [PCH] Support writing BuiltinBitCastExprs to PCHs 2020-06-11 13:37:01 -04:00
builtin-macro.c
builtins.c
builtins.h
captured-stmt.cpp
case-insensitive-include.c [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name 2018-08-06 21:48:20 +00:00
chain-categories.m
chain-categories2.m
chain-class-extension.m
chain-conversion-lookup.cpp
chain-cxx.cpp
chain-decls.c
chain-default-argument-instantiation.cpp
chain-empty-initial-namespace.cpp
chain-ext_vector.c
chain-external-defs.c Recommit #2 "[Driver] Default to -fno-common for all targets" 2020-03-09 19:57:03 +00:00
chain-friend-instantiation.cpp
chain-implicit-definition.cpp
chain-invalid-code.cpp
chain-late-anonymous-namespace.cpp
chain-macro-override.c
chain-macro.c
chain-openmp-allocate.cpp [OPENMP]Consider 'omp_null_allocator' as a predefined allocator. 2020-05-07 10:11:06 -04:00
chain-openmp-threadprivate.cpp [MS] Fix tests after r327738 that only fail with a default Windows target 2018-03-16 20:53:13 +00:00
chain-pending-instantiations.cpp Revert "[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition" 2020-02-03 10:09:39 -08:00
chain-predecl.h
chain-predecl.m
chain-remap-types.m Clean up ObjCPropertyDecl printing 2019-04-08 19:52:45 +00:00
chain-selectors.m
chain-staticvar-instantiation.cpp
chain-trivial.c
chain-typo-corrections.cpp
changed-files.c
check-deserializations.cpp
cli-macro.c make sure to not warn about unused macros from -D 2020-04-27 21:26:13 +02:00
cmdline-include.c
cmdline-include1.h
cmdline-include2.h
codegen.cpp accept 'clang++ -c a.pch -o a.o' to create PCH's object file 2020-07-22 10:21:23 +02:00
coroutines.cpp [coroutines] Fix handling of dependent co_await in StmtProfiler. 2018-07-31 00:47:41 +00:00
crash-12631281.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cuda-kernel-call.cu
cxx-alias-decl.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-alias-decl.h
cxx-attrs-packexpansion.cpp [clang] Persist Attr::IsPackExpansion into the PCH 2020-04-05 23:32:03 -04:00
cxx-chain-function-template.cpp
cxx-char-literal.cpp
cxx-constexpr.cpp Explain why the array bound is non-constant in VLA diagnostics. 2020-08-19 15:45:51 -07:00
cxx-dependent-sized-ext-vector.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-explicit-specifier.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-exprs.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-for-range.cpp
cxx-for-range.h
cxx-friends.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-friends.h
cxx-functions.cpp
cxx-functions.h
cxx-implicit-moves.cpp
cxx-invalid-destructor.cpp [clang] Exclude invalid destructors from lookups. 2020-08-26 19:29:30 +02:00
cxx-invalid-destructor.h [clang] Exclude invalid destructors from lookups. 2020-08-26 19:29:30 +02:00
cxx-key-functions.cpp
cxx-mangling.cpp
cxx-member-init.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-method.cpp
cxx-ms-function-specialization-class-scope.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-ms-function-specialization-class-scope.h
cxx-namespaces.cpp
cxx-namespaces.h
cxx-offsetof-base.cpp
cxx-offsetof-base.h
cxx-recovery-expr.cpp [AST] Fix an undefine behavior when creating an empty recovery expr. 2020-04-16 12:35:45 +02:00
cxx-reference.cpp
cxx-reference.h
cxx-required-decls.cpp Bring r325915 back. 2018-02-23 19:30:48 +00:00
cxx-required-decls.h
cxx-static_assert.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-templates.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-templates.h Fix a bug in the property-based serialization of 2019-12-16 16:08:09 -05:00
cxx-trailing-return.cpp
cxx-traits.cpp [Sema] Add __is_aggregate type-trait 2017-04-12 22:12:15 +00:00
cxx-traits.h [Sema] Add __is_aggregate type-trait 2017-04-12 22:12:15 +00:00
cxx-typeid.cpp
cxx-typeid.h
cxx-using.cpp
cxx-using.h
cxx-variadic-templates-with-default-params.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx-variadic-templates.cpp Don't crash if we deserialize a pack expansion type whose pattern 2020-07-31 17:19:44 -07:00
cxx-variadic-templates.h Don't crash if we deserialize a pack expansion type whose pattern 2020-07-31 17:19:44 -07:00
cxx0x-default-delete.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx0x-delegating-ctors.cpp
cxx1y-decltype-auto.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1y-deduced-return-type.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1y-default-initializer.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1y-init-captures.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1y-lambdas.mm Don't crash if we deserialize a pack expansion type whose pattern 2020-07-31 17:19:44 -07:00
cxx1y-variable-templates.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1z-aligned-alloc.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx1z-decomposition.cpp Set InvalidDecl directly when deserializing a Decl 2020-09-05 14:26:43 +02:00
cxx1z-init-statement.cpp
cxx1z-init-statement.h
cxx1z-using-declaration.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx2a-bitfield-init.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx2a-compare.cpp [c++20] Add rewriting from comparison operators to <=> / ==. 2019-10-19 00:04:43 +00:00
cxx2a-concept-specialization-expr.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx2a-constraints-crash.cpp [Concepts] Fix a deserialization crash. 2020-07-30 09:25:15 +02:00
cxx2a-constraints.cpp Don't crash if we deserialize a pack expansion type whose pattern 2020-07-31 17:19:44 -07:00
cxx2a-defaulted-comparison.cpp Fix rejects-valid when referencing an implicit operator== from within a 2020-06-22 20:19:20 -07:00
cxx2a-for-init-statement.cpp [cxx2a] P0614R1: Support init-statements in range-based for loops. 2018-09-28 18:44:09 +00:00
cxx2a-requires-expr.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx2a-template-lambdas.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx11-constexpr.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx11-enum-template.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx11-exception-spec.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx11-inheriting-ctors.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx11-lambdas.mm [c++20] Implement P0428R2 - Familiar template syntax for generic lambdas 2019-05-04 10:49:46 +00:00
cxx11-statement-attributes.cpp
cxx11-user-defined-literals.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
cxx_exprs.cpp For DR712: store on a DeclRefExpr whether it constitutes an odr-use. 2019-06-11 17:50:32 +00:00
cxx_exprs.h
datetime.c
debug-info-limited-struct.c
debug-info-limited-struct.h
debug-info-pch-container-path.c PCH debug info: Avoid appending the source directory to an absolute path 2019-10-21 16:44:37 +00:00
debug-info-pch-path.c Allow remapping Clang module skeleton CU references with -fdebug-prefix-map 2020-03-20 15:15:56 -07:00
decl-in-prototype.c Relax IRgen check in decl-in-prototype.c to match signext on PPC64 2016-12-09 17:56:04 +00:00
delayed-pch-instantiate.cpp fix clang/PCH/delayed-pch-instantiate test 2020-06-21 19:00:42 +02:00
delayed-template-parsing.cpp Handle delayed-template-parsing functions imported into a non-dtp TU 2020-06-12 16:09:38 +02:00
designated-init.c
designated-init.c.h
determinism.cpp Always keep unset fields in FPOptionsOverride zeroed. 2020-08-16 15:44:51 -07:00
different-diagnostic-level.c
different-linker-version.c
dllexport-default-arg-closure.cpp [MS] Don't escape MS C++ names with \01 2018-03-16 20:36:49 +00:00
emit-dependencies.c Unbreak windows bot. 2017-03-29 17:58:41 +00:00
empty-def-fwd-struct.h [PCH] Avoid VarDecl emission attempt if no owning module avaiable 2017-03-01 19:18:42 +00:00
empty-with-headers.c
enum.c
enum.h
exprs.c
exprs.h
ext_vector.c
ext_vector.h
external-defs.c Recommit #2 "[Driver] Default to -fno-common for all targets" 2020-03-09 19:57:03 +00:00
external-defs.h
externally-retained.m [ObjC] Fix AST serialization for pseudo-strong parameters 2020-06-08 11:54:01 -04:00
field-designator.c
fixed-point-literal.c [Fixed Point] [AST] Add an AST serialization code for fixed-point literals. 2020-04-14 13:20:49 -05:00
floating-literal.c
format-strings.c
friend-template.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
functions.c
functions.h
fuzzy-pch.c
fuzzy-pch.h
headermap.h
headermap.m
headersearch.cpp
implicitly-deleted.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
include-stream-type.cpp Add tests for llvm-bcanalyzer stream types 2018-04-22 00:04:35 +00:00
include-timestamp.cpp [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
irgen-rdar13114142.mm
late-parsed-instantiations.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
leakfiles.test Rename PCH/leakfiles test so it runs on bots. 2019-08-09 17:13:56 +00:00
line-directive-nofilename.c Correctly handle line table entries without filenames during AST serialization 2017-12-04 22:28:45 +00:00
line-directive-nofilename.h Correctly handle line table entries without filenames during AST serialization 2017-12-04 22:28:45 +00:00
line-directive.c
line-directive.h
local_static.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
local_static.h
macro-redef.c
macro-undef.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
make-integer-seq.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
method-redecls.m
method_pool.h
method_pool.m
missing-file.cpp
modified-header-crash.c Avoid assumption that lit tests are writable (in a couple more places). NFC 2018-01-09 09:32:53 +00:00
modified-header-crash.h
modified-header-error.c Re-land Remove REQUIRES:shell from tests that pass for me on Windows 2019-09-10 20:15:45 +00:00
modified-module-dependency.m
modified-module-dependency.module.map
module-hash-difference.m
ms-if-exists.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
ms-pch-macro.c Fix up ms-pch-macro.c test to pass on non-Windows 2020-01-14 22:19:30 -08:00
multiple-include-pch.c
multiple_decls.c
multiple_decls.h
namespaces.cpp
no-escaping-block-tail-calls.cpp Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."" 2019-11-26 20:28:52 -08:00
no-escaping-block-tail-calls.h Serialize DoesNotEscape. 2018-08-01 23:51:53 +00:00
no-validate-pch.cl
non-trivial-c-compound-literal.m [CodeGen] Emit destructor calls to destruct compound literals 2020-03-10 14:08:28 -07:00
non-trivial-c-union.m [Sema] Diagnose default-initialization, destruction, and copying of 2019-09-07 00:34:43 +00:00
nonvisible-external-defs.c
nonvisible-external-defs.h
objc_boxable.m
objc_boxable_record.h
objc_boxable_record_attr.h
objc_container.h
objc_container.m Cleanup the handling of noinline function attributes, -fno-inline, 2016-12-23 01:24:49 +00:00
objc_exprs.h [ObjC] Error out when using forward-declared protocol in a @protocol 2018-08-17 22:18:08 +00:00
objc_exprs.m
objc_import.h
objc_import.m
objc_kindof.m
objc_literals.m
objc_literals.mm
objc_methods.h
objc_methods.m
objc_parameterized_classes.m
objc_property.h
objc_property.m
objc_stmts.h
objc_stmts.m Reapply "[Parse] Use CapturedStmt for @finally on MSVC" 2018-06-08 00:30:00 +00:00
objcxx-ivar-class.h
objcxx-ivar-class.mm
ocl_types.cl Fix a lit test issue exposed by r290056 2016-12-18 07:26:01 +00:00
ocl_types.h [OpenCL] Correct ndrange_t implementation 2017-02-16 12:27:47 +00:00
opencl-extensions.cl
pch-dir.c
pch-dir.h
pch-hdrstop-err.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
pch-hdrstop-warn.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
pch-hdrstop.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
pch-instantiate-templates-forward-decl.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
pch-instantiate-templates.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
pch-no-hdrstop.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
pch-through1.cpp Add PCH tests for R336379 2018-07-05 17:23:15 +00:00
pch-through2.cpp Add PCH tests for R336379 2018-07-05 17:23:15 +00:00
pch-through3a.cpp Add PCH tests for R336379 2018-07-05 17:23:15 +00:00
pch-through3b.cpp Add PCH tests for R336379 2018-07-05 17:23:15 +00:00
pch-through3c.cpp test commit: add a comment 2018-08-17 21:16:21 +00:00
pch-through4.cpp When skipping code at the start of a file during PCH use, Preprocessor::Lex 2019-04-29 21:21:17 +00:00
pch-through4a.cpp When skipping code at the start of a file during PCH use, Preprocessor::Lex 2019-04-29 21:21:17 +00:00
pch__VA_ARGS__.c
pch__VA_ARGS__.h
pchpch.c
pchpch1.h
pchpch2.h
pending-ids.m
pr4489.c
pr18806.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
pr27445.cpp
pragma-comment.c
pragma-cuda-force-host-device.cu
pragma-detect_mismatch.c
pragma-diag-section.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
pragma-diag.c
pragma-floatcontrol.c Reland D81869 "Modify FPFeatures to use delta not absolute settings" 2020-06-27 01:34:57 -07:00
pragma-loop.cpp Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
pragma-ms_struct.cpp
pragma-once.c
pragma-optimize.c
pragma-pack.c Recommit r308327 3rd time: Add a warning for missing 2017-07-28 14:41:21 +00:00
pragma-pointers_to_members.cpp
pragma-weak.c Bring r325915 back. 2018-02-23 19:30:48 +00:00
pragma-weak.h
preamble-modules.cpp [clang] When loading preamble from AST file, re-export modules in Sema. 2020-08-20 14:19:52 +02:00
preamble.c
pth.h
rdar8852495.c
rdar10830559.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
reinclude.cpp
reinclude1.h
reinclude2.h
reloc.c
remap-file-from-pch.cpp
remap-file-from-pch.cpp.h
remap-file-from-pch.cpp.remap.h
replaced-decl.m
selector-warning.h
selector-warning.m
single-token-macro.c
source-manager-stack.c
specialization-after-instantiation.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
stmt-attrs.cpp
stmt-openmp_structured_block-bit.cpp [clang] Prune 'IsOMPStructuredBlock' Stmt bit 2020-03-12 14:48:57 +03:00
stmts.c
stmts.h
struct.c
struct.h
subscripting-literals.m
suspicious-pragma-pack.c -Wpragma-pack: add an additional note and fixit when warning 2017-07-31 13:37:50 +00:00
target-options.c
target-options.h
tentative-defs.c Recommit #2 "[Driver] Default to -fno-common for all targets" 2020-03-09 19:57:03 +00:00
tentative-defs.h
thread-local.cpp Diagnose use of _Thread_local as an extension when not in C11 mode. 2019-08-26 19:44:07 +00:00
thread-safety-attrs.cpp Fix thread safety tests after r352549 2019-01-30 00:18:24 +00:00
type_pack_element.cpp add option to instantiate templates already in the PCH 2020-06-21 17:05:52 +02:00
types.c
types.h
typo.cpp
typo.m
typo2.cpp
undefined-internal.c
uses-seh.cpp [MS] Don't escape MS C++ names with \01 2018-03-16 20:36:49 +00:00
uuidof.cpp
va_arg.c
va_arg.cpp
va_arg.h
validate-file-content.m Reapply: [Modules][PCH] Hash input files content 2019-10-15 14:23:55 +00:00
variables.c
variables.h
verify_pch.m Avoid assumption that lit tests are writable. NFC 2018-01-08 15:05:01 +00:00
working-directory.cpp
working-directory.h