[PATCH] D141358: Remove unnecessary template specifiers from truct constructors in tests.
Jens Massberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 00:27:47 PST 2023
massberg created this revision.
massberg added a reviewer: ilya-biryukov.
Herald added a project: All.
massberg requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
As far as I can see they are unnecessary and in C++20 they lead to errors.
Removing them the tests pass with C++20 and the default version.
Example error message:
llvm-project/llvm/unittests/IR/PassBuilderCallbacksTest.cpp:275:30: error: expected unqualified-id before ‘)’ token
275 | MockAnalysisHandle<Module>() { setDefaults(); }
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141358
Files:
llvm/unittests/IR/PassBuilderCallbacksTest.cpp
Index: llvm/unittests/IR/PassBuilderCallbacksTest.cpp
===================================================================
--- llvm/unittests/IR/PassBuilderCallbacksTest.cpp
+++ llvm/unittests/IR/PassBuilderCallbacksTest.cpp
@@ -236,7 +236,7 @@
MOCK_METHOD3_T(invalidate, bool(Loop &, const PreservedAnalyses &,
LoopAnalysisManager::Invalidator &));
- MockAnalysisHandle<Loop>() { this->setDefaults(); }
+ MockAnalysisHandle() { this->setDefaults(); }
};
template <>
@@ -247,7 +247,7 @@
MOCK_METHOD3(invalidate, bool(Function &, const PreservedAnalyses &,
FunctionAnalysisManager::Invalidator &));
- MockAnalysisHandle<Function>() { setDefaults(); }
+ MockAnalysisHandle() { setDefaults(); }
};
template <>
@@ -261,7 +261,7 @@
MOCK_METHOD3(invalidate, bool(LazyCallGraph::SCC &, const PreservedAnalyses &,
CGSCCAnalysisManager::Invalidator &));
- MockAnalysisHandle<LazyCallGraph::SCC>() { setDefaults(); }
+ MockAnalysisHandle() { setDefaults(); }
};
template <>
@@ -272,7 +272,7 @@
MOCK_METHOD3(invalidate, bool(Module &, const PreservedAnalyses &,
ModuleAnalysisManager::Invalidator &));
- MockAnalysisHandle<Module>() { setDefaults(); }
+ MockAnalysisHandle() { setDefaults(); }
};
static std::unique_ptr<Module> parseIR(LLVMContext &C, const char *IR) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141358.487710.patch
Type: text/x-patch
Size: 1436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230110/f859b163/attachment.bin>
More information about the llvm-commits
mailing list