llvm-project/clang/test/Index
Aaron Ballman 19e984ef8f Properly print unnamed TagDecl objects in diagnostics
The diagnostics engine is very smart about being passed a NamedDecl to
print as part of a diagnostic; it gets the "right" form of the name,
quotes it properly, etc. However, the result of using an unnamed tag
declaration was to print '' instead of anything useful.

This patch causes us to print the same information we'd have gotten if
we had printed the type of the declaration rather than the name of it,
as that's the most relevant information we can display.

Differential Revision: https://reviews.llvm.org/D134813
2022-10-14 08:18:28 -04:00
..
Core [clang][modules][deps] Preserve module map load order 2022-09-22 12:54:51 -07:00
Inputs Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
USR
reparse-with-remaps
skip-parsed-bodies [libclang][index][NFC] Fix test for skipping already parsed function bodies 2019-08-23 22:51:23 +00:00
IBOutletCollection.m
KeepGoingWithLotsOfErrors.mm
TestClassDecl.m
TestClassForwardDecl.m
allow-editor-placeholders.cpp
annotate-attribute.cpp
annotate-comments-availability-attrs.cpp
annotate-comments-objc.m Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
annotate-comments-preprocessor.c
annotate-comments-property-accessor.m
annotate-comments-typedef.m Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
annotate-comments-unterminated.c
annotate-comments.cpp
annotate-context-sensitive.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
annotate-deep-statements.cpp
annotate-literals.m
annotate-macro-args.h
annotate-macro-args.m
annotate-module.m
annotate-nested-name-specifier.cpp
annotate-operator-call-expr.cpp Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads" 2022-08-04 12:14:43 +02:00
annotate-parameterized-classes.m
annotate-subscripting.m
annotate-tokens-cxx0x.cpp
annotate-tokens-include.c
annotate-tokens-include.h
annotate-tokens-pp.c
annotate-tokens-preamble.c
annotate-tokens-unexposed.cpp
annotate-tokens-with-default-args.cpp
annotate-tokens-with-default-args.h
annotate-tokens.c
annotate-tokens.cpp
annotate-tokens.m
annotate-toplevel-in-objccontainer.m
annotate-toplevel-in-objccontainer.m.h
arc-annotate.m
arc-complete.m
asm-attribute.c
attributes-cuda.cu
attributes.c
availability.c
availability.cpp Add clang_CXXMethod_isDeleted function 2022-09-21 11:12:48 -04:00
availability.mm [libclang][ObjC] Inherit availability attribute from containing decls or 2022-07-19 09:17:39 -07:00
blocks.c
boxed-exprs.h
boxed-exprs.m
c-index-api-loadTU-test.m Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
c-index-getCursor-pp.c
c-index-getCursor-test.m Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
c-index-pch.c
c-index-redecls.c
c-index-unsupported-warning-test.c
cindex-from-source.m
cindex-on-invalid-usrs.m
cindex-on-invalid.m
cindex-test-inclusions.c
code-completion-skip-bodies.cpp
code-completion.cpp
codecompletion-chained.cpp
comment-c-decls.c
comment-cplus-decls.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
comment-cplus-template-decls.cpp
comment-cplus11-specific.cpp
comment-custom-block-command.cpp
comment-lots-of-unknown-commands.c [Clang][Comments] Fix `Index/comment-lots-of-unknown-commands.c` 2022-09-02 12:34:38 +01:00
comment-misc-tags.m
comment-objc-decls.m
comment-objc-parameterized-classes.m
comment-redeclarations.cpp [clang] Refactor doc comments to Decls attribution 2019-08-13 18:11:44 +00:00
comment-to-html-xml-conversion-with-original-literals.cpp
comment-to-html-xml-conversion.cpp [Clang][Comments] Parse `<img src=""/>` in doc comments correctly 2022-09-01 13:17:42 +01:00
comment-unqualified-objc-pointer.m
comment-with-preamble.c
comment-xml-schema.c [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
compile_commands.json
complete-access-checks-crash.cpp
complete-access-checks.cpp
complete-and-plugins.c
complete-arrow-dot.cpp
complete-at-EOF.c
complete-at-directives.m
complete-at-exprstmt.m
complete-available.m
complete-block-properties.m
complete-block-property-assignment.m
complete-blocks.m
complete-cached-globals.cpp
complete-call.cpp
complete-categories.m
complete-constructor-params.cpp
complete-ctor-inits.cpp
complete-cxx-inline-methods.cpp
complete-declarators.cpp
complete-declarators.m
complete-designated-initializer.m
complete-documentation-properties.m
complete-documentation-templates.cpp
complete-documentation.cpp
complete-enums.c
complete-enums.cpp
complete-exprs.c This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. 2019-07-13 06:27:35 +00:00
complete-exprs.cpp
complete-exprs.m
complete-functor-call.cpp
complete-hiding.c
complete-in-invalid-method.m
complete-in-stringify.c
complete-interfaces.m
complete-ivar-access.m
complete-kvc.m
complete-lambdas.cpp
complete-lambdas.mm
complete-macro-args.c
complete-macros.c [CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528 2019-07-18 07:17:49 +00:00
complete-macros.h [CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528 2019-07-18 07:17:49 +00:00
complete-member-access.m
complete-memfunc-cvquals.cpp
complete-method-decls.m [Sema][CodeComplete][ObjC] Don't split the first selector fragment 2020-06-25 13:58:27 -04:00
complete-module-undef.m
complete-modules.m
complete-natural.m
complete-objc-message-id.m
complete-objc-message.m
complete-optional-params.cpp
complete-parameterized-classes.m [Sema][CodeComplete][ObjC] Don't split the first selector fragment 2020-06-25 13:58:27 -04:00
complete-pch-skip.cpp
complete-pch.m
complete-pointer-and-reference-to-functions.cpp
complete-preamble.cpp
complete-preamble.h
complete-preprocessor.m Add support for #elifdef and #elifndef 2021-05-27 08:57:47 -04:00
complete-properties.m
complete-property-flags.m
complete-property-getset.m
complete-protocols.m
complete-qualified-cached.cpp [ASTUnit] Attempt to unbreak Windows buildbots after r366448 2019-07-18 16:24:09 +00:00
complete-qualified.cpp
complete-recovery.m
complete-stmt.c [CodeComplete] Include more text into typed chunks of pattern completions 2019-06-04 09:26:08 +00:00
complete-super.cpp
complete-super.m
complete-switch.c [AST] Build recovery expression by default for all language. 2020-11-23 11:08:28 +01:00
complete-synthesized.m
complete-tabs.c
complete-template-friends-defined.cpp
complete-template-keywords.cpp
complete-templates.cpp
complete-type-factors.m
complete-unterminated.c
complete-with-annotations.cpp
coroutines.cpp [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
crash-preamble-classes.cpp
crash-recovery-code-complete.c
crash-recovery-modules.m Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
crash-recovery-reparse.c
crash-recovery.c
create-libclang-completion-reproducer.c
create-libclang-parsing-reproducer.c
create-tu-fail.c
ctor-init-source-loc.cpp
cursor-dynamic-call.mm
cursor-ref-names.cpp Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads" 2022-08-04 12:14:43 +02:00
cxx-operator-overload.cpp
cxx.cl [OpenCL] Use spir target for CIndex tests for OpenCL. 2021-03-12 20:11:26 +00:00
cxx11-lambdas.cpp
cxx14-lambdas.cpp [clang] Traverse init-captures while indexing 2020-09-22 02:32:09 -04:00
cxx17-if-with-initializer.cpp [libclang]: visit C++17 if init statements 2020-05-02 22:18:36 +02:00
cxx17-structured-binding.cpp [libclang]: visit BindingDecl in DecompositionDecl 2020-05-02 22:18:31 +02:00
deletion.cpp Add clang_CXXMethod_isDeleted function 2022-09-21 11:12:48 -04:00
error-on-deserialized.c [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
evaluate-cursor.cpp [libclang] Fix crash when visiting a captured VLA 2020-07-08 13:10:16 -07:00
file-includes.c
file-macro-refs.c
file-refs-subscripting.m
file-refs.c
file-refs.cpp
file-refs.m
fix-its.c
fix-its.m
format-comment-cdecls.c
get-cursor-includes.c
get-cursor-macro-args.h
get-cursor-macro-args.m
get-cursor.c
get-cursor.cpp Allow getting template args for ClassTemplateSpecializations 2022-09-23 11:06:14 -04:00
get-cursor.m
getcursor-pp-pch.c
getcursor-pp-pch.c.h
getcursor-preamble.h
getcursor-preamble.m
getcursor-recovery.cpp [AST] Preserve the type in RecoveryExprs for broken function calls. 2020-05-11 08:46:18 +02:00
headerfile-comment-to-html.m
hidden-redecls.m Fix hidden-redecls.m test for some environments 2020-10-16 09:51:13 +02:00
ignore-warnings-from-headers.cpp [libclang] Allow skipping warnings from all included files 2019-06-11 14:14:24 +00:00
ignore-warnings-from-headers.h [libclang] Allow skipping warnings from all included files 2019-06-11 14:14:24 +00:00
implicit-attrs.m Reapply "[clang][cli] Report result of ParseLangArgs" 2021-02-08 13:14:43 +01:00
in-class-init.cpp
include_test.h
include_test_2.h
index-anonymous-union-fields.cpp [Index] Correctly set symbol kind of IndirectFieldDecl 2019-05-29 10:11:14 +00:00
index-attrs.c
index-attrs.cpp
index-attrs.m
index-concept-kind.cpp Revert "[clang][test] mark tests added in ee8524087c as unsupported on AIX" 2022-05-30 09:35:26 -04:00
index-concepts.cpp Revert "[clang][test] mark tests added in ee8524087c as unsupported on AIX" 2022-05-30 09:35:26 -04:00
index-decls.m
index-designated-init-recovery.cpp [clang][index] Fix a crash for accessing a null field decl. 2020-05-21 09:47:36 +02:00
index-file.cpp
index-file.cu
index-invalid-code.m
index-kernel-invocation.cpp
index-local-symbol.cpp
index-many-call-ops.cpp
index-many-logical-ops.c
index-module-with-vfs.m Fix `sed -e s@FOO@%/S@` and similar when there's @'s in the working directory 2019-12-03 15:44:01 -08:00
index-module.m
index-pch-objc.m
index-pch-with-module.m
index-pch.cpp
index-refs.cpp
index-refs.m
index-subscripting-literals.m
index-suppress-refs.cpp
index-suppress-refs.h
index-suppress-refs.hpp
index-suppress-refs.m
index-template-specialization.cpp
index-template-template-param.cpp
index-templates.cpp Allow getting template args for ClassTemplateSpecializations 2022-09-23 11:06:14 -04:00
index-with-working-dir.c
initializer-memory.cpp
invalid-code-rdar10451854.m
invalid-code-rdar_7833619.m
invalid-rdar-8236270.cpp
keep-going-include-cycle.c
keep-going-template-instantiations.cpp
keep-going.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
linkage.c
load-classes.cpp
load-decls.c
load-exprs.c
load-namespaces.cpp
load-staticassert.cpp
load-stmts.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
local-symbols.m
missing_vfs.c
modules-objc-categories.m
ms-if-exists.cpp
ms-property.cpp
namespaced-base-ctor-init.cpp
nested-binaryoperators.cpp
nullability.c [clang] Add a new nullability annotation for swift async: _Nullable_result 2020-12-07 17:19:20 -05:00
objc-typeargs-protocols.m
opencl-types.cl [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
openmp-tile.c [OpenMP] Implement '#pragma omp tile', by Michael Kruse (@Meinersbur). 2021-02-16 09:45:07 -08:00
overrides.cpp
overrides.m
overriding-ftemplate-comments.cpp
overriding-method-comments.mm
paren-type.c [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
parse-all-comments.c [clang][index] Mark file as C++ in parse-all-comments test 2021-02-08 09:42:44 +01:00
pch-depending-on-deleted-module.c
pch-from-libclang.c mac/arm: XFAIL the last 3 failing tests 2020-12-12 15:09:17 -05:00
pch-opaque-value.cpp
pch-warn-as-error-code-split.cpp
pch-warn-as-error-code-split.h
pch-warn-as-error-code.cpp
pch-with-errors.c [pch] Honour -fallow-pch-with-compiler-errors for overall compilation status 2020-03-31 13:50:12 -07:00
pch-with-errors.m
pch-with-module.m Clear temporary file in test, buildbot appears to be reusing an old one. 2022-04-25 17:26:39 +02:00
pipe-size.cl [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC) 2022-04-07 12:09:47 +02:00
pr20320.cpp
pr20320.h
pragma-diag-reparse.c Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
preamble-assume-nonnull.c Serialize PragmaAssumeNonNullLoc to support preambles 2022-03-31 11:08:01 -04:00
preamble-conditionals-crash.cpp
preamble-conditionals-inverted-with-error.cpp
preamble-conditionals-inverted.cpp
preamble-conditionals-skipping.cpp
preamble-conditionals.cpp
preamble-reparse-chained.c
preamble-reparse-changed-module.m [clang][patch] Remove test artifact before running test for consistent results 2021-07-24 07:55:10 -04:00
preamble-reparse-cmd-define.c Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
preamble-reparse-cmd-define.c.h
preamble-reparse-cmd-define.c.remap Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
preamble-reparse-import.m Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
preamble-reparse-import.m-1.h
preamble-reparse-import.m-2.h
preamble-reparse-import.m-3.h
preamble-reparse-warn-end-of-file.c
preamble-reparse-warn-macro.c Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
preamble-reparse-with-BOM.m
preamble-reparse.c
preamble-with-implicit-import.m
preamble.c
preamble_macro_template.cpp
print-bitwidth.c
print-cxx-manglings.cpp
print-display-names.cpp Allow getting template args for ClassTemplateSpecializations 2022-09-23 11:06:14 -04:00
print-mangled-name.cpp
print-objc-manglings.m
print-type-cxx11.cpp
print-type-declaration.cpp
print-type-size.c
print-type-size.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
print-type.c Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
print-type.cpp Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
print-type.m
print-usrs.c
properties-class-extensions.m
property-getter-setter.m
rdar-8288645-invalid-code.mm
rdar12316296-codecompletion.m
read-empty-diags.test
record-completion-invocation.c
record-parsing-invocation.c
recover-bad-code-rdar_7487294.c
recursive-cxx-member-calls.cpp
recursive-member-access.c
redeclarations.cpp
remap-complete.c
remap-cursor-at.c
remap-load.c
reparse-instantiate.cpp
reparse-predef-objc-protocol.m
reparsed-live-issue.cpp Change the behavior of implicit int diagnostics 2022-05-04 08:35:47 -04:00
retain-comments-from-system-headers.c
retain-excluded-conditional-blocks.m [clang] Remove stdint.h include from a test 2022-03-21 14:30:12 -04:00
retain-target-options.c
single-file-parse.m
skipped-bodies-ctors.cpp
skipped-bodies-templates.cpp
skipped-bodies-unused.cpp
skipped-function-bodies.cpp
skipped-ranges.c
subclass-comment.mm
symbol-visibility.c [AIX][XCOFF] Fixed the test case which failed at aix OS because enable -mignore-xcoff-visibility by default. 2021-03-15 17:33:02 -04:00
target-info.c
targeted-annotation.c Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
targeted-cursor.c Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
targeted-cursor.m
targeted-cursor.m.h
targeted-fields.h
targeted-file-refs.c
targeted-nested1.h
targeted-preamble.h
targeted-top.h
unmatched-braces.c
unmatched-braces.m
using_if_exists.cpp [Index] Remove reference to `UnresolvedUsingIfExists` 2022-04-22 17:19:33 -07:00
usrs-cxx0x.cpp
usrs.cpp
usrs.m Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
visibility.c
warning-flags.c Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
werror.c