Skip to content

Commit ca07344

Browse files
author
Erich Keane
authored
Merge branch 'sycl' into mark_device_rewrite
2 parents bda527d + d822eda commit ca07344

File tree

2,767 files changed

+169259
-55149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,767 files changed

+169259
-55149
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ void BracesAroundStatementsCheck::storeOptions(
105105
}
106106

107107
void BracesAroundStatementsCheck::registerMatchers(MatchFinder *Finder) {
108-
Finder->addMatcher(
109-
ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())))
110-
.bind("if"),
111-
this);
108+
Finder->addMatcher(ifStmt().bind("if"), this);
112109
Finder->addMatcher(whileStmt().bind("while"), this);
113110
Finder->addMatcher(doStmt().bind("do"), this);
114111
Finder->addMatcher(forStmt().bind("for"), this);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class BracesAroundStatementsCheck : public ClangTidyCheck {
5555
template <typename IfOrWhileStmt>
5656
SourceLocation findRParenLoc(const IfOrWhileStmt *S, const SourceManager &SM,
5757
const ASTContext *Context);
58+
llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
59+
return TK_IgnoreUnlessSpelledInSource;
60+
}
5861

5962
private:
6063
std::set<const Stmt *> ForceBracesStmts;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ void ElseAfterReturnCheck::registerPPCallbacks(const SourceManager &SM,
171171
void ElseAfterReturnCheck::registerMatchers(MatchFinder *Finder) {
172172
const auto InterruptsControlFlow = stmt(anyOf(
173173
returnStmt().bind(InterruptingStr), continueStmt().bind(InterruptingStr),
174-
breakStmt().bind(InterruptingStr),
175-
expr(ignoringImplicit(cxxThrowExpr().bind(InterruptingStr)))));
174+
breakStmt().bind(InterruptingStr), cxxThrowExpr().bind(InterruptingStr)));
176175
Finder->addMatcher(
177176
compoundStmt(
178177
forEach(ifStmt(unless(isConstexpr()),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class ElseAfterReturnCheck : public ClangTidyCheck {
2828
Preprocessor *ModuleExpanderPP) override;
2929
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
3030
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
31+
llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
32+
return TK_IgnoreUnlessSpelledInSource;
33+
}
3134

3235
using ConditionalBranchMap =
3336
llvm::DenseMap<FileID, SmallVector<SourceRange, 1>>;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,7 @@ void InconsistentDeclarationParameterNameCheck::storeOptions(
294294

295295
void InconsistentDeclarationParameterNameCheck::registerMatchers(
296296
MatchFinder *Finder) {
297-
Finder->addMatcher(functionDecl(unless(isImplicit()), hasOtherDeclarations())
298-
.bind("functionDecl"),
297+
Finder->addMatcher(functionDecl(hasOtherDeclarations()).bind("functionDecl"),
299298
this);
300299
}
301300

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class InconsistentDeclarationParameterNameCheck : public ClangTidyCheck {
3333
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
3434
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
3535
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
36+
llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
37+
return TK_IgnoreUnlessSpelledInSource;
38+
}
3639

3740
private:
3841
void markRedeclarationsAsVisited(const FunctionDecl *FunctionDeclaration);

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,7 @@ void MisleadingIndentationCheck::missingBracesCheck(const SourceManager &SM,
106106
}
107107

108108
void MisleadingIndentationCheck::registerMatchers(MatchFinder *Finder) {
109-
Finder->addMatcher(
110-
ifStmt(allOf(hasElse(stmt()),
111-
unless(allOf(isConstexpr(), isInTemplateInstantiation()))))
112-
.bind("if"),
113-
this);
109+
Finder->addMatcher(ifStmt(hasElse(stmt())).bind("if"), this);
114110
Finder->addMatcher(
115111
compoundStmt(has(stmt(anyOf(ifStmt(), forStmt(), whileStmt()))))
116112
.bind("compound"),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class MisleadingIndentationCheck : public ClangTidyCheck {
2727
: ClangTidyCheck(Name, Context) {}
2828
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
2929
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
30+
llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
31+
return TK_IgnoreUnlessSpelledInSource;
32+
}
3033

3134
private:
3235
void danglingElseCheck(const SourceManager &SM, ASTContext *Context,

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@ namespace tidy {
1818
namespace readability {
1919

2020
void NamedParameterCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
21-
Finder->addMatcher(functionDecl(unless(isInstantiated())).bind("decl"), this);
21+
Finder->addMatcher(functionDecl().bind("decl"), this);
2222
}
2323

2424
void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) {
2525
const SourceManager &SM = *Result.SourceManager;
2626
const auto *Function = Result.Nodes.getNodeAs<FunctionDecl>("decl");
2727
SmallVector<std::pair<const FunctionDecl *, unsigned>, 4> UnnamedParams;
2828

29-
// Ignore implicitly generated members.
30-
if (Function->isImplicit())
31-
return;
32-
3329
// Ignore declarations without a definition if we're not dealing with an
3430
// overriden method.
3531
const FunctionDecl *Definition = nullptr;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class NamedParameterCheck : public ClangTidyCheck {
3232
: ClangTidyCheck(Name, Context) {}
3333
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
3434
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
35+
llvm::Optional<TraversalKind> getCheckTraversalKind() const override {
36+
return TK_IgnoreUnlessSpelledInSource;
37+
}
3538
};
3639

3740
} // namespace readability

0 commit comments

Comments
 (0)