diff options
| author | John McCall <rjmccall@apple.com> | 2010-01-13 20:03:27 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-01-13 20:03:27 +0000 |
| commit | e8595036c4111a58c60c1b33402f45026ed49976 (patch) | |
| tree | bbb4efb55aae5befc22d957aa820b47aa8c92de1 /clang/lib/Parse | |
| parent | e14e372b67e82c5ba244630bd96bba949c40d3e5 (diff) | |
| download | bcm5719-llvm-e8595036c4111a58c60c1b33402f45026ed49976.tar.gz bcm5719-llvm-e8595036c4111a58c60c1b33402f45026ed49976.zip | |
Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.
llvm-svn: 93344
Diffstat (limited to 'clang/lib/Parse')
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 1e8e33ebd84..66a69574433 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3154,6 +3154,8 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) { Token OpTok = Tok; SourceLocation StartLoc = ConsumeToken(); + const bool hasParens = Tok.is(tok::l_paren); + bool isCastExpr; TypeTy *CastTy; SourceRange CastRange; @@ -3161,6 +3163,8 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) { isCastExpr, CastTy, CastRange); + if (hasParens) + DS.setTypeofParensRange(CastRange); if (CastRange.getEnd().isInvalid()) // FIXME: Not accurate, the range gets one token more than it should. |

