summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2018-01-01 15:42:13 +0000
committerFaisal Vali <faisalv@yahoo.com>2018-01-01 15:42:13 +0000
commit038df490334d63f6533fa1fdf0b310f59e2d730b (patch)
tree7566cd5f09b5b4047759cbac8a8d912035873d67 /clang/lib/Serialization
parent208ac6547c4f98c75e76a79f13a8d4f9d1076ab2 (diff)
downloadbcm5719-llvm-038df490334d63f6533fa1fdf0b310f59e2d730b.tar.gz
bcm5719-llvm-038df490334d63f6533fa1fdf0b310f59e2d730b.zip
[NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types.
- Since these enums are used as bit-fields - for the bit-fields to be interpreted as unsigned, the underlying type must be specified as unsigned. Previous failed attempt - wherein I did not specify an underlying type - was the sum of: https://reviews.llvm.org/rC321614 https://reviews.llvm.org/rC321615 llvm-svn: 321622
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 1e72ced2ee3..34f7aaeb115 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -590,9 +590,9 @@ void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) {
void TypeLocWriter::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) {
Record.AddSourceLocation(TL.getBuiltinLoc());
if (TL.needsExtraLocalData()) {
- Record.push_back(TL.getWrittenTypeSpec());
- Record.push_back(TL.getWrittenSignSpec());
- Record.push_back(TL.getWrittenWidthSpec());
+ Record.push_back(static_cast<unsigned>(TL.getWrittenTypeSpec()));
+ Record.push_back(static_cast<unsigned>(TL.getWrittenSignSpec()));
+ Record.push_back(static_cast<unsigned>(TL.getWrittenWidthSpec()));
Record.push_back(TL.hasModeAttr());
}
}
OpenPOWER on IntegriCloud