llvm-project/clang/test
Zhihao Yuan 44eee659f1
[AST] Print NTTP args as string-literals when possible
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
2022-03-01 19:34:27 -06:00
..
APINotes
ARCMT Use functions with prototypes when appropriate; NFC 2022-02-17 15:33:50 -05:00
AST Add -Wno-strict-prototypes to C tests; NFC 2022-02-24 15:30:30 -05:00
ASTMerge Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
Analysis [clang][analyzer] Add modeling of 'errno'. 2022-03-01 08:20:33 +01:00
CXX [Clang] Remove redundant init-parens in AST print 2022-02-28 19:31:16 -06:00
ClangScanDeps [clang][deps] Return the whole TU command line 2022-02-23 15:46:20 +01:00
CodeCompletion Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
CodeGen [HWASAN] erase lifetime intrinsics if tag is outside. 2022-03-01 14:47:33 -08:00
CodeGenCUDA [HIP] Support `-fgpu-default-stream` 2022-02-23 22:28:29 -05:00
CodeGenCUDASPIRV [CUDA][SPIRV] Assign global address space to CUDA kernel arguments 2022-02-24 20:51:43 -08:00
CodeGenCXX [HWASAN] erase lifetime intrinsics if tag is outside. 2022-03-01 14:47:33 -08:00
CodeGenCoroutines [Clang] Rename `disable-noundef-analysis` flag to `-[no-]enable-noundef-analysis` 2022-02-18 17:02:41 +09:00
CodeGenHIP [HIPSPV] Fix literals are mapped to Generic address space 2022-02-05 17:26:52 -05:00
CodeGenObjC Add -Wno-strict-prototypes to C tests; NFC 2022-02-24 15:30:30 -05:00
CodeGenObjCXX [Clang] Rename `disable-noundef-analysis` flag to `-[no-]enable-noundef-analysis` 2022-02-18 17:02:41 +09:00
CodeGenOpenCL [Clang] Rename `disable-noundef-analysis` flag to `-[no-]enable-noundef-analysis` 2022-02-18 17:02:41 +09:00
CodeGenOpenCLCXX [OpenCL] Add support of __opencl_c_device_enqueue feature macro. 2022-01-27 14:25:59 +03:00
CodeGenSYCL [SYCL] Disallow explicit casts between mismatching address spaces 2022-02-07 11:57:30 +03:00
Coverage Add -Wno-strict-prototypes to C tests; NFC 2022-02-24 15:30:30 -05:00
CoverageMapping Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
Driver [Clang] Add `-funstable` flag to enable unstable and experimental features 2022-03-01 12:35:20 +00:00
FixIt Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
Format
Frontend [OpenMP] Make section variable external to prevent collisions 2022-02-24 10:57:09 -05:00
Headers [InstCombine] Canonicalize SPF to min/max intrinsics 2022-02-24 09:01:20 +01:00
Import
Index Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
Integration Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
InterfaceStubs Use functions with prototypes when appropriate; NFC 2022-02-09 17:16:10 -05:00
Interpreter
Layout
Lexer [Clang] Add `-funstable` flag to enable unstable and experimental features 2022-03-01 12:35:20 +00:00
LibClang
Misc Revert "[NFC] Update new warning to test" 2022-02-15 22:23:26 -05:00
Modules [C++20][Modules][8/8] Amend module visibility rules for partitions. 2022-03-01 08:29:05 +00:00
OpenMP [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules. 2022-02-28 18:18:33 -06:00
PCH Add -Wno-strict-prototypes to C tests; NFC 2022-02-24 15:30:30 -05:00
Parser [c++2b] Implement P0849R8 auto(x) 2022-02-28 19:21:08 -06:00
ParserSYCL
Preprocessor [HIP] Support `-fgpu-default-stream` 2022-02-23 22:28:29 -05:00
Profile Use functions with prototypes when appropriate; NFC 2022-02-12 07:25:06 -05:00
Refactor Use functions with prototypes when appropriate; NFC 2022-02-12 07:25:06 -05:00
Rewriter Use functions with prototypes when appropriate; NFC 2022-02-12 07:25:06 -05:00
Sema [Clang] noinline call site attribute 2022-02-28 21:21:17 +01:00
SemaCUDA [CUDA][HIP] Do not promote constexpr var with non-constant initializer 2022-02-15 15:15:55 -05:00
SemaCXX [AST] Print NTTP args as string-literals when possible 2022-03-01 19:34:27 -06:00
SemaObjC Clang `unused-but-set-variable` warnings should not apply to `__attribute__((objc_precise_lifetime))` Objective-C pointers 2022-02-24 14:26:05 -08:00
SemaObjCXX [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"". 2022-02-04 20:17:34 +01:00
SemaOpenCL Add -Wno-strict-prototypes to C tests; NFC 2022-02-24 15:30:30 -05:00
SemaOpenCLCXX [OpenCL] Add support of __opencl_c_device_enqueue feature macro. 2022-01-27 14:25:59 +03:00
SemaSYCL [SYCL] Disallow explicit casts between mismatching address spaces 2022-02-07 11:57:30 +03:00
SemaTemplate [AST] Print NTTP args as string-literals when possible 2022-03-01 19:34:27 -06:00
Syntax [Pseudo] Token/TokenStream, PP directive parser. 2022-02-23 17:52:02 +01:00
TableGen [clang] Introduce support for disabling warnings in system macros 2022-01-12 08:18:19 +00:00
Templight [Templight] Don't display empty strings for names of unnamed template parameters 2022-01-24 16:37:11 +01:00
Tooling [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer 2022-01-14 10:05:47 +01:00
Unit
VFS Use functions with prototypes when appropriate; NFC 2022-02-12 07:25:06 -05:00
clang-rename
utils/update_cc_test_checks Use functions with prototypes when appropriate; NFC 2022-02-12 07:25:06 -05:00
.clang-format
CMakeLists.txt clang-analyzer plugins require LLVM_ENABLE_PLUGINS also 2022-02-16 11:59:09 -05:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it 2022-02-25 17:51:37 +01:00
lit.site.cfg.py.in replace clang LLVM_ENABLE_PLUGINS -> CLANG_PLUGIN_SUPPORT in tests 2022-02-09 17:31:34 -05:00
make_test_dirs.pl