================
@@ -308,6 +322,20 @@ void TypeTraitsCheck::check(const MatchFinder::MatchResult 
&Result) {
                       DNTL->getElaboratedKeywordLoc());
     return;
   }
+
+  if (const auto *TSTL = Result.Nodes.getNodeAs<TemplateSpecializationTypeLoc>(
+          "remove_cvref")) {
+    auto Diag = diag(TSTL->getBeginLoc(), "use c++20 type alias");
----------------
zeyi2 wrote:

IMO we might better check `IgnoreMacros` here.

```cpp
#define CVREF(T) std::remove_cv_t<std::remove_reference_t<T>>
using X = CVREF(int);
```

With `IgnoreMacros: true`, the new `remove_cvref` matcher currently still 
diagnoses this case.

Could you add a macro location guard to it?

https://github.com/llvm/llvm-project/pull/204789
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to