[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 16:37:11 PDT 2019


xbolva00 added inline comments.


================
Comment at: clang/lib/Parse/ParseTentative.cpp:2131
+  ParseGNUAttributes(attrs, nullptr, nullptr);
+  if (attrs.size() <= 0) {
+    return TPResult::False;
----------------
Negative size() ?

Did you mean “== 0”? Not sure if “empty()”  exists there..


================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1280
+      if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) {
         const Stmt *Term = B->getTerminatorStmt();
         // Skip empty cases.
----------------
Make it unconditional (see my patch)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64838





More information about the cfe-commits mailing list