/// 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;
#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(); \
} \
\
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 *>() \