From 23a0739161db5ddf398461c9e3293ce7bdd606bf Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Mon, 20 Oct 2014 17:32:04 +0000 Subject: 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/lib/Sema/SemaDecl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 31266355e52..1666551d51f 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -10666,6 +10666,7 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, /*RefQualifierLoc=*/NoLoc, /*ConstQualifierLoc=*/NoLoc, /*VolatileQualifierLoc=*/NoLoc, + /*RestrictQualifierLoc=*/NoLoc, /*MutableLoc=*/NoLoc, EST_None, /*ESpecLoc=*/NoLoc, -- cgit v1.2.3