[PATCH] D123627: Correctly diagnose prototype redeclaration errors in C

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 13:35:14 PDT 2022


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

This LGTM, please give a day or so for others to take a look.



================
Comment at: clang/test/Sema/predefined-function.c:27
 
-int foobar(int); // note {{previous declaration is here}}
-int foobar() // error {{conflicting types for 'foobar'}}
+int foobar(int); // expected-note {{previous declaration is here}}
+int foobar() // expected-error {{conflicting types for 'foobar'}}
----------------
Oh my!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123627/new/

https://reviews.llvm.org/D123627



More information about the cfe-commits mailing list