Author: Kazu Hirata Date: 2022-10-15T21:07:02-07:00 New Revision: 765af675bce580cd6473ce7bfb9255f22db14414
URL: https://github.com/llvm/llvm-project/commit/765af675bce580cd6473ce7bfb9255f22db14414 DIFF: https://github.com/llvm/llvm-project/commit/765af675bce580cd6473ce7bfb9255f22db14414.diff LOG: [clang] Remove redundaunt typename (NFC) Added: Modified: clang/include/clang/Sema/ParsedAttr.h clang/lib/ASTMatchers/ASTMatchFinder.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Sema/ParsedAttr.h b/clang/include/clang/Sema/ParsedAttr.h index 1f5237dc4a4d2..8ed89d3f10592 100644 --- a/clang/include/clang/Sema/ParsedAttr.h +++ b/clang/include/clang/Sema/ParsedAttr.h @@ -1173,21 +1173,21 @@ inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, /// it explicit is hard. This constructor causes ambiguity with /// DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, SourceRange R). /// We use SFINAE to disable any conversion and remove any ambiguity. -template <typename ACI, - typename std::enable_if_t< - std::is_same<ACI, AttributeCommonInfo>::value, int> = 0> +template < + typename ACI, + std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value, int> = 0> inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, - const ACI &CI) { + const ACI &CI) { DB.AddTaggedVal(reinterpret_cast<uint64_t>(CI.getAttrName()), DiagnosticsEngine::ak_identifierinfo); return DB; } -template <typename ACI, - typename std::enable_if_t< - std::is_same<ACI, AttributeCommonInfo>::value, int> = 0> +template < + typename ACI, + std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value, int> = 0> inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, - const ACI* CI) { + const ACI *CI) { DB.AddTaggedVal(reinterpret_cast<uint64_t>(CI->getAttrName()), DiagnosticsEngine::ak_identifierinfo); return DB; diff --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp index ac8e4eccad8eb..45eabfeb37319 100644 --- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp +++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp @@ -779,7 +779,7 @@ class MatchASTVisitor : public RecursiveASTVisitor<MatchASTVisitor>, #define IMPL(Index) \ template <typename NodeType> \ - typename std::enable_if_t< \ + std::enable_if_t< \ llvm::is_one_of<const NodeType *, CMD_TYPES_##Index>::value> \ SetCallbackAndRawNode(const MatchCallback *CB, const NodeType &N) { \ assertEmpty(); \ @@ -788,8 +788,8 @@ class MatchASTVisitor : public RecursiveASTVisitor<MatchASTVisitor>, } \ \ template <typename T> \ - typename std::enable_if_t< \ - llvm::is_one_of<const T *, CMD_TYPES_##Index>::value, const T *> \ + std::enable_if_t<llvm::is_one_of<const T *, CMD_TYPES_##Index>::value, \ + const T *> \ getNode() const { \ assertHoldsState(); \ return Callback.getInt() == (Index) ? Node##Index.dyn_cast<const T *>() \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits