rjmccall added inline comments.
================ Comment at: clang/lib/Sema/SemaChecking.cpp:7671 + AllArgs, CallType)) + return true; + ---------------- yihanaa wrote: > rjmccall wrote: > > You can just pull the argument expressions out of the `CallExpr`; you don't > > need to call `GatherArgumentsForCall`. > > You can just pull the argument expressions out of the `CallExpr`; you don't > > need to call `GatherArgumentsForCall`. > > This GatherArgumentsForCall was used to do the common sema checking and emit > warning, like './main.cpp:5:40: warning: passing 'volatile char *' to > parameter of type 'const void *' discards qualifiers > [-Wincompatible-pointer-types-discards-qualifiers]' hahaha, for this is a > common case, I also think GatherArgumentsForCall is not a good choice > , so I try to find a replacement, e.g. ImpCastExprToType or other ways, what > do you think about? `convertArgumentToType` should trigger any useful warnings in the second and third arguments. For the first, I don't actually think there are any warnings we care about. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131979/new/ https://reviews.llvm.org/D131979 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits