diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 1bdd7c3b39..60db55aff3 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1996,6 +1996,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), diag::err_type_defined_in_alias_template) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); + D.setInvalidType(true); break; case Declarator::TypeNameContext: case Declarator::TemplateParamContext: @@ -2006,6 +2007,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), diag::err_type_defined_in_type_specifier) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); + D.setInvalidType(true); break; case Declarator::PrototypeContext: case Declarator::ObjCParameterContext: @@ -2016,6 +2018,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), diag::err_type_defined_in_param_type) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); + D.setInvalidType(true); break; case Declarator::ConditionContext: // C++ 6.4p2: @@ -2023,6 +2026,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, // a new class or enumeration. SemaRef.Diag(OwnedTagDecl->getLocation(), diag::err_type_defined_in_condition); + D.setInvalidType(true); break; } } |