When instantiating a function-scoped enum, make sure that it and its
enumeration constants get placed into the local instantiation hash
table. Fixes PR6375.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97471 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index da192dd..4d017ca 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -3433,7 +3433,7 @@
void InstantiatedLocal(const Decl *D, Decl *Inst) {
Decl *&Stored = LocalDecls[D];
- assert(!Stored && "Already instantiated this local");
+ assert((!Stored || Stored == Inst) && "Already instantiated this local");
Stored = Inst;
}
};