diff options
author | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2012-10-04 21:42:10 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2012-10-04 21:42:10 +0000 |
commit | 59c0a818a79be850f7ae8fdafd57a1710e5b809a (patch) | |
tree | e52b54d595d603dea2e8e8265ce1d1f293f053c4 /lib/Parse/ParseExpr.cpp | |
parent | 635311f94e8fd4ff153130d91046ff78ffe97b06 (diff) |
Fixed FunctionTypeLoc source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 90373920c5..c7be0d3ff2 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -2486,18 +2486,28 @@ ExprResult Parser::ParseBlockLiteralExpression() { } else { // Otherwise, pretend we saw (void). ParsedAttributes attrs(AttrFactory); - ParamInfo.AddTypeInfo(DeclaratorChunk::getFunction(true, false, false, - SourceLocation(), - 0, 0, 0, - true, SourceLocation(), - SourceLocation(), - SourceLocation(), - SourceLocation(), - EST_None, - SourceLocation(), - 0, 0, 0, 0, - CaretLoc, CaretLoc, - ParamInfo), + SourceLocation NoLoc; + ParamInfo.AddTypeInfo(DeclaratorChunk::getFunction(/*HasProto=*/true, + /*IsAmbiguous=*/false, + /*RParenLoc=*/NoLoc, + /*ArgInfo=*/0, + /*NumArgs=*/0, + /*EllipsisLoc=*/NoLoc, + /*RParenLoc=*/NoLoc, + /*TypeQuals=*/0, + /*RefQualifierIsLvalueRef=*/true, + /*RefQualifierLoc=*/NoLoc, + /*ConstQualifierLoc=*/NoLoc, + /*VolatileQualifierLoc=*/NoLoc, + /*MutableLoc=*/NoLoc, + EST_None, + /*ESpecLoc=*/NoLoc, + /*Exceptions=*/0, + /*ExceptionRanges=*/0, + /*NumExceptions=*/0, + /*NoexceptExpr=*/0, + CaretLoc, CaretLoc, + ParamInfo), attrs, CaretLoc); MaybeParseGNUAttributes(ParamInfo); |