diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-03-27 23:36:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-03-27 23:36:39 +0000 |
commit | 9807a2e0ddb1eafb8725dbf0247271a4a694037b (patch) | |
tree | 508fded4dc90e33dcb937073b2a4c483f9b2acab /lib/Sema/SemaType.cpp | |
parent | cbd739410be5ecd8161cab1caba54df8cf15b02d (diff) |
Don't reject __restrict applied to a dependent type; it might instantiate to a pointer or reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index e9ccbecaba..95df969eba 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1106,7 +1106,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { << EltTy << DS.getSourceRange(); TypeQuals &= ~DeclSpec::TQ_restrict; // Remove the restrict qualifier. } - } else { + } else if (!Result->isDependentType()) { S.Diag(DS.getRestrictSpecLoc(), diag::err_typecheck_invalid_restrict_not_pointer) << Result << DS.getSourceRange(); |