thakis added a comment. > ASTMatchers have been baked into clang binary for at least a few years > already, actively used by the static analyzer (some backstory in D25429 > <https://reviews.llvm.org/D25429>). This warning is, however, probably the > first use in clang proper, so they'll be there even if static analyzer > support is turned off through cmake flags. > > I'm open to a broader discussion. To me it's natural that there exist > "analysis-based warnings" that take advantage of advanced analysis tools, and > ASTMatchers is just one such tool, definitely not the most expensive one and > not the most hazardous one (CFG and flow-sensitive analysis are arguably much > scarier in both regards, and they're actively used in essential warnings such > as `-Wuninitialized`).
This has been discussed extensively when ASTMatchers were introduced. Project leadership back then (Doug Gregor and iirc Richard Smith) thought ASTMatches weren't a great approach and agreed to have them merged only if they aren't used in clang itself, but only in clang-tools-extra. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138329/new/ https://reviews.llvm.org/D138329 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits