summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp15
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp2
2 files changed, 8 insertions, 9 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index d70305e2d46..8a47cd9f63e 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -17,17 +17,16 @@
//===----------------------------------------------------------------------===//
#include "ClangTidyDiagnosticConsumer.h"
-
#include "ClangTidyOptions.h"
+#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Frontend/DiagnosticRenderer.h"
#include "llvm/ADT/SmallString.h"
-
#include <set>
#include <tuple>
+using namespace clang;
+using namespace tidy;
-namespace clang {
-namespace tidy {
-
+namespace {
class ClangTidyDiagnosticRenderer : public DiagnosticRenderer {
public:
ClangTidyDiagnosticRenderer(const LangOptions &LangOpts,
@@ -97,6 +96,7 @@ protected:
private:
ClangTidyError &Error;
};
+} // end anonymous namespace
ClangTidyMessage::ClangTidyMessage(StringRef Message) : Message(Message) {}
@@ -254,6 +254,7 @@ bool ClangTidyDiagnosticConsumer::relatesToUserCode(SourceLocation Location) {
return !File || HeaderFilter.match(File->getName());
}
+namespace {
struct LessClangTidyError {
bool operator()(const ClangTidyError *LHS, const ClangTidyError *RHS) const {
const ClangTidyMessage &M1 = LHS->Message;
@@ -263,6 +264,7 @@ struct LessClangTidyError {
std::tie(M2.FilePath, M2.FileOffset, M2.Message);
}
};
+} // end anonymous namespace
// Flushes the internal diagnostics buffer to the ClangTidyContext.
void ClangTidyDiagnosticConsumer::finish() {
@@ -275,6 +277,3 @@ void ClangTidyDiagnosticConsumer::finish() {
Context.storeError(*Error);
Errors.clear();
}
-
-} // namespace tidy
-} // namespace clang
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index 1f93c5da546..93c0c4ca687 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -522,7 +522,7 @@ public:
return true;
}
bool TraverseConstructorInitializer(CXXCtorInitializer *Init) { return true; }
- bool TraverseLambdaCapture(LambdaExpr::Capture C) { return true; }
+ bool TraverseLambdaCapture(LambdaCapture C) { return true; }
// Check 'extern "*" {}' block for #include directives.
bool VisitLinkageSpecDecl(LinkageSpecDecl *D) {
OpenPOWER on IntegriCloud