Skip to content

Commit 863331f

Browse files
committed
fix reviwe
1 parent ad8fc03 commit 863331f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//===----------------------------------------------------------------------===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//===----------------------------------------------------------------------===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -11,6 +10,7 @@
1110
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTPARENTHESESCHECK_H
1211

1312
#include "../ClangTidyCheck.h"
13+
#include "clang/Basic/LangOptions.h"
1414

1515
namespace clang::tidy::readability {
1616

@@ -24,6 +24,9 @@ class RedundantParenthesesCheck : public ClangTidyCheck {
2424
: ClangTidyCheck(Name, Context) {}
2525
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
2626
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
27+
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
28+
return LangOpts.CPlusPlus | LangOpts.C99;
29+
}
2730
};
2831

2932
} // namespace clang::tidy::readability

0 commit comments

Comments
 (0)