[clang-tools-extra] a56fa16 - [clang-tidy] Fix failing test after #80864 (#81171)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 8 10:59:50 PST 2024
Author: Krystian Stasiowski
Date: 2024-02-08T13:59:47-05:00
New Revision: a56fa161ab2617fa3aab3f91285fc757b6a8e09b
URL: https://github.com/llvm/llvm-project/commit/a56fa161ab2617fa3aab3f91285fc757b6a8e09b
DIFF: https://github.com/llvm/llvm-project/commit/a56fa161ab2617fa3aab3f91285fc757b6a8e09b.diff
LOG: [clang-tidy] Fix failing test after #80864 (#81171)
The following test case in
`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp` is
failing:
```
#ifdef PR64602 // Should not crash
template <class T = void>
struct S
{
auto foo(auto);
};
template <>
auto S<>::foo(auto)
{
return 1;
}
// CHECK8: error: template parameter list matching the non-templated nested type 'S<>' should be empty ('template<>') [clang-diagnostic-error]
#endif
```
#80864 fixes a bug where we would (incorrectly) append invented template
parameters to empty template parameter lists, which causes this test to
fail.
Added:
Modified:
clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp
index 547f634a101c5..d0efc5ca76375 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp
@@ -68,5 +68,6 @@ auto S<>::foo(auto)
{
return 1;
}
-// CHECK8: error: template parameter list matching the non-templated nested type 'S<>' should be empty ('template<>') [clang-diagnostic-error]
+// CHECK8: error: conflicting types for 'foo' [clang-diagnostic-error]
+// CHECK8: note: previous declaration is here
#endif
More information about the cfe-commits
mailing list