From b2bc2e67520df0417fc5287de92e3cebd3060cfd Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 21 Feb 2011 20:05:19 +0000 Subject: Tweaks to C++0x deduced auto type support: * Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema * Temporary template parameter list for auto deduction is now allocated on the stack. * Deduced 'auto' types are now uniqued. llvm-svn: 126139 --- clang/lib/Sema/Sema.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Sema/Sema.cpp') diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 23a3c24804e..78d49b74158 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -466,6 +466,12 @@ void Sema::ActOnEndOfTranslationUnit() { checkUndefinedInternals(*this); } + // Check we've noticed that we're no longer parsing the initializer for every + // variable. If we miss cases, then at best we have a performance issue and + // at worst a rejects-valid bug. + assert(ParsingInitForAutoVars.empty() && + "Didn't unmark var as having its initializer parsed"); + TUScope = 0; } -- cgit v1.2.3