llvm-project/clang/unittests/AST
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
..
ASTContextParentMapTest.cpp [clang][AST] RecursiveASTVisitor should visit owned TagDecl of friend type. 2022-08-23 09:15:55 +02:00
ASTImporterFixtures.cpp
ASTImporterFixtures.h [clang][NFC][AST] rename the ImportError to ASTImportError 2022-06-15 00:40:32 +05:30
ASTImporterGenericRedeclTest.cpp Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
ASTImporterODRStrategiesTest.cpp [clang][NFC][AST] rename the ImportError to ASTImportError 2022-06-15 00:40:32 +05:30
ASTImporterObjCTest.cpp Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
ASTImporterTest.cpp [clang] Fix AST representation of expanded template arguments. 2022-09-17 01:24:46 +02:00
ASTImporterVisibilityTest.cpp Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
ASTPrint.h [clang] Refactor AST printing tests to share more infrastructure 2021-07-14 19:44:18 -04:00
ASTTraverserTest.cpp Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
ASTTypeTraitsTest.cpp [clang] Support `constexpr` for some `ASTNodeKind` member functions 2022-10-13 13:00:48 -04:00
ASTVectorTest.cpp Reland "[clang-repl] Implement partial translation units and error recovery." 2021-07-12 15:21:22 +00:00
AttrTest.cpp Fix signed/unsigned comparison warning 2022-06-15 11:53:08 +01:00
CMakeLists.txt [Testing] Drop clangTesting from clang's public library interface 2022-04-20 13:28:44 +02:00
CommentLexer.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
CommentParser.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
CommentTextTest.cpp [clang] NFC: test for undefined behaviour in RawComment::getFormattedText() 2021-06-07 03:05:00 -07:00
DataCollectionTest.cpp
DeclMatcher.h
DeclPrinterTest.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
DeclTest.cpp [clang] initialize type qualifiers for FunctionNoProtoType 2022-09-26 09:48:54 -07:00
EvaluateAsRValueTest.cpp [clang] Perform implicit lvalue-to-rvalue cast with new interpreter 2022-09-08 07:31:07 +02:00
ExternalASTSourceTest.cpp
MatchVerifier.h [ASTStructuralEquivalence] Add support for comparing ObjCCategoryDecl. 2022-04-22 16:51:19 -07:00
NamedDeclPrinterTest.cpp [clang] Refactor AST printing tests to share more infrastructure 2021-07-14 19:44:18 -04:00
RandstructTest.cpp [randstruct] Automatically randomize a structure of function pointers 2022-04-29 11:05:09 -07:00
RecursiveASTVisitorTest.cpp [clang] Add `ObjCProtocolLoc` to represent protocol references 2022-02-18 15:24:00 -05:00
SizelessTypesTest.cpp
SourceLocationTest.cpp Change the behavior of implicit int diagnostics 2022-05-04 08:35:47 -04:00
StmtPrinterTest.cpp Fix build error in StmtPrinterTest.cpp 2022-09-05 03:48:46 -04:00
StructuralEquivalenceTest.cpp Fixed a number of typos 2022-08-01 13:13:18 -04:00
TemplateNameTest.cpp [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl(). 2022-04-27 14:16:19 +02:00
TypePrinterTest.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00