llvm-project/clang/test/PCH
Richard Smith 405e2dbf37 Implement C++ [basic.link]p8.
If a function or variable has a type with no linkage (and is not extern "C"),
any use of it requires a definition within the same translation unit; the idea
is that it is not possible to define the entity elsewhere, so any such use is
necessarily an error.

There is an exception, though: some types formally have no linkage but
nonetheless can be referenced from other translation units (for example, this
happens to anonymous structures defined within inline functions). For entities
with those types, we suppress the diagnostic except under -pedantic.

llvm-svn: 313729
2017-09-20 07:22:00 +00:00
..
Inputs Support '#pragma once' in headers when using PCH 2016-07-25 17:17:06 +00:00
__va_list_tag-typedef.c [Clang][ARM] __va_list declaration is not saved in ASTContext causing compilation error or crash 2016-03-30 21:30:30 +00:00
__va_list_tag.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
arc.m Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
asm.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
asm.h
attrs-PR8406.c
attrs.c [Sema] Allow unmarked overloadable functions. 2017-06-27 21:31:31 +00:00
badpch.c Avoid crashing if a directory has no pch files. 2013-07-28 13:23:37 +00:00
blocks.c
blocks.h
builtin-macro.c Don't assert when redefining a built-in macro in a PCH, PR29119 2016-12-09 17:32:52 +00:00
builtins.c
builtins.h
captured-stmt.cpp
case-insensitive-include.c [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
chain-categories.m Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones. 2015-11-03 01:15:46 +00:00
chain-categories2.m
chain-class-extension.m
chain-conversion-lookup.cpp
chain-cxx.cpp
chain-decls.c
chain-default-argument-instantiation.cpp Only instantiate a default argument once. 2016-01-06 22:34:54 +00:00
chain-empty-initial-namespace.cpp
chain-ext_vector.c
chain-external-defs.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
chain-friend-instantiation.cpp
chain-implicit-definition.cpp
chain-invalid-code.cpp [PCH/preamble] Make sure that if the preamble/PCH was serialized with errors that we set diagnostic engine state appropriately. 2016-07-13 20:35:26 +00:00
chain-late-anonymous-namespace.cpp
chain-macro-override.c
chain-macro.c
chain-openmp-threadprivate.cpp [Cygwin] Enable TLS as emutls. 2015-12-21 02:37:23 +00:00
chain-pending-instantiations.cpp Switch to the new MingW ABI. 2013-12-12 16:07:11 +00:00
chain-predecl.h
chain-predecl.m
chain-remap-types.m
chain-selectors.m ObjectiveC. Improve on diagnostics per Jordan's feedback. 2014-01-15 00:59:25 +00:00
chain-staticvar-instantiation.cpp
chain-trivial.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
chain-typo-corrections.cpp Add the test case from PR 14044 to ensure it doesn't regress. 2015-05-08 17:39:48 +00:00
changed-files.c
check-deserializations.cpp Internal-linkage variables with constant-evaluatable initializers do not need to be emitted. (Also reduces the set of variables that need to be eagerly deserialized when using PCH / modules.) 2015-08-19 20:49:38 +00:00
cmdline-include.c
cmdline-include1.h
cmdline-include2.h
coroutines.cpp [coroutines] Add serialization/deserialization of coroutines 2017-07-25 18:01:49 +00:00
crash-12631281.cpp
cuda-kernel-call.cu Move all CUDA testing inputs to Inputs/ subdirectory inside the tests. 2014-04-28 22:21:28 +00:00
cxx-alias-decl.cpp
cxx-alias-decl.h
cxx-chain-function-template.cpp
cxx-char-literal.cpp Properly track that a character literal is UTF-8, and pretty print the prefix properly. 2016-01-07 20:59:26 +00:00
cxx-constexpr.cpp
cxx-dependent-sized-ext-vector.cpp [Serialization] Serialize DependentSizedExtVectorType 2017-03-22 10:04:48 +00:00
cxx-exprs.cpp
cxx-for-range.cpp
cxx-for-range.h
cxx-friends.cpp Lazily deserialize the "first' friend declaration when deserializing a class 2013-06-26 02:41:25 +00:00
cxx-friends.h Lazily deserialize the "first' friend declaration when deserializing a class 2013-06-26 02:41:25 +00:00
cxx-functions.cpp
cxx-functions.h
cxx-implicit-moves.cpp
cxx-key-functions.cpp Fix an iterator invalidation issue: deserializing a key function can write to 2014-07-07 06:38:20 +00:00
cxx-mangling.cpp Account for calling convention specifiers in function definitions in IR test cases 2015-06-29 17:29:50 +00:00
cxx-member-init.cpp [PCH] Fix crash with valid code, related to anonymous field initializers. 2013-05-30 23:59:46 +00:00
cxx-method.cpp
cxx-ms-function-specialization-class-scope.cpp Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
cxx-ms-function-specialization-class-scope.h
cxx-namespaces.cpp Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump 2014-08-11 22:11:07 +00:00
cxx-namespaces.h When setting the external visible declarations for a decl context, check 2013-06-24 01:46:41 +00:00
cxx-offsetof-base.cpp
cxx-offsetof-base.h
cxx-reference.cpp Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
cxx-reference.h
cxx-required-decls.cpp Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
cxx-required-decls.h
cxx-static_assert.cpp
cxx-templates.cpp Don't mark a member as a member specialization until we know we're keeping the specialization. 2017-05-09 23:02:10 +00:00
cxx-templates.h Don't mark a member as a member specialization until we know we're keeping the specialization. 2017-05-09 23:02:10 +00: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 Default to use libc++ on OS X 10.9+ and iOS 7+. 2013-11-02 23:19:53 +00:00
cxx-typeid.h
cxx-using.cpp
cxx-using.h
cxx-variadic-templates-with-default-params.cpp PR25271: When attaching default template arguments to redeclarations of a 2016-02-04 22:54:41 +00:00
cxx-variadic-templates.cpp
cxx-variadic-templates.h
cxx0x-default-delete.cpp
cxx0x-delegating-ctors.cpp
cxx1y-decltype-auto.cpp
cxx1y-deduced-return-type.cpp
cxx1y-default-initializer.cpp PR29097: add an update record when we instantiate the default member 2016-08-24 21:25:37 +00:00
cxx1y-init-captures.cpp Per latest drafting, switch to implementing init-captures as if by declaring 2013-09-28 04:02:39 +00:00
cxx1y-lambdas.mm Run dos2unix on test/PCH/cxx1y-lambdas.mm 2015-04-01 20:21:34 +00:00
cxx1y-variable-templates.cpp [Sema] Emit a better diagnostic when variable redeclarations disagree 2015-07-14 20:08:49 +00:00
cxx1z-aligned-alloc.cpp P0035R4: add std::align_val_t overloads of operator new/delete in C++17 mode. 2016-09-29 22:49:46 +00:00
cxx1z-decomposition.cpp P0217R3: serialization/deserialization support for c++17 decomposition declarations. 2016-08-12 02:21:25 +00:00
cxx1z-init-statement.cpp P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': 2016-07-14 00:11:03 +00:00
cxx1z-init-statement.h P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': 2016-07-14 00:11:03 +00:00
cxx1z-using-declaration.cpp [c++1z] P0195R2: Support pack-expansion of using-declarations. 2016-12-20 21:35:28 +00:00
cxx2a-bitfield-init.cpp [c++2a] P0683R1: Permit default member initializers for bit-fields. 2017-08-28 00:28:14 +00:00
cxx11-constexpr.cpp
cxx11-enum-template.cpp
cxx11-exception-spec.cpp When the exception specification for a function in an imported PCH or module is 2014-03-20 21:47:22 +00:00
cxx11-inheriting-ctors.cpp P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991: 2016-06-28 19:03:57 +00:00
cxx11-lambdas.mm Implement C++ [basic.link]p8. 2017-09-20 07:22:00 +00:00
cxx11-statement-attributes.cpp P0188R1: add support for standard [[fallthrough]] attribute. This is almost 2016-03-08 00:32:55 +00:00
cxx11-user-defined-literals.cpp
cxx_exprs.cpp
cxx_exprs.h
datetime.c Don't use fprintf to emit this diagnostic! 2015-09-01 02:35:58 +00:00
debug-info-limited-struct.c Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
debug-info-limited-struct.h Test case for r18266 (serialization support for TagDecl:IsCompleteDefinitionRequired) 2013-07-15 21:33:26 +00:00
debug-info-pch-path.c Remove 24 instances of 'REQUIRES: shell' 2016-10-20 23:11:45 +00: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
designated-init.c
designated-init.c.h Implementing C99 partial re-initialization behavior (DR-253) 2015-06-10 00:27:52 +00:00
different-diagnostic-level.c Revert r194097: "With this patch -Wwrite-strings is still implemented with the terrible 2014-02-07 08:33:28 +00:00
different-linker-version.c [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver only thing and doesn't affect any language/preprocessor/etc. semantics. 2014-04-29 18:45:01 +00:00
dllexport-default-arg-closure.cpp Add dllexport default ctor closure PCH regression test for PR31121 2016-11-23 18:33:54 +00:00
emit-dependencies.c Unbreak windows bot. 2017-03-29 17:58:41 +00:00
emit-pth.c Use raw_pwrite_stream in clang. 2015-04-14 15:15:49 +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 Add the intrinsic __builtin_convertvector 2013-09-18 03:29:45 +00:00
ext_vector.c
ext_vector.h
external-defs.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
external-defs.h
field-designator.c Remove duplicated -cc1 in tests 2013-12-08 18:06:52 +00:00
floating-literal.c Explicitly permit undefined behavior in constant initializers for global 2015-12-08 03:21:47 +00:00
format-strings.c
friend-template.cpp
functions.c
functions.h
fuzzy-pch.c
fuzzy-pch.h
headermap.h
headermap.m
headersearch.cpp Try to unbreak the Windows buildbots. 2015-03-03 23:36:57 +00:00
implicitly-deleted.cpp PR22405: don't lose implicit-deleted-ness across AST write / read. 2015-02-06 23:20:21 +00:00
include-timestamp.cpp [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
irgen-rdar13114142.mm Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
line-directive.c Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
line-directive.h
local_static.cpp Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
local_static.h Fix PCH deserialization bug with local static symbols being treated as local extern. 2014-02-11 06:29:29 +00:00
macro-redef.c
macro-undef.cpp [Test] Make Lit tests C++11 compatible - misc 2017-02-17 19:36:19 +00:00
make-integer-seq.cpp [Sema] Implement __make_integer_seq 2015-11-04 03:40:30 +00:00
method-redecls.m
method_pool.h
method_pool.m
missing-file.cpp Exclude PCH/missing-file.cpp on Windows, it does not pass reliably 2016-02-16 19:16:28 +00:00
modified-header-crash.c
modified-header-crash.h
modified-header-error.c Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
modified-module-dependency.m Commit some test changes somehow missed in r239789. 2015-06-16 00:19:29 +00:00
modified-module-dependency.module.map Improve the error message when a PCH dependency is modified 2014-01-17 00:19:09 +00:00
module-hash-difference.m Commit some test changes somehow missed in r239789. 2015-06-16 00:19:29 +00:00
ms-if-exists.cpp
multiple-include-pch.c
multiple_decls.c
multiple_decls.h
namespaces.cpp
no-validate-pch.cl Do not validate pch when -fno-validate-pch is set 2016-09-07 18:40:20 +00:00
nonvisible-external-defs.c
nonvisible-external-defs.h
objc_boxable.m Add missing files for objc_boxable feature. 2015-07-23 14:45:41 +00:00
objc_boxable_record.h Add missing files for objc_boxable feature. 2015-07-23 14:45:41 +00:00
objc_boxable_record_attr.h Add missing files for objc_boxable feature. 2015-07-23 14:45:41 +00:00
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_exprs.m
objc_import.h When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one. 2013-06-18 21:26:33 +00:00
objc_import.m When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one. 2013-06-18 21:26:33 +00:00
objc_kindof.m Implement the Objective-C __kindof type qualifier. 2015-07-07 03:58:42 +00:00
objc_literals.m Account for calling convention specifiers in function definitions in IR test cases 2015-06-29 17:29:50 +00:00
objc_literals.mm Account for calling convention specifiers in function definitions in IR test cases 2015-06-29 17:29:50 +00:00
objc_methods.h
objc_methods.m
objc_parameterized_classes.m Implement variance for Objective-C type parameters. 2015-07-07 03:58:54 +00:00
objc_property.h
objc_property.m
objc_stmts.h
objc_stmts.m
objcxx-ivar-class.h
objcxx-ivar-class.mm Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
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 [OpenCL] Add supported OpenCL extensions to target info. 2016-05-16 17:06:34 +00:00
pch-dir.c Fix crash on invalid if we can't find a suitable PCH file in a specified 2015-09-04 21:44:32 +00:00
pch-dir.h
pch__VA_ARGS__.c
pch__VA_ARGS__.h
pchpch.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
pchpch1.h
pchpch2.h
pending-ids.m Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
pr4489.c Removing an XFAIL which shouldn't apply. We no longer care about MSVC 9, and this test probably should not have been XFAILed everywhere regardless. The test passes on Windows with MSVC 12. 2014-05-19 17:58:28 +00:00
pr18806.cpp Fix PR18806: Canonicalize the replacement type when deserializing a SubstTemplateTypeParmType 2014-03-15 10:23:27 +00:00
pr27445.cpp Fix a bug involving deferred decl emission and PCH 2016-04-22 18:46:33 +00:00
pragma-comment.c CodeGen: support linker options on Windows ARM 2016-06-23 13:45:33 +00:00
pragma-cuda-force-host-device.cu [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change. 2016-10-19 00:06:49 +00:00
pragma-detect_mismatch.c CodeGen: support linker options on Windows ARM 2016-06-23 13:45:33 +00:00
pragma-diag-section.cpp Change the other -Wtautological-compare warnings to not trigger in template 2013-11-02 02:11:23 +00:00
pragma-diag.c
pragma-loop.cpp Add loop pragma for Loop Distribution 2016-06-14 12:04:26 +00:00
pragma-ms_struct.cpp Serialize `pragma ms_struct` state. 2016-03-02 23:22:00 +00:00
pragma-once.c Support '#pragma once' in headers when using PCH 2016-07-25 17:17:06 +00:00
pragma-optimize.c [TEST] Improve tests for #pragma clang optimize off/on 2014-07-28 14:33:17 +00:00
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 Serialize `pragma pointers_to_members` state. 2016-03-03 00:17:35 +00:00
pragma-weak.c Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
pragma-weak.h
preamble.c Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
pth.c Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
pth.h
rdar8852495.c
rdar10830559.cpp Adds Microsoft compatiable C++ record layout code to clang. 2013-10-11 20:19:00 +00:00
reinclude.cpp
reinclude1.h
reinclude2.h
reloc.c Re-apply "test: Use add_lit_testsuites so that subsets of tests can be specified" 2016-07-05 17:54:40 +00:00
remap-file-from-pch.cpp Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
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 Do not warn on keyword undef 2014-12-12 06:37:55 +00:00
source-manager-stack.c
stmt-attrs.cpp Prune CRLF. 2014-10-27 12:37:26 +00:00
stmts.c
stmts.h
struct.c
struct.h
subscripting-literals.m Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
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 Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
target-options.h
tentative-defs.c Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
tentative-defs.h
thread-local.cpp Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
thread-safety-attrs.cpp Updating the capability attribute diagnostics to be more capability-neutral. Instead of using terminology such as "lock", "unlock" and "locked", the new terminology is "acquire", "release" and "held". Additionally, the capability attribute's name argument is now reported as part of the diagnostic, instead of hard coding as "mutex." 2014-04-01 21:43:23 +00:00
type_pack_element.cpp [Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne. 2016-07-01 01:24:09 +00:00
types.c
types.h
typo.cpp
typo.m
typo2.cpp
undefined-internal.c
uses-seh.cpp Serialize the UsesSEH bit on FunctionDecl 2017-01-10 21:27:03 +00:00
uuidof.cpp Fix serialization/deserialization for __uuidof 2016-03-28 03:19:50 +00:00
va_arg.c Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
va_arg.cpp Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
va_arg.h Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
variables.c
variables.h
verify_pch.m test: Disable standard system includes in %clang_cc1 2014-10-03 22:18:49 +00:00
working-directory.cpp
working-directory.h