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

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 28 16:28:50 PDT 2018


nickdesaulniers added a comment.

Ok, I think this is ready for rereview.



================
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}}
 
----------------
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.


================
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}}
-
----------------
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.


Repository:
  rC Clang

https://reviews.llvm.org/D52248





More information about the cfe-commits mailing list