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

Stephen Hines via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 20 13:48:52 PDT 2018


srhines added inline comments.


================
Comment at: lib/Sema/SemaType.cpp:1682
     // or via one or more typedefs."
-    if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus
-        && TypeQuals & Result.getCVRQualifiers()) {
----------------
This is broken for C11 and C17 (even before you touch anything). As we just talked about, let's have a helper function to detect the oldest version (and maybe even that should get promoted as a LANGOPT).


Repository:
  rC Clang

https://reviews.llvm.org/D52248





More information about the cfe-commits mailing list