[clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers
We forgot to apply the change to headers in the previous patch, due to missing "-header-filter" in the run-clang-tidy invocation. Differential Revision: https://reviews.llvm.org/D142307
This commit is contained in:
parent
136f77805f
commit
4718da5060
@ -12,8 +12,7 @@
|
||||
#include "clang-tidy-config.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
// This anchor is used to force the linker to link the AbseilModule.
|
||||
extern volatile int AbseilModuleAnchorSource;
|
||||
@ -138,7 +137,6 @@ extern volatile int ZirconModuleAnchorSource;
|
||||
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
|
||||
ZirconModuleAnchorSource;
|
||||
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
class ClangTidyCheck;
|
||||
class ClangTidyContext;
|
||||
@ -94,7 +93,6 @@ public:
|
||||
virtual ClangTidyOptions getModuleOptions();
|
||||
};
|
||||
|
||||
} // end namespace tidy
|
||||
} // end namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
|
||||
|
@ -12,12 +12,10 @@
|
||||
#include "ClangTidyModule.h"
|
||||
#include "llvm/Support/Registry.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
typedef llvm::Registry<ClangTidyModule> ClangTidyModuleRegistry;
|
||||
|
||||
} // end namespace tidy
|
||||
} // end namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULEREGISTRY_H
|
||||
|
@ -22,8 +22,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
/// Contains a list of line ranges in a single file.
|
||||
struct FileFilter {
|
||||
@ -328,7 +327,6 @@ parseConfigurationWithDiags(llvm::MemoryBufferRef Config, DiagCallback Handler);
|
||||
/// Serializes configuration to a YAML-encoded string.
|
||||
std::string configurationAsText(const ClangTidyOptions &Options);
|
||||
|
||||
} // end namespace tidy
|
||||
} // end namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYOPTIONS_H
|
||||
|
@ -19,8 +19,7 @@ namespace llvm {
|
||||
class raw_ostream;
|
||||
} // namespace llvm
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
class ClangTidyProfiling {
|
||||
public:
|
||||
@ -54,7 +53,6 @@ public:
|
||||
~ClangTidyProfiling();
|
||||
};
|
||||
|
||||
} // end namespace tidy
|
||||
} // end namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYPROFILING_H
|
||||
|
@ -13,12 +13,10 @@
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
|
||||
namespace llvm {
|
||||
namespace vfs {
|
||||
namespace llvm::vfs {
|
||||
class OverlayFileSystem;
|
||||
class InMemoryFileSystem;
|
||||
} // namespace vfs
|
||||
} // namespace llvm
|
||||
} // namespace llvm::vfs
|
||||
|
||||
namespace clang {
|
||||
class CompilerInstance;
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/Regex.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
/// Read-only set of strings represented as a list of positive and negative
|
||||
/// globs.
|
||||
@ -62,7 +61,6 @@ private:
|
||||
mutable llvm::StringMap<bool> Cache;
|
||||
};
|
||||
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GLOBLIST_H
|
||||
|
@ -13,18 +13,15 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <memory>
|
||||
|
||||
namespace clang {
|
||||
namespace tooling {
|
||||
namespace clang::tooling {
|
||||
struct Diagnostic;
|
||||
} // namespace tooling
|
||||
} // namespace clang
|
||||
} // namespace clang::tooling
|
||||
|
||||
namespace llvm {
|
||||
template <typename T> class SmallVectorImpl;
|
||||
} // namespace llvm
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace clang::tidy {
|
||||
|
||||
/// This class is used to locate NOLINT comments in the file being analyzed, to
|
||||
/// decide whether a diagnostic should be suppressed.
|
||||
@ -45,7 +42,6 @@ private:
|
||||
std::unique_ptr<Impl> PImpl;
|
||||
};
|
||||
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_NOLINTDIRECTIVEHANDLER_H
|
||||
|
@ -10,8 +10,7 @@
|
||||
#include "clang/ASTMatchers/ASTMatchFinder.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace clang {
|
||||
namespace ast_matchers {
|
||||
namespace clang::ast_matchers {
|
||||
|
||||
/// Matches AST nodes that were found within Abseil files.
|
||||
///
|
||||
@ -57,5 +56,4 @@ AST_POLYMORPHIC_MATCHER(
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace ast_matchers
|
||||
} // namespace clang
|
||||
} // namespace clang::ast_matchers
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../utils/TransformerClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Suggests switching the initialization pattern of `absl::Cleanup`
|
||||
/// instances from the factory function to class template argument
|
||||
@ -30,8 +28,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_CLEANUPCTADCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Checks for cases where addition should be performed in the
|
||||
/// ``absl::Time`` domain.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEADDITIONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Prefer comparison in the absl::Duration domain instead of the numeric
|
||||
/// domain.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCOMPARISONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Checks for casts of ``absl::Duration`` conversion functions, and recommends
|
||||
/// the right conversion function instead.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCONVERSIONCASTCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
// Find potential incorrect uses of integer division of absl::Duration objects.
|
||||
//
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONDIVISIONCHECK_H_
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// This check finds cases where `Duration` factories are being called with
|
||||
/// floating point arguments, but could be called using integer arguments.
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYFLOATCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// This check finds cases where the incorrect `Duration` factory function is
|
||||
/// being used by looking for scaling constants inside the factory argument
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYSCALECHECK_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include <cinttypes>
|
||||
#include <optional>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Duration factory and conversion scales
|
||||
enum class DurationScale : std::uint8_t {
|
||||
@ -135,8 +133,6 @@ AST_MATCHER_FUNCTION_P(ast_matchers::internal::Matcher<Stmt>,
|
||||
hasEitherOperand(ignoringImpCasts(callExpr(callee(funcDecl)))));
|
||||
}
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONREWRITER_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Checks for cases where subtraction should be performed in the
|
||||
/// `absl::Duration` domain.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONSUBTRACTIONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds and fixes cases where ``absl::Duration`` values are being converted
|
||||
/// to numeric types and back again.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds instances of absl::StrSplit() or absl::MaxSplits() where the delimiter
|
||||
/// is a single character string literal and replaces it with a character.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_FASTERSTRSPLITDELIMITERCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds instances where the user depends on internal details and warns them
|
||||
/// against doing so.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NOINTERNALDEPSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// This check ensures users don't open namespace absl, as that violates
|
||||
/// Abseil's compatibility guidelines.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NONAMESPACECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Flags redundant calls to absl::StrCat when the result is being passed to
|
||||
/// another call of absl::StrCat/absl::StrAppend. Also suggests a fix to
|
||||
@ -34,8 +32,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_REDUNDANTSTRCATCALLSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Flags uses of absl::StrCat to append to a string. Suggests absl::StrAppend
|
||||
/// should be used instead.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRCATAPPENDCHECK_H
|
||||
|
@ -17,9 +17,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
// Find string.find(...) == 0 comparisons and suggest replacing with StartsWith.
|
||||
// FIXME(niko): Add similar check for EndsWith
|
||||
@ -40,8 +38,6 @@ private:
|
||||
const StringRef AbseilStringsMatchHeader;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTARTSWITHCHECK_H
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include "../ClangTidyCheck.h"
|
||||
#include "../utils/TransformerClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds s.find(...) == string::npos comparisons (for various string-like
|
||||
/// types) and suggests replacing with absl::StrContains.
|
||||
@ -32,8 +30,6 @@ private:
|
||||
const StringRef AbseilStringsMatchHeaderOption;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTRCONTAINSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Prefer comparison in the `absl::Time` domain instead of the numeric
|
||||
/// domain.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMECOMPARECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds and fixes `absl::Time` subtraction expressions to do subtraction
|
||||
/// in the time domain instead of the numeric domain.
|
||||
@ -31,8 +29,6 @@ private:
|
||||
void emitDiagnostic(const Expr* Node, llvm::StringRef Replacement);
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include "clang/Basic/SourceLocation.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace abseil {
|
||||
namespace clang::tidy::abseil {
|
||||
|
||||
/// Finds deprecated uses of `absl::Duration` arithmetic operators and factories.
|
||||
///
|
||||
@ -36,8 +34,6 @@ private:
|
||||
llvm::DenseSet<SourceLocation> MatchedTemplateLocations;
|
||||
};
|
||||
|
||||
} // namespace abseil
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::abseil
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_UPGRADEDURATIONCONVERSIONSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace altera {
|
||||
namespace clang::tidy::altera {
|
||||
|
||||
/// Finds ID-dependent variables and fields used within loops, and warns of
|
||||
/// their usage. Using these variables in loops can lead to performance
|
||||
@ -76,8 +74,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace altera
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::altera
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_IDDEPENDENTBACKWARDBRANCHCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace altera {
|
||||
namespace clang::tidy::altera {
|
||||
|
||||
/// Finds kernel files and include directives whose filename is `kernel.cl`,
|
||||
/// `Verilog.cl`, or `VHDL.cl`.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
Preprocessor *) override;
|
||||
};
|
||||
|
||||
} // namespace altera
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::altera
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_KERNEL_NAME_RESTRICTION_CHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace altera {
|
||||
namespace clang::tidy::altera {
|
||||
|
||||
/// Detects OpenCL kernel functions that call a barrier but do not call an
|
||||
/// ID-function function. These functions will be treated as single work-item
|
||||
@ -33,8 +31,6 @@ public:
|
||||
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
|
||||
};
|
||||
|
||||
} // namespace altera
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::altera
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_SINGLE_WORK_ITEM_BARRIER_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace altera {
|
||||
namespace clang::tidy::altera {
|
||||
|
||||
/// Finds structs that are inefficiently packed or aligned, and recommends
|
||||
/// packing and/or aligning of said structs as needed.
|
||||
@ -34,8 +32,6 @@ private:
|
||||
CharUnits computeRecommendedAlignment(CharUnits MinByteSize);
|
||||
};
|
||||
|
||||
} // namespace altera
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::altera
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_STRUCTPACKALIGNCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace altera {
|
||||
namespace clang::tidy::altera {
|
||||
|
||||
/// Finds inner loops that have not been unrolled, as well as fully unrolled
|
||||
/// loops with unknown loop bounds or a large number of iterations.
|
||||
@ -71,8 +69,6 @@ private:
|
||||
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
|
||||
};
|
||||
|
||||
} // namespace altera
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::altera
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_UNROLLLOOPSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses accept4() without using the SOCK_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT4_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// accept() is better to be replaced by accept4().
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT_H
|
||||
|
@ -17,9 +17,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// The base class for all close-on-exec checks in Android module.
|
||||
/// To be specific, there are some functions that need the close-on-exec flag to
|
||||
@ -97,8 +95,6 @@ protected:
|
||||
static const char *FuncBindingStr;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// creat() is better to be replaced by open().
|
||||
/// Find the usage of creat() and redirect user to use open().
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_CREAT_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// dup() is better to be replaced by fcntl(), which has close-on-exec flag.
|
||||
/// Find the usage of dup() and redirect user to use fcntl().
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_DUP_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses epoll_create1() without using the EPOLL_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_EPOLL_CREATE1_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// epoll_create() is better to be replaced by epoll_create1().
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_EPOLL_CREATE_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// fopen() is suggested to include "e" in their mode string; like "re" would be
|
||||
/// better than "r".
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_FOPEN_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses inotify_init1() without using the IN_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT1_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// inotify_init() is better to be replaced by inotify_init1().
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses memfd_create() without using the MFD_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_MEMFD_CREATE_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that opens file without using the O_CLOEXEC flag.
|
||||
///
|
||||
@ -32,8 +30,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_OPEN_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses pipe2() without using the O_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE2_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Suggests to replace calls to pipe() with calls to pipe2().
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "CloexecCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Finds code that uses socket() without using the SOCK_CLOEXEC flag.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_SOCKET_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <string>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace android {
|
||||
namespace clang::tidy::android {
|
||||
|
||||
/// Attempts to catch calls to TEMP_FAILURE_RETRY with a top-level comparison
|
||||
/// operation, like `TEMP_FAILURE_RETRY(read(...) != N)`. In these cases, the
|
||||
@ -35,8 +33,6 @@ private:
|
||||
SmallVector<StringRef, 5> RetryMacros;
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::android
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_COMPARISONINTEMPFAILURERETRYCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace boost {
|
||||
namespace clang::tidy::boost {
|
||||
|
||||
/// Finds calls to ``boost::lexical_cast<std::string>`` and
|
||||
/// ``boost::lexical_cast<std::wstring>`` and replaces them with
|
||||
@ -32,8 +30,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::boost
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USE_TO_STRING_H
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include "../ClangTidyCheck.h"
|
||||
#include "llvm/Support/Regex.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks that argument comments match parameter names.
|
||||
///
|
||||
@ -58,8 +56,6 @@ private:
|
||||
bool shouldAddComment(const Expr *Arg) const;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ARGUMENTCOMMENTCHECK_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <string>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds `assert()` with side effect.
|
||||
///
|
||||
@ -45,8 +43,6 @@ private:
|
||||
const std::vector<StringRef> IgnoredFunctions;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ASSERTSIDEEFFECTCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Catches assignments within the condition clause of an if statement.
|
||||
///
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void report(const Expr *AssignmentExpr);
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ASSIGNMENTINIFCONDITIONCHECK_H
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include "../ClangTidyCheck.h"
|
||||
#include <optional>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds ``pthread_kill`` function calls when thread is terminated by
|
||||
/// ``SIGTERM`` signal.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
std::optional<unsigned> SigtermValue;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BADSIGNALTOKILLTHREADCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for conditions based on implicit conversion from a bool pointer to
|
||||
/// bool.
|
||||
@ -34,8 +32,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BOOLPOINTERIMPLICITCONVERSIONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// A check for detecting if/else if/else chains where two or more branches are
|
||||
/// Type I clones of each other (that is, they contain identical code), for
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BRANCHCLONECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds copy constructors where the ctor don't call the copy constructor of
|
||||
/// the base class.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_COPY_CONSTRUCTOR_INIT_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Detect dangling references in value handlers like
|
||||
/// std::experimental::string_view.
|
||||
@ -35,8 +33,6 @@ private:
|
||||
const ast_matchers::internal::Matcher<RecordDecl> IsAHandle;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_DANGLING_HANDLE_H
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include "../ClangTidyCheck.h"
|
||||
#include "../utils/FileExtensionsUtils.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds dynamically initialized static variables in header files.
|
||||
///
|
||||
@ -40,8 +38,6 @@ private:
|
||||
utils::FileExtensionsSet HeaderFileExtensions;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_DYNAMIC_STATIC_INITIALIZERS_CHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds function definitions where parameters of convertible types follow
|
||||
/// each other directly, making call sites prone to calling the function with
|
||||
@ -59,8 +57,6 @@ public:
|
||||
const std::size_t NamePrefixSuffixSilenceDissimilarityTreshold;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_EASILYSWAPPABLEPARAMETERSCHECK_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
#include "../utils/ExceptionAnalyzer.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds functions which should not throw exceptions: Destructors, move
|
||||
/// constructors, move assignment operators, the main() function,
|
||||
@ -42,8 +40,6 @@ private:
|
||||
utils::ExceptionAnalyzer Tracer;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_EXCEPTION_ESCAPE_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find and flag invalid initializer values in folds, e.g. std::accumulate.
|
||||
/// Example:
|
||||
@ -36,8 +34,6 @@ private:
|
||||
const ASTContext &Context, const CallExpr &CallNode);
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FOLD_INIT_TYPE_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks if an unused forward declaration is in a wrong namespace.
|
||||
///
|
||||
@ -51,8 +49,6 @@ private:
|
||||
llvm::SmallPtrSet<const Type *, 16> FriendTypes;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FORWARDDECLARATIONNAMESPACECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// The checker looks for constructors that can act as copy or move constructors
|
||||
/// through their forwarding reference parameters. If a non const lvalue
|
||||
@ -37,8 +35,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FORWARDINGREFERENCEOVERLOADCHECK_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
#include "../utils/IncludeInserter.h"
|
||||
#include <optional>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Diagnoses instances of an implicit widening of multiplication result.
|
||||
///
|
||||
@ -46,8 +44,6 @@ private:
|
||||
utils::IncludeInserter IncludeInserter;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_IMPLICITWIDENINGOFMULTIPLICATIONRESULTCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for inaccurate use of the `erase()` method.
|
||||
///
|
||||
@ -36,8 +34,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INACCURATEERASECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks the usage of patterns known to produce incorrect rounding.
|
||||
/// Programmers often use
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INCORRECTROUNDINGSCHECK_H_
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds obvious infinite loops (loops where the condition variable is
|
||||
/// not changed at all).
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INFINITELOOPCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds cases where integer division in a floating point context is likely to
|
||||
/// cause unintended loss of precision.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INTEGER_DIVISION_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Detect when __func__ or __FUNCTION__ is being used from within a lambda. In
|
||||
/// that context, those expressions expand to the name of the call operator
|
||||
@ -44,8 +42,6 @@ private:
|
||||
SourceRangeSet SuppressMacroExpansions;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_LAMBDAFUNCTIONNAMECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds macros that can have unexpected behaviour due to missing parentheses.
|
||||
///
|
||||
@ -36,8 +34,6 @@ public:
|
||||
Preprocessor *ModuleExpanderPP) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MACROPARENTHESESCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for repeated argument with side effects in macros.
|
||||
class MacroRepeatedSideEffectsCheck : public ClangTidyCheck {
|
||||
@ -24,8 +22,6 @@ public:
|
||||
Preprocessor *ModuleExpanderPP) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MACROREPEATEDSIDEEFFECTSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds cases where ``1`` is added to the string in the argument to a function
|
||||
/// in the ``strlen()`` family instead of the result and value is used as an
|
||||
@ -29,8 +27,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MISPLACED_OPERATOR_IN_STRLEN_IN_ALLOC_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds cases where an integer is added to or subracted from the result of a
|
||||
/// memory allocation function instead of its argument.
|
||||
@ -29,8 +27,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MISPLACED_OPERATOR_IN_ALLOC_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find casts of calculation results to bigger type. Typically from int to
|
||||
/// long. If the intention of the cast is to avoid loss of precision then
|
||||
@ -38,8 +36,6 @@ private:
|
||||
const bool CheckImplicitCasts;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// The check warns if std::move is applied to a forwarding reference (i.e. an
|
||||
/// rvalue reference of a function template argument type).
|
||||
@ -44,8 +42,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MOVEFORWARDINGREFERENCECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Detect multiple statement macros that are used in unbraced conditionals.
|
||||
/// Only the first statement of the macro will be inside the conditional and the
|
||||
@ -29,8 +27,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MULTIPLE_STATEMENT_MACRO_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Block arguments in `dispatch_async()` and `dispatch_after()` are guaranteed
|
||||
/// to escape. If those blocks capture any pointers with the `noescape`
|
||||
@ -32,8 +30,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOESCAPECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds function calls where it is possible to cause a not null-terminated
|
||||
/// result. Usually the proper length of a string is 'strlen(src) + 1' or
|
||||
@ -60,8 +58,6 @@ private:
|
||||
const ast_matchers::MatchFinder::MatchResult &Result);
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds calls to grand..-parent virtual methods instead of parent's.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_PARENTVIRTUALCALLCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
class PosixReturnCheck: public ClangTidyCheck {
|
||||
public:
|
||||
@ -23,8 +21,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_POSIX_RETURN_CHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds condition variables in nested `if` statements that were also checked
|
||||
/// in the outer `if` statement and were not changed.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_REDUNDANTBRANCHCONDITIONCHECK_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for usages of identifiers reserved for use by the implementation.
|
||||
///
|
||||
@ -50,8 +48,6 @@ private:
|
||||
const NamingCheckFailure &Failure) const override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_RESERVEDIDENTIFIERCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "SmartPtrArrayMismatchCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find `std::shared_ptr<T>(new T[...])`, replace it (if applicable) with
|
||||
/// `std::shared_ptr<T[]>(new T[...])`.
|
||||
@ -31,8 +29,6 @@ protected:
|
||||
SmartPtrClassMatcher getSmartPointerClassMatcher() const override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SHAREDPTRARRAYMISMATCHCHECK_H
|
||||
|
@ -14,9 +14,7 @@
|
||||
#include "llvm/ADT/DepthFirstIterator.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checker for signal handler functions.
|
||||
///
|
||||
@ -76,8 +74,6 @@ private:
|
||||
llvm::StringSet<> ConformingFunctions;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIGNALHANDLERCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds those ``signed char`` -> integer conversions which might indicate a
|
||||
/// programming error. The basic problem with the ``signed char``, that it might
|
||||
@ -41,8 +39,6 @@ private:
|
||||
const bool DiagnoseSignedUnsignedCharComparisons;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIGNEDCHARMISUSECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find usages of sizeof on expressions of STL container types. Most likely the
|
||||
/// user wanted to use `.size()` instead.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIZEOFCONTAINERCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find suspicious usages of sizeof expression.
|
||||
///
|
||||
@ -34,8 +32,6 @@ private:
|
||||
const bool WarnOnSizeOfPointerToAggregate;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIZEOFEXPRESSIONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find constructions of smart (unique or shared) pointers where the pointer
|
||||
/// is declared with non-array target type and an array (created with a
|
||||
@ -45,8 +43,6 @@ private:
|
||||
StringRef const SmartPointerName;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SMARTPTRARRAYMISMATCHCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds ``cnd_wait``, ``cnd_timedwait``, ``wait``, ``wait_for``, or
|
||||
/// ``wait_until`` function calls when the function is not invoked from a loop
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SPURIOUSLYWAKEUPFUNCTIONSCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for ignored calls to `empty()` on a range and suggests `clear()`
|
||||
/// as an alternative if it is an existing member function.
|
||||
@ -31,8 +29,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STANDALONEEMPTYCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds suspicious string constructor and check their parameters.
|
||||
///
|
||||
@ -36,8 +34,6 @@ private:
|
||||
std::vector<StringRef> StringNames;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRING_CONSTRUCTOR_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds instances where an integer is assigned to a string.
|
||||
///
|
||||
@ -30,8 +28,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGINTEGERASSIGNMENTCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Find suspicious string literals with embedded NUL characters.
|
||||
///
|
||||
@ -27,8 +25,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGLITERALWITHEMBEDDEDNULCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../utils/TransformerClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Checks for various ways that the `const CharT*` constructor of
|
||||
/// `std::basic_string_view` can be passed a null argument and replaces them
|
||||
@ -42,8 +40,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGVIEWNULLPTRCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// The checker detects various cases when an enum is probably misused (as a
|
||||
/// bitmask).
|
||||
@ -34,8 +32,6 @@ private:
|
||||
const bool StrictMode;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSENUMUSAGECHECK_H
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include "../ClangTidyCheck.h"
|
||||
#include "../utils/FileExtensionsUtils.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Warns on inclusion of files whose names suggest that they're implementation
|
||||
/// files, instead of headers. E.g:
|
||||
@ -50,8 +48,6 @@ private:
|
||||
const StringRef RawStringImplementationFileExtensions;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSINCLUDECHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds potentially incorrect calls to ``memcmp()`` based on properties of the
|
||||
/// arguments.
|
||||
@ -28,8 +26,6 @@ public:
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSMEMORYCOMPARISONCHECK_H
|
||||
|
@ -11,9 +11,7 @@
|
||||
|
||||
#include "../ClangTidyCheck.h"
|
||||
|
||||
namespace clang {
|
||||
namespace tidy {
|
||||
namespace bugprone {
|
||||
namespace clang::tidy::bugprone {
|
||||
|
||||
/// Finds memset calls with potential mistakes in their arguments.
|
||||
///
|
||||
@ -30,8 +28,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace bugprone
|
||||
} // namespace tidy
|
||||
} // namespace clang
|
||||
} // namespace clang::tidy::bugprone
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUS_MEMSET_USAGE_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user