aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-26 04:08:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-26 04:08:46 +0000
commit4ca93d9978aac02b01814b4f749d6903a1f87ee5 (patch)
tree567afc5124dbf52e1714409bb2b19751ad52a874 /lib/Sema/SemaDecl.cpp
parentb3dcbbda59a24a5c72483d00f16c5e3f2b328495 (diff)
Delay checking of dependent underlying types for redeclarations of member
enumerations in templates until the template is instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 68b27ef1f9..e92b3e4aca 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -7780,7 +7780,9 @@ bool Sema::CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped,
}
if (IsFixed && Prev->isFixed()) {
- if (!Context.hasSameUnqualifiedType(EnumUnderlyingTy,
+ if (!EnumUnderlyingTy->isDependentType() &&
+ !Prev->getIntegerType()->isDependentType() &&
+ !Context.hasSameUnqualifiedType(EnumUnderlyingTy,
Prev->getIntegerType())) {
Diag(EnumLoc, diag::err_enum_redeclare_type_mismatch)
<< EnumUnderlyingTy << Prev->getIntegerType();