[PATCH] D73852: [clang] detect switch fallthrough marked by a comment (PR43465)

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 12 05:36:37 PST 2020


thakis added inline comments.


================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1239
+              llvm::Regex("(/\\*[ \\t]*fall(s | |-)?thr(ough|u)\\.?[ \\t]*\\*/)"
+                          "|(//[ \\t]*fall(s | |-)?thr(ough|u)\\.?[ \\t]*)",
+                          llvm::Regex::IgnoreCase);
----------------
Also, this adds a regex match for every comment line, yes? Isn't this terrible for build performance? Did you do any benchmarking of this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73852





More information about the cfe-commits mailing list