Commit Graph

6 Commits

Author SHA1 Message Date
Kaelyn Takata 3587fff95e Fix a crash when the size of an 'auto' is needed and its initalizer
contained a typo correction (the auto decl was being marked as dependent
unnecessarily, which triggered an assertion in cases where the size of
the type is needed).

llvm-svn: 232568
2015-03-17 23:50:12 +00:00
Richard Smith 3249fed9b2 If we find an error in the range expression in a range-based for loop, and the
loop variable has a type containing 'auto', set the declaration to be invalid
(because we couldn't deduce its type) to prevent follow-on errors.

llvm-svn: 188853
2013-08-21 01:40:36 +00:00
Richard Smith 27d807cc9c Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.

llvm-svn: 180789
2013-04-30 13:56:41 +00:00
Richard Smith 2f36dae5c0 When determining whether to try evaluating the initializer of a variable, check
whether the initializer is value-dependent rather than whether we are in a
dependent context. This allows us to detect some errors sooner, and fixes a
crash-on-invalid if a dependent type leaks out to a non-dependent context in
error recovery.

llvm-svn: 166898
2012-10-28 06:18:02 +00:00
Argyrios Kyrtzidis 668bf82658 Add a test case for the stack overflow in rdar://12542261
llvm-svn: 166858
2012-10-27 02:13:28 +00:00
Argyrios Kyrtzidis 8e50297652 Fix stack overflow when trying to create an implicit moving
constructor with invalid code.

rdar://12240916

llvm-svn: 165623
2012-10-10 16:14:06 +00:00