llvm-project/clang/test/Parser
Aaron Ballman fa596fb077 Fix a failed assertion on an invalid typename requirement
The parsing code for a typename requirement currently asserts when
given something which is not a valid type-requirement
(http://eel.is/c++draft/expr.prim.req.type#nt:type-requirement). This
removes the assertion to continue on to the proper diagnostic.

This resolves PR53057.

Note that in that PR, it is using _BitInt(N) as a dependent type name.
This patch does not attempt to support that as it is not clear that is
a valid type requirement (it does not match the grammar production for
one). The workaround in the PR, however, is definitely valid and works
as expected.
2022-01-18 11:59:08 -05:00
..
CompoundStmtScope.c
DelayedTemplateParsing.cpp [MS] Warn when shadowing template parameters under -fms-compatibility 2019-09-12 18:26:34 +00:00
MicrosoftExtensions.c
MicrosoftExtensions.cpp [clang] Fix for "Bug 27113 - MSVC-compat __identifier implementation incomplete" 2021-05-21 11:14:01 +02:00
MicrosoftExtensionsInlineAsm.c
PR11000.cpp
PR21872.cpp
access-spec-attrs.cpp [Annotation] Allows annotation to carry some additional constant arguments. 2020-10-26 10:50:05 +01:00
altivec-bool-128.c [PowerPC] Disable vector types when not supported by subtarget features 2021-10-04 14:16:47 -05:00
altivec-csk-bool.c
altivec-non-type-vector.c When vector is found as a type or non-type id, check if it is really the altivec vector token. 2021-05-20 12:39:04 -04:00
altivec-template-vector.cpp When vector is found as a type or non-type id, check if it is really the altivec vector token. 2021-05-20 12:39:04 -04:00
altivec-typedef-vector.c When vector is found as a type or non-type id, check if it is really the altivec vector token. 2021-05-20 12:39:04 -04:00
altivec-zvector-bool.c Parse vector bool when stdbool.h and altivec.h are included 2021-05-13 11:48:32 -04:00
altivec.c [PowerPC] Disable vector types when not supported by subtarget features 2021-10-04 14:16:47 -05:00
annotation-token-in-lexed-body.cpp
argument_qualified.c
argument_redef.c
argument_scope.c
arm-windows-calling-convention-handling.c
asm-constraints-pr7869.c
asm-goto.c Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
asm-goto.cpp Support output constraints on "asm goto" 2020-02-24 18:51:29 -08:00
asm-qualifiers.c [clang][Parse] properly parse asm-qualifiers, asm inline 2020-03-12 15:13:59 -07:00
asm.c [clang][Parse] properly parse asm-qualifiers, asm inline 2020-03-12 15:13:59 -07:00
asm.cpp Revert "clang support gnu asm goto." 2019-05-30 15:38:02 +00:00
atomic.c Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
attr-availability-xcore.c Adding a test case that I accidentally dropped from 27ea7d0a6e 2020-12-15 14:56:44 -05:00
attr-availability.c [NFC] Add -std=c11 to attr-availability.c 2021-01-15 21:05:49 -08:00
attr-external-source-symbol-cxx11.cpp
attr-external-source-symbol.m
attr-order.cpp Ignore unknown attribute warnings in this test 2021-01-27 15:45:35 -05:00
attributes.c Require commas to separate multiple GNU-style attributes in the same attribute list. 2019-06-18 12:57:05 +00:00
attributes.mm Add support for attributes on @implementations in Objective-C 2019-04-11 17:55:30 +00:00
backtrack-crash.cpp
backtrack-off-by-one.cpp
bad-control.c
block-block-storageclass.c
block-pointer-decl.c
bracket-crash.cpp
brackets.c
brackets.cpp
builtin_classify_type.c PR44684: Look through parens and similar constructs when determining 2020-02-06 12:21:54 -08:00
builtin_source_location.c Implement __builtin_LINE() et. al. to support source location capture. 2019-05-16 21:04:15 +00:00
builtin_types_compatible.c
c-namespace.c
c1x-alignas.c Quote the token being diagnosed for C11 extensions. 2019-08-27 13:47:51 +00:00
c1x-generic-selection.c Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
c2x-attributes.c Fix potential infinite loop with malformed attribute syntax 2021-04-15 10:47:32 -04:00
c2x-attributes.m
c11-noreturn.c Replace some custom C11 extension warnings with the generic warning. 2019-08-27 14:41:39 +00:00
c99.c Diagnose _Bool as a C99 extension. 2019-08-27 20:33:05 +00:00
captured-statements.c
char-literal-printing.c
check-objc2-syntax-1.m
check-syntax-1.m
check_cast.c
colon-colon-parentheses.cpp
completely-empty-header-file.h
compound-token-split.cpp Fix -Wcompound-token-split to give the same warnings under -E 2020-08-31 20:59:20 -07:00
compound_literal.c
control-scope.c
crash-report.c Re-land Remove REQUIRES:shell from tests that pass for me on Windows 2019-09-10 20:15:45 +00:00
cuda-check-input-kind-assoc.cuh [Frontend] Treat .cuh files as CUDA source files 2020-11-12 11:42:53 -08:00
cuda-force-host-device-templates.cu
cuda-force-host-device.cu
cuda-kernel-call-c++11.cu [hip] Fix ambiguity from `>>>` of CUDA. 2019-05-08 00:52:33 +00:00
cuda-kernel-call.cu Fix comments in test cuda-kernel-call.cu 2021-06-02 10:21:26 -04:00
cxx-altivec-bool-128.cpp [PowerPC] Disable vector types when not supported by subtarget features 2021-10-04 14:16:47 -05:00
cxx-altivec.cpp [PowerPC] Disable vector types when not supported by subtarget features 2021-10-04 14:16:47 -05:00
cxx-ambig-decl-expr-xfail.cpp
cxx-ambig-decl-expr.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
cxx-ambig-init-templ.cpp Improve recovery from invalid template-ids. 2020-03-27 17:11:04 -07:00
cxx-ambig-paren-expr-asan.cpp
cxx-ambig-paren-expr.cpp
cxx-attributes.cpp [Parser] Fix attr infloop on "int x [[c" 2021-08-10 15:03:08 +02:00
cxx-bool.cpp
cxx-casting.cpp
cxx-class-template-specialization.cpp
cxx-class.cpp Use "default member initializer" instead of "in-class initializer" for diagnostics. 2020-09-29 15:04:23 -04:00
cxx-concept-declaration.cpp [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a 2020-01-24 00:48:59 +02:00
cxx-concepts-ambig-constraint-expr.cpp [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a 2020-01-24 00:48:59 +02:00
cxx-concepts-requires-clause.cpp [clang] [PR49736] [C++2b] Correctly reject lambdas with requires clause and no parameter list 2021-03-30 13:53:55 +02:00
cxx-condition.cpp
cxx-decl.cpp PR45294: Fix handling of assumed template names looked up in the lexical 2020-03-27 21:07:06 -07:00
cxx-default-args.cpp
cxx-default-delete.cpp PR41991: Accept attributes on defaulted and deleted friends. 2020-01-30 17:42:17 -08:00
cxx-ext-delete-default.cpp
cxx-extern-c-array.cpp
cxx-extra-semi.cpp
cxx-extra-virtual-specifiers.cpp [Parse] Improve diagnostic and recovery when there is an extra override in the outline method definition. 2021-10-18 10:00:21 +02:00
cxx-friend.cpp
cxx-in-c.c
cxx-invalid-for-range.cpp
cxx-invalid-function-decl.cpp
cxx-keyword-identifiers.cpp [clang] Fix crash on broken parameter declarators 2021-11-26 10:56:54 +01:00
cxx-member-crash.cpp
cxx-member-init-missing-paren-crash.cpp
cxx-member-initializers.cpp Improve error recovery from missing '>' in template argument list. 2020-03-27 18:59:01 -07:00
cxx-modules-interface.cppm [NFC] Format .cppm files in tests 2021-12-13 23:32:25 +08:00
cxx-namespace-alias.cpp
cxx-reference.cpp
cxx-stmt.cpp
cxx-template-argument.cpp [clang] Stop providing builtin overload candidate for relational function pointer comparisons 2021-06-26 00:08:02 +02:00
cxx-template-decl.cpp Update the message for template-template param keyword for C++17 2021-09-28 06:02:29 -07:00
cxx-throw.cpp
cxx-typeid.cpp
cxx-typeof.cpp
cxx-undeclared-identifier.cpp
cxx-using-declaration.cpp
cxx-using-directive.cpp
cxx-variadic-func.cpp
cxx0x-ambig.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
cxx0x-attributes.cpp [Parse] Use empty RecoveryExpr when if/while/do/switch conditions fail to parse 2022-01-10 10:38:27 +01:00
cxx0x-condition.cpp
cxx0x-decl.cpp PR47176: Don't read from an inactive union member if a friend function 2020-09-24 19:02:27 -07:00
cxx0x-for-range.cpp
cxx0x-in-cxx98.cpp
cxx0x-lambda-expressions.cpp [clang] [C++2b] [P1102] Accept lambdas without parameter list (). 2021-03-24 14:42:27 +01:00
cxx0x-literal-operators.cpp
cxx0x-member-initializers.cpp
cxx0x-override-control-keywords.cpp
cxx0x-rvalue-reference.cpp
cxx1z-attributes.cpp
cxx1z-class-template-argument-deduction.cpp Fix crash on invalid code involving late parsed inline methods 2021-12-16 07:58:51 -05:00
cxx1z-constexpr-lambdas.cpp [clang] [C++2b] [P1102] Accept lambdas without parameter list (). 2021-03-24 14:42:27 +01:00
cxx1z-coroutines.cpp
cxx1z-decomposition.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
cxx1z-fold-expressions.cpp
cxx1z-init-statement.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
cxx1z-nested-namespace-definition.cpp
cxx1z-using-declaration.cpp
cxx2a-abbreviated-templates.cpp [Concepts] Fix isDeclarationSpecifier to detect type-constraints correctly 2020-01-31 20:08:13 +02:00
cxx2a-bitfield-init.cpp
cxx2a-concept-declaration.cpp Update the message for template-template param keyword for C++17 2021-09-28 06:02:29 -07:00
cxx2a-concepts-requires-expr.cpp Fix a failed assertion on an invalid typename requirement 2022-01-18 11:59:08 -05:00
cxx2a-constrained-template-param-with-partial-id.cpp [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a 2020-01-24 00:48:59 +02:00
cxx2a-constrained-template-param.cpp [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a 2020-01-24 00:48:59 +02:00
cxx2a-designated-init.cpp [c++20] Add support for designated direct-list-initialization syntax. 2019-08-31 01:00:37 +00:00
cxx2a-init-statement.cpp [clang] Fix ternary operator in the second for loop statement 2021-05-16 10:42:52 -07:00
cxx2a-inline-nested-namespace-definition.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
cxx2a-placeholder-type-constraint.cpp [clang] Fix constrained decltype(auto) deduction 2021-03-05 18:20:09 -08:00
cxx2a-spaceship.cpp PR41991: Accept attributes on defaulted and deleted friends. 2020-01-30 17:42:17 -08:00
cxx2a-template-lambdas.cpp [clang] [PR49736] [C++2b] Correctly reject lambdas with requires clause and no parameter list 2021-03-30 13:53:55 +02:00
cxx2b-init-statement.cpp Extend init-statement to allow alias-declaration 2021-10-08 07:13:45 -04:00
cxx2b-lambdas.cpp [clang] [PR49736] [C++2b] Correctly reject lambdas with requires clause and no parameter list 2021-03-30 13:53:55 +02:00
cxx11-base-spec-attributes.cpp
cxx11-brace-initializers.cpp
cxx11-stmt-attributes.cpp
cxx11-templates.cpp
cxx11-type-specifier.cpp
cxx11-user-defined-literals.cpp Implement delimited escape sequences. 2021-09-15 09:54:49 -04:00
cxx98-enum.cpp Fix typo in enum-base disambiguation. 2020-05-10 13:39:49 -07:00
debugger-import-module.m
declarators.c
declspec-recovery.c
declspec-supported.c
decomposed-condition.cpp
designator.c
diag-crash.c
editor-placeholder-recovery.cpp [C++] Interpret unknown identifier in parameter clause as unknown type 2019-05-05 12:15:17 +00:00
empty-translation-unit.c [Parser] Suppress -Wempty-translation-unit if this is a header file 2020-08-13 09:43:27 +02:00
encode.m
enhanced-proto-1.m
eof.cpp
eof2.cpp Improve recovery from invalid template-ids. 2020-03-27 17:11:04 -07:00
explicit-bool.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
expressions.c Revert "Revert "Temporarily do not drop volatile stores before unreachable"" 2021-07-09 11:44:34 -04:00
expressions.cpp Fix a few cases that were incorrectly parsed as unary-expressions 2020-06-29 14:33:21 -07:00
expressions.m
ext-int.cpp Introduce _BitInt, deprecate _ExtInt 2021-12-06 12:52:01 -05:00
extension.c
extra-semi-resulting-in-nullstmt-in-init-statement.cpp
extra-semi-resulting-in-nullstmt.cpp [NFC][clang] Fix comments. 2022-01-05 14:49:03 +08:00
extra-semi.cpp
for.cpp
fp-floatcontrol-syntax.cpp Allow #pragma float_control(push|pop) within a language linkage specification 2021-07-28 07:37:56 -04:00
function-decls.c
gcc-__final-compatibility.cpp
gcc-for-loop-init-compatibility.c
goto.c
if-scope-c90.c
if-scope-c99.c
implicit-casts.c
knr_parameter_attributes.c
lambda-attr.cu [CUDA][NFC] Fix inexact warning message about lambdas 2021-10-27 01:28:35 +00:00
lambda-misplaced-capture-default.cpp [clang] Provide a more specific diagnostic for a misplaced lambda capture-default. 2020-07-18 20:35:16 +01:00
matrix-type-disabled.c [Matrix] Add matrix type to Clang. 2020-05-11 18:55:45 +01:00
max-tokens.cpp Turn -Wmax-tokens off by default 2020-05-18 13:21:46 +02:00
message-expr-alt-op.mm
method-def-in-class.m
method-prototype-1.m
missing-closing-rbrace.m
missing-end-2.m
missing-end-3.m
missing-end-4.m
missing-end.m
missing-selector-name.mm
ms-anachronism.c
ms-if-exists.c
ms-if-exists.cpp
ms-inline-asm-nested-braces.c
ms-inline-asm.c [X86][AsmParser] re-introduce 'offset' operator 2019-12-30 14:35:26 -05:00
ms-seh.c
ms-square-bracket-attributes.mm
namelookup-bug-1.c
namelookup-bug-2.c
namespace-alias-attr.cpp
namespaces.cpp
nested_blocks_overflow.cpp [Parser] Warn when ScopeDepthOrObjCQuals overflows 2019-11-09 15:33:01 +01:00
nested_function_prototype_overflow.cpp [Parser] Warn when ScopeDepthOrObjCQuals overflows 2019-11-09 15:33:01 +01:00
nested_lambda_overflow.cpp [Parser] Warn when ScopeDepthOrObjCQuals overflows 2019-11-09 15:33:01 +01:00
no-gnu-inline-asm.c Make language option `GNUAsm` discoverable with `__has_extension` macro. 2019-05-13 22:11:10 +00:00
nullability.c
objc-alias-printing.m
objc-at-directive-fixit.m
objc-at-implementation-eof-crash.m
objc-at-interface-eof-crash.m
objc-attr.m
objc-available.m
objc-boxing.m
objc-category-neg-1.m
objc-class-property.m
objc-cxx-keyword-identifiers.mm
objc-diag-width.mm
objc-error-qualified-implementation.m Improve error recovery from missing '>' in template argument list. 2020-03-27 18:59:01 -07:00
objc-forcollection-1.m
objc-forcollection-neg-2.m
objc-forcollection-neg.m
objc-foreach-syntax.m [AST] Build recovery expression by default for all language. 2020-11-23 11:08:28 +01:00
objc-implementation-attrs.m [Annotation] Allows annotation to carry some additional constant arguments. 2020-10-26 10:50:05 +01:00
objc-init.m [c++20] Implement semantic restrictions for C++20 designated 2019-08-30 22:52:55 +00:00
objc-interfaces.m [ObjC] Improve error message for a malformed objc-type-name 2019-06-26 23:39:23 +00:00
objc-messaging-1.m Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
objc-messaging-neg-1.m
objc-missing-impl.m
objc-property-syntax.m
objc-quirks.m
objc-recover.mm
objc-static-assert.m Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations 2019-03-14 14:18:56 +00:00
objc-static-assert.mm Fix test after r356148 2019-03-14 14:40:48 +00:00
objc-synthesized-recover.m
objc-try-catch-1.m Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
objc-type-printing.m
objcbridge-related-attribute.m
objcxx-at.mm
objcxx-enum.mm Enforce the C++11 anonymous enum bitfields check even for 2020-05-10 14:03:50 -07:00
objcxx-lambda-expressions-neg.mm
objcxx0x-lambda-expressions.mm [AST][RecoveryExpr] Build recovery expressions by default for C++. 2020-06-12 15:21:38 +02:00
objcxx11-attributes.mm Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
objcxx11-initialized-temps.mm
objcxx11-invalid-lambda.cpp [AST][RecoveryExpr] Build recovery expressions by default for C++. 2020-06-12 15:21:38 +02:00
objcxx11-messaging-and-lambda.mm
objcxx11-protocol-in-template.mm
objcxx11-user-defined-literal.mm
objcxx14-protocol-in-template.mm
offsetof.c
opencl-astype.cl [OpenCL] Pretty print __private addr space 2019-12-27 13:42:07 +00:00
opencl-atomics-cl20.cl [OpenCL] Change default standard version to CL1.2 2021-07-26 15:04:34 +01:00
opencl-cl20.cl [OpenCL] Change default standard version to CL1.2 2021-07-26 15:04:34 +01:00
opencl-cxx-keywords.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
opencl-cxx-virtual.cl [OpenCL] Add clang extension for function pointers. 2021-01-06 20:39:57 +00:00
opencl-image-access.cl
opencl-kernel.cl
opencl-keywords.cl
opencl-pragma.cl
opencl-storage-class.cl [OpenCL] Change default standard version to CL1.2 2021-07-26 15:04:34 +01:00
opencl-unroll-hint.cl Treat opencl_unroll_hint subject errors as semantic rather than parse errors 2021-02-05 07:20:41 -05:00
p10-vector-bool-128.c [PowerPC] Add support for vector bool __int128 for Power10 2020-06-23 21:25:56 -05:00
parenthesis-balance.cpp
parmvardecl_conversion.c
parser_overflow.c
placeholder-recovery.m Add support for attributes on @implementations in Objective-C 2019-04-11 17:55:30 +00:00
pointer-arithmetic.c
pointer_promotion.c
pragma-attribute-context.cpp [Parser] Emit descriptive diagnostic for misplaced pragma 2019-08-04 10:08:51 +00:00
pragma-attribute-declspec.cpp
pragma-attribute.cpp Improve docs & test for #pragma clang attribute's any clause; NFC 2021-11-17 08:24:26 -05:00
pragma-fenv_access-ms.c [MS compat] Handle #pragma fenv_access like #pragma STDC FENV_ACCESS (PR50694) 2021-10-11 17:07:26 +02:00
pragma-fenv_access.c Correct LIT test failure detected on buildbot after mibintc committed rG2e204e23911b: [clang] Enable support for #pragma STDC FENV_ACCESS D87528 2020-10-25 08:10:34 -07:00
pragma-fenv_round.c [clang] add fexperimental-strict-floating-point to test cases that fail on arm and aarch not sure this will work due to commit rG13bfd89c4962 2020-10-30 07:30:06 -07:00
pragma-fp-contract.c Add support for #pragma clang fp reassociate(on|off) 2020-05-06 08:05:44 -07:00
pragma-fp-contract.cpp [Parser] Emit descriptive diagnostic for misplaced pragma 2019-08-04 10:08:51 +00:00
pragma-fp-warn.c [clang][FPEnv] Diagnose Strict FP pragmas if target does not support StrictFP 2020-10-30 06:11:25 -07:00
pragma-fp.cpp Add option 'exceptions' to pragma clang fp 2020-10-31 17:36:12 +07:00
pragma-loop-safety.cpp
pragma-loop.cpp [SVE] Add support to vectorize_width loop pragma for scalable vectors 2021-01-08 11:37:27 +00:00
pragma-optimize-diagnostics.cpp
pragma-options.c
pragma-options.cpp
pragma-pack.c
pragma-pipeline.cpp
pragma-unroll-and-jam.cpp [Clang] New loop pragma vectorize_predicate 2019-07-25 07:33:13 +00:00
pragma-unroll.cpp [Clang] Add a "#pragma unroll" test case for correct error reporting 2020-06-16 13:03:32 -07:00
pragma-visibility.c
pragma-visibility2.c [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
pragma-weak.c
promote_types_in_proto.c
recovery.c
recovery.cpp Improve recovery from invalid template-ids. 2020-03-27 17:11:04 -07:00
recovery.m
recursion-limits.cpp
selector-1.m
sizeof-missing-parens.c Print source location in the error message when parens are missing around sizeof typename and the expression is inside macro expansion 2020-12-16 12:03:31 -08:00
skip-function-bodies.h
skip-function-bodies.mm
slh-asm-goto-no-warn.cpp [clang][asm goto][slh] Warn if asm goto + SLH 2020-05-20 09:46:18 -07:00
slh-asm-goto.cpp [clang][asm goto][slh] Warn if asm goto + SLH 2020-05-20 09:46:18 -07:00
statements.c
static_assert.c Update diagnostic groups for pre-compat warnings 2021-03-17 07:52:34 -04:00
stmt-attributes.c Automate common diagnostic checking for statement attributes 2021-03-19 08:35:38 -04:00
stmt-attributes.cpp [Attr] Apply GNU-style attributes to expression statements 2021-02-11 16:44:41 +03:00
stmt-attributes.m [Attr] Apply GNU-style attributes to expression statements 2021-02-11 16:44:41 +03:00
struct-recursion.c
switch-recovery.cpp
switch-typo-correction.cpp [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt. 2020-03-24 15:17:04 +01:00
top-level-semi-cxx0x.cpp
traditional_arg_scope.c
typeof.c
types.c
using-if-exists-attr.cpp [clang] Implement the using_if_exists attribute 2021-06-02 10:30:24 -04:00
using-template.cpp Consume unexpected "template" keywords after "using" 2019-05-01 23:33:49 +00:00
vector-cast-define.cl
vsx.c
warn-cuda-compat.cu
warn-dangling-else.cpp
warn-misleading-indentation-fix.cpp [Diagnostic] Add test for previous b4b904e19b 2020-01-04 01:41:21 +01:00
warn-misleading-indentation.cpp [Diagnostic] make Wmisleading-indendation not warn about labels 2020-01-06 23:22:27 +01:00
warn-semicolon-before-method-body.m
x64-windows-calling-convention-handling.c