[PATCH] D101259: [clang-tidy] Fix cppcoreguidelines-pro-type-vararg false positives with __builtin_ms_va_list

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 30 10:08:19 PDT 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Just some minor nits from me, but otherwise LG!



================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:66
+
+  auto CheckVaList = [](const QualType &NodeTy, const QualType &Expected,
+                        const ASTContext &Context) {
----------------
`QualType` objects are intended to be super cheap to copy, so no need to do the const ref dance with them.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:97-100
+  if (Desugar == Context.getBuiltinMSVaListType().getDesugaredType(Context)) {
+    if (CheckVaList(NodeTy, Context.getBuiltinMSVaListType(), Context))
+      return true;
+  }
----------------



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

https://reviews.llvm.org/D101259



More information about the cfe-commits mailing list