[PATCH] D120220: [clang-format][NFC] Fix typos and inconsistencies
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 20 17:21:19 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaacc110bdce7: [clang-format][NFC] Fix typos and inconsistencies (authored by kuzkry, committed by owenpan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120220/new/
https://reviews.llvm.org/D120220
Files:
clang/lib/Format/Format.cpp
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -990,11 +990,11 @@
case ParseError::InvalidQualifierSpecified:
return "Invalid qualifier specified in QualifierOrder";
case ParseError::DuplicateQualifierSpecified:
- return "Duplicate qualifier specified in QualfierOrder";
+ return "Duplicate qualifier specified in QualifierOrder";
case ParseError::MissingQualifierType:
- return "Missing type in QualfierOrder";
+ return "Missing type in QualifierOrder";
case ParseError::MissingQualifierOrder:
- return "Missing QualfierOrder";
+ return "Missing QualifierOrder";
}
llvm_unreachable("unexpected parse error");
}
@@ -1650,7 +1650,8 @@
if (token == tok::identifier)
return ParseError::InvalidQualifierSpecified;
}
- // Ensure the list is unqiue (no duplicates).
+
+ // Ensure the list is unique (no duplicates).
std::set<std::string> UniqueQualifiers(Style->QualifierOrder.begin(),
Style->QualifierOrder.end());
if (Style->QualifierOrder.size() != UniqueQualifiers.size()) {
@@ -1660,10 +1661,12 @@
return ParseError::DuplicateQualifierSpecified;
}
+ // Ensure the list has 'type' in it
auto type = std::find(Style->QualifierOrder.begin(),
Style->QualifierOrder.end(), "type");
if (type == Style->QualifierOrder.end())
return ParseError::MissingQualifierType;
+
return ParseError::Success;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120220.410194.patch
Type: text/x-patch
Size: 1573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220221/f970407c/attachment.bin>
More information about the cfe-commits
mailing list