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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 20 13:15:59 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/Sema/gnu89.c:1-2
-// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify
+// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s
+// RUN: %clang_cc1 %s -std=gnu89 -fsyntax-only 2>&1 | FileCheck %s
 
----------------
This ideally needs positive tests. E.g.:
* `-std=c89`
* `-std=c89 -pedantic`
* `-std=gnu99`
* `-std=gnu99 -pedantic`
* `-std=c99`
* `-std=c99 -pedantic`



================
Comment at: test/Sema/gnu89.c:16
+// CHECK-PEDANTIC: warning: duplicate 'const' declaration specifier
+// CHECK-otherwise-NOT: warning: duplicate 'const' declaration specifier
+
----------------
There is no `otherwise` check prefix in the run lines.


Repository:
  rC Clang

https://reviews.llvm.org/D52248





More information about the cfe-commits mailing list