diff options
-rw-r--r-- | lib/Sema/SemaType.cpp | 3 | ||||
-rw-r--r-- | test/Sema/function.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 4dc6c949d5..fa002bba19 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -2032,8 +2032,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, ASM = ArrayType::Normal; D.setInvalidType(true); } - T = S.BuildArrayType(T, ASM, ArraySize, - Qualifiers::fromCVRMask(ATI.TypeQuals), + T = S.BuildArrayType(T, ASM, ArraySize, ATI.TypeQuals, SourceRange(DeclType.Loc, DeclType.EndLoc), Name); break; } diff --git a/test/Sema/function.c b/test/Sema/function.c index b51c137ce7..1eb5ac4623 100644 --- a/test/Sema/function.c +++ b/test/Sema/function.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic -// PR1892 -void f(double a[restrict][5]); // should promote to restrict ptr. -void f(double (* restrict a)[5]); + +// PR1892, PR11354 +void f(double a[restrict][5]) { __typeof(a) x = 10; } // expected-warning {{(aka 'double (*restrict)[5]')}} int foo (__const char *__path); int foo(__const char *__restrict __file); |