================
@@ -250,7 +250,9 @@ AST_MATCHER_P(Stmt, ignoreUnsafeBufferInContainer,
AST_MATCHER_P(Stmt, ignoreUnsafeLibcCall, const UnsafeBufferUsageHandler *,
Handler) {
- return Handler->ignoreUnsafeBufferInLibcCall(Node.getBeginLoc());
+ if (Finder->getASTContext().getLangOpts().CPlusPlus)
+ return Handler->ignoreUnsafeBufferInLibcCall(Node.getBeginLoc());
+ return true; /* Only warn about libc calls for C++ */
----------------
jkorous-apple wrote:
This implementation should warn in Obj-C++ too and it should not in Obj-C but
you might want to test that.
https://github.com/llvm/llvm-project/pull/109496
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits