44eee659f1
C++20 non-type template parameter prints `MyType<{{116, 104, 105, 115}}>` when the code is as simple as `MyType<"this">`. This patch prints `MyType<{"this"}>`, with one layer of braces preserved for the intermediate structural type to trigger CTAD. `StringLiteral` handles this case, but `StringLiteral` inside `APValue` code looks like a circular dependency. The proposed patch implements a cheap strategy to emit string literals in diagnostic messages only when they are readable and fall back to integer sequences. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D115031 |
||
---|---|---|
.. | ||
AnalysisBasedWarnings.cpp | ||
CMakeLists.txt | ||
CodeCompleteConsumer.cpp | ||
CoroutineStmtBuilder.h | ||
DeclSpec.cpp | ||
DelayedDiagnostic.cpp | ||
IdentifierResolver.cpp | ||
JumpDiagnostics.cpp | ||
MultiplexExternalSemaSource.cpp | ||
OpenCLBuiltins.td | ||
ParsedAttr.cpp | ||
Scope.cpp | ||
ScopeInfo.cpp | ||
Sema.cpp | ||
SemaAccess.cpp | ||
SemaAttr.cpp | ||
SemaAvailability.cpp | ||
SemaCast.cpp | ||
SemaChecking.cpp | ||
SemaCodeComplete.cpp | ||
SemaConcept.cpp | ||
SemaConsumer.cpp | ||
SemaCoroutine.cpp | ||
SemaCUDA.cpp | ||
SemaCXXScopeSpec.cpp | ||
SemaDecl.cpp | ||
SemaDeclAttr.cpp | ||
SemaDeclCXX.cpp | ||
SemaDeclObjC.cpp | ||
SemaExceptionSpec.cpp | ||
SemaExpr.cpp | ||
SemaExprCXX.cpp | ||
SemaExprMember.cpp | ||
SemaExprObjC.cpp | ||
SemaFixItUtils.cpp | ||
SemaInit.cpp | ||
SemaLambda.cpp | ||
SemaLookup.cpp | ||
SemaModule.cpp | ||
SemaObjCProperty.cpp | ||
SemaOpenMP.cpp | ||
SemaOverload.cpp | ||
SemaPseudoObject.cpp | ||
SemaStmt.cpp | ||
SemaStmtAsm.cpp | ||
SemaStmtAttr.cpp | ||
SemaSYCL.cpp | ||
SemaTemplate.cpp | ||
SemaTemplateDeduction.cpp | ||
SemaTemplateInstantiate.cpp | ||
SemaTemplateInstantiateDecl.cpp | ||
SemaTemplateVariadic.cpp | ||
SemaType.cpp | ||
TreeTransform.h | ||
TypeLocBuilder.cpp | ||
TypeLocBuilder.h | ||
UsedDeclVisitor.h |