Skip to content

Commit

Permalink
Clang importer: C's bool is an integer type for the purposes of mappi…
Browse files Browse the repository at this point in the history
…ng nonzero error results.
  • Loading branch information
DougGregor committed Dec 4, 2015
1 parent 8fbb5e1 commit c934bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ static bool isBoolType(ClangImporter::Implementation &importer,

static bool isIntegerType(clang::QualType clangType) {
if (auto builtinTy = clangType->getAs<clang::BuiltinType>()) {
return (builtinTy->getKind() >= clang::BuiltinType::Char_U &&
return (builtinTy->getKind() >= clang::BuiltinType::Bool &&
builtinTy->getKind() <= clang::BuiltinType::UInt128) ||
(builtinTy->getKind() >= clang::BuiltinType::SChar &&
builtinTy->getKind() <= clang::BuiltinType::Int128);
Expand Down

0 comments on commit c934bef

Please sign in to comment.