[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 15:39:30 PDT 2018


nickdesaulniers marked an inline comment as done.
nickdesaulniers added inline comments.


================
Comment at: test/FixIt/fixit.c:50
-// CHECK: const typedef int int_t;
-const typedef typedef int int_t; // expected-warning {{duplicate 'typedef'}}
-
----------------
nickdesaulniers wrote:
> Ah, this was a case I should add one last test for.  I think reviewers can still start reviewing the rest.  This should just add one additional test case.
Added test case back.


================
Comment at: test/Parser/atomic.c:5
 typedef _Atomic int atomic_int;
-typedef _Atomic _Atomic _Atomic(int) atomic_int; // expected-warning {{duplicate '_Atomic' declaration specifier}}
 
----------------
nickdesaulniers wrote:
> Note to reviewers: this deletion was intentional. It is not copied over to the new test file test/Sema/dupl-declspec.c because we now DONT want to warn for duplicates in C99+, and `_Atomic` was not available before C11.
Actually, we can still test that it does not appear.


================
Comment at: test/Sema/declspec.c:43
-volatile volatile int pr8264_2;  // expected-warning {{duplicate 'volatile' declaration specifier}}
-char * restrict restrict pr8264_3;  // expected-warning {{duplicate 'restrict' declaration specifier}}
-
----------------
nickdesaulniers wrote:
> Note to reviewers; this deletion was intentional.  It is not copied over to the new test file test/Sema/dupl-declspec.c with the rest of the PR8264 cases because we now DONT want to warn for duplicates in C99+, and `restrict` was not available before then (ie. C90).
> 
> The rest of these cases were moved to the new test file test/Sema/dupl-declspec.c and exhaustively tested against all current C standards.
Actually, we can still test that it does not appear.


Repository:
  rC Clang

https://reviews.llvm.org/D52248





More information about the cfe-commits mailing list