[PATCH] D103385: [clang-tidy] bugprone-forwarding-reference-overload: support non-type template parameters

Jesse Towner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 30 19:53:53 PDT 2021


jwtowner added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp:83
+                  hasType(isEnableIf()),
+                  anyOf(hasDescendant(cxxBoolLiteral()),
+                        hasDescendant(cxxNullPtrLiteralExpr()),
----------------
Note that I'm using `hasDescendant` here, because sometimes the literal ends up inside of an `ImplicitCastExpr` node and sometimes its a direct child of the `NonTypeTemplateParmDecl` node. I'm not sure exactly what causes the difference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103385



More information about the cfe-commits mailing list