Add RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfo
authorHal Finkel <hfinkel@anl.gov>
Mon, 20 Oct 2014 17:32:04 +0000 (17:32 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 20 Oct 2014 17:32:04 +0000 (17:32 +0000)
commit23a0739161db5ddf398461c9e3293ce7bdd606bf
tree602ebde3c9e8e7a56525a49a8bb47a71b75a5852
parent52ca678d7464cf6d85393794558297411d7eeaf0
Add RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfo

Clang supports __restrict__ as a function qualifier, but
DeclaratorChunk::FunctionTypeInfo lacked a field to track the qualifier's
source location (as we do with volatile, etc.). This was the subject of a FIXME
in GetFullTypeForDeclarator (in SemaType.cpp). This should also prove useful as
we add more warnings regarding questionable uses of the restrict qualifier.

There is no significant functional change (except for an improved source range
associated with the err_invalid_qualified_function_type diagnostic fixit
generated by GetFullTypeForDeclarator).

llvm-svn: 220215
clang/include/clang/Sema/DeclSpec.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseExpr.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/DeclSpec.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaType.cpp