[clang-tools-extra] r208471 - Update for Clang API change and move ClangTidyDiagnosticRenderer into an anonymous namespace while there.
Benjamin Kramer
benny.kra at googlemail.com
Sat May 10 09:32:08 PDT 2014
Author: d0k
Date: Sat May 10 11:32:07 2014
New Revision: 208471
URL: http://llvm.org/viewvc/llvm-project?rev=208471&view=rev
Log:
Update for Clang API change and move ClangTidyDiagnosticRenderer into an anonymous namespace while there.
Modified:
clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tools-extra/trunk/modularize/Modularize.cpp
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=208471&r1=208470&r2=208471&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Sat May 10 11:32:07 2014
@@ -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::relate
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
Modified: clang-tools-extra/trunk/modularize/Modularize.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=208471&r1=208470&r2=208471&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/Modularize.cpp (original)
+++ clang-tools-extra/trunk/modularize/Modularize.cpp Sat May 10 11:32:07 2014
@@ -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) {
More information about the cfe-commits
mailing list