[cfe-commits] r70389 - in /cfe/trunk:	include/clang/Parse/DeclSpec.h include/clang/Parse/Parser.h	lib/Parse/DeclSpec.cpp lib/Parse/ParseDecl.cpp	lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExpr.cpp	lib/Sema/SemaDecl.cpp test/Parser/cxx-exception-spec.cpp	www/cxx_status.html
    Douglas Gregor 
    dgregor at apple.com
       
    Wed Apr 29 11:22:32 PDT 2009
    
    
  
On Apr 29, 2009, at 10:30 AM, Sebastian Redl wrote:
> Author: cornedbee
> Date: Wed Apr 29 12:30:04 2009
> New Revision: 70389
>
> URL: http://llvm.org/viewvc/llvm-project?rev=70389&view=rev
> Log:
> Have the parser communicate the exception specification to the action.
Oooh, I have a feeling you're going to run into C++'s "shadow type  
system" very soon :)
>
> +    // FIXME: Does an empty vector ever allocate? Exception  
> specifications are
> +    // extremely rare, so we want something like a  
> SmallVector<TypeTy*, 0>. :-)
> +    std::vector<TypeTy*> Exceptions;
I've never seen an std::vector that allocates. Now, it might be worth  
using a SmallVector<TypeTy*, 4>, just so that a one- or two-exception  
exception specification doesn't need to allocate. Besides, stack space  
is cheap :)
Thanks for tackling this.
	- Doug
    
    
More information about the cfe-commits
mailing list