summaryrefslogtreecommitdiffstats
path: root/clang-tidy/google/IntegerTypesCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/google/IntegerTypesCheck.cpp')
-rw-r--r--clang-tidy/google/IntegerTypesCheck.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang-tidy/google/IntegerTypesCheck.cpp b/clang-tidy/google/IntegerTypesCheck.cpp
index 07ee081a..fb6fd3be 100644
--- a/clang-tidy/google/IntegerTypesCheck.cpp
+++ b/clang-tidy/google/IntegerTypesCheck.cpp
@@ -1,9 +1,8 @@
//===--- IntegerTypesCheck.cpp - clang-tidy -------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -55,7 +54,9 @@ void IntegerTypesCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
void IntegerTypesCheck::registerMatchers(MatchFinder *Finder) {
// Find all TypeLocs. The relevant Style Guide rule only applies to C++.
- if (!getLangOpts().CPlusPlus)
+ // This check is also not applied in Objective-C++ sources as Objective-C
+ // often uses built-in integer types other than `int`.
+ if (!getLangOpts().CPlusPlus || getLangOpts().ObjC)
return;
// Match any integer types, unless they are passed to a printf-based API:
//