summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 896ecad60f5..a7e0799c119 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1684,7 +1684,7 @@ struct IncludeDirective {
StringRef Filename;
StringRef Text;
unsigned Offset;
- unsigned Category;
+ int Category;
};
} // end anonymous namespace
@@ -1807,11 +1807,11 @@ tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code,
if (!FormattingOff && !Line.endswith("\\")) {
if (IncludeRegex.match(Line, &Matches)) {
StringRef IncludeName = Matches[2];
- unsigned Category;
+ int Category;
if (LookForMainHeader && !IncludeName.startswith("<")) {
Category = 0;
} else {
- Category = UINT_MAX;
+ Category = INT_MAX;
for (unsigned i = 0, e = CategoryRegexs.size(); i != e; ++i) {
if (CategoryRegexs[i].match(IncludeName)) {
Category = Style.IncludeCategories[i].Priority;
OpenPOWER on IntegriCloud