[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 27 09:17:59 PST 2025


================
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE,
 } // namespace
 #endif /* NDEBUG */
 
-namespace clang::ast_matchers {
+class CustomMatcher {
----------------
ilya-biryukov wrote:

this class must go into an anonymous `namespace {}` to avoid ODR violations (if other `.cc` file ever defines the same class).


https://github.com/llvm/llvm-project/pull/124554


More information about the cfe-commits mailing list