diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-02-21 20:05:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-02-21 20:05:19 +0000 |
commit | b2bc2e67520df0417fc5287de92e3cebd3060cfd (patch) | |
tree | 8eb5c1796680a77e020f0559a51e302b8a4616e4 /clang/lib/Sema/Sema.cpp | |
parent | bda17491c4885ed37235c1e8afcfe75de479cd3b (diff) | |
download | bcm5719-llvm-b2bc2e67520df0417fc5287de92e3cebd3060cfd.tar.gz bcm5719-llvm-b2bc2e67520df0417fc5287de92e3cebd3060cfd.zip |
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
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |