diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-01 18:44:50 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-01 18:44:50 +0000 |
| commit | 7fb25418ed726c594ee800378538a96c69e84d4b (patch) | |
| tree | ebd4b5fca812482aa6686384f20e5d279d6bc695 /clang/lib/Sema/DeclSpec.cpp | |
| parent | f14331f5c32c10ddca43ab4d0b3faff2fdfa1367 (diff) | |
| download | bcm5719-llvm-7fb25418ed726c594ee800378538a96c69e84d4b.tar.gz bcm5719-llvm-7fb25418ed726c594ee800378538a96c69e84d4b.zip | |
Implement the C++0x "trailing return type" feature, e.g.,
auto f(int) -> int
from Daniel Wallin!
(With a few minor bug fixes from me).
llvm-svn: 115322
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
| -rw-r--r-- | clang/lib/Sema/DeclSpec.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index b46e8af9db8..979b76ae984 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -59,7 +59,8 @@ DeclaratorChunk DeclaratorChunk::getFunction(bool hasProto, bool isVariadic, unsigned NumExceptions, SourceLocation LPLoc, SourceLocation RPLoc, - Declarator &TheDeclarator) { + Declarator &TheDeclarator, + ParsedType TrailingReturnType) { DeclaratorChunk I; I.Kind = Function; I.Loc = LPLoc; @@ -76,6 +77,7 @@ DeclaratorChunk DeclaratorChunk::getFunction(bool hasProto, bool isVariadic, I.Fun.hasAnyExceptionSpec = hasAnyExceptionSpec; I.Fun.NumExceptions = NumExceptions; I.Fun.Exceptions = 0; + I.Fun.TrailingReturnType = TrailingReturnType.getAsOpaquePtr(); // new[] an argument array if needed. if (NumArgs) { |

