Francois Pichet
e6664762ec
In -fdelayed-template-parsing mode, reenter every scope when late parsing a templated function; (Not just the template parameter scope as previously). Also enter the scope stack in the correct order.
...
Otherwise this breaks some invariant during name lookup especially when dealing with shadowed declaration
Fix PR11931.
llvm-svn: 151140
2012-02-22 08:25:53 +00:00
Francois Pichet
6dc4c16417
Enable delayed template parsing for friend functions declared at template class scope.
...
llvm-svn: 144980
2011-11-18 23:47:17 +00:00
Francois Pichet
8134518331
[microsoft] Fix a bug in -fdelayed-template-parsing mode where we were not reentering the delayed function context correctly. The problem was that all template params were reintroduced inside the same scope. So if we had a situation where we had 2 template params with the same name at different scope then clang would generate an error about ambiguous name.
...
The solution is to create a new ParseScope(Scope::TemplateParamScope) for each template scope that we want to reenter. (from the outmost to the innermost scope)
This fixes some errors when parsing MFC code with clang.
llvm-svn: 140344
2011-09-22 22:14:56 +00:00
Chandler Carruth
03b77b37d6
Remove hard coded dos line endings, let subversion translate them on
...
update.
Despite the diff, nothing but line endings changed here.
llvm-svn: 130121
2011-04-25 06:34:35 +00:00
Francois Pichet
dcb3ebeb2c
Correctly emit a diagnostic for multiple templated function definitions in -flate-template-parsing mode.
...
llvm-svn: 130030
2011-04-22 23:20:44 +00:00
Francois Pichet
1c229c0472
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
...
Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.
llvm-svn: 130022
2011-04-22 22:18:13 +00:00