[PATCH] D55541: Use the standard Duration factory matcher
Jonas Toth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 11 04:48:58 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL348842: Use the standard Duration factory matcher (authored by JonasToth, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D55541?vs=177646&id=177685#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55541/new/
https://reviews.llvm.org/D55541
Files:
clang-tools-extra/trunk/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
Index: clang-tools-extra/trunk/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "UpgradeDurationConversionsCheck.h"
+#include "DurationRewriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
@@ -102,10 +103,7 @@
anyOf(hasCastKind(CK_UserDefinedConversion),
has(implicitCastExpr(hasCastKind(CK_UserDefinedConversion)))),
hasParent(callExpr(
- callee(functionDecl(
- hasAnyName("::absl::Nanoseconds", "::absl::Microseconds",
- "::absl::Milliseconds", "::absl::Seconds",
- "::absl::Minutes", "::absl::Hours"),
+ callee(functionDecl(DurationFactoryFunction(),
unless(hasParent(functionTemplateDecl())))),
hasArgument(0, expr().bind("arg"))))),
this);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55541.177685.patch
Type: text/x-patch
Size: 1213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181211/b0464dbb/attachment.bin>
More information about the llvm-commits
mailing list