summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/enum-argument.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix crash on switch conditions of non-integer types in templates"Dmitri Gribenko2019-08-131-1/+2
| | | | | | This reverts commit r368706. It broke ClangTidy tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368738 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash on switch conditions of non-integer types in templatesElizabeth Andrews2019-08-131-2/+1
| | | | | | | | | | | | | | | | | | | Clang currently crashes for switch statements inside a template when the condition is a non-integer field. The crash is due to incorrect type-dependency of field. Type-dependency of member expressions is currently set based on the containing class. This patch changes this for 'members of the current instantiation' to set the type dependency based on the member's type instead. A few lit tests started to fail once I applied this patch because errors are now diagnosed earlier (does not wait till instantiation). I've modified these tests in this patch as well. Patch fixes PR#40982 Differential Revision: https://reviews.llvm.org/D61027 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368706 91177308-0d34-0410-b5e6-96231b3b80d8
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the logic for when to build an overloaded binop. In particular,John McCall2010-12-061-1/+1
| | | | | | | | | | | build one when either of the operands calls itself type-dependent; previously we were building when one of the operand types was dependent, which is not always the same thing and which can lead to unfortunate inconsistencies later. Fixes PR8739. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120990 91177308-0d34-0410-b5e6-96231b3b80d8
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
* A type- or value-dependent expression cannot use bitfieldDouglas Gregor2010-05-241-0/+13
| | | | | | | promotion. Fixes <rdar://problem/8020920>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104545 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that EnumConstantDecls always get a type, even when they have ↵Douglas Gregor2009-11-061-0/+16
| | | | | | type-dependent initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86197 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the type of a enum non-type template argument within the instantiation.Sebastian Redl2009-05-271-0/+7
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72489 91177308-0d34-0410-b5e6-96231b3b80d8