summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-05-21 14:08:56 +0000
committerAlexander Kornienko <alexfh@google.com>2015-05-21 14:08:56 +0000
commit19bbeaf410361a695040f500c862a21c4e745568 (patch)
treea2b141a0086deef7b3079b3a44f806252216e213 /clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
parenta98788d17efd953e4a51d691eb7c0cb27c8c9f69 (diff)
downloadbcm5719-llvm-19bbeaf410361a695040f500c862a21c4e745568.tar.gz
bcm5719-llvm-19bbeaf410361a695040f500c862a21c4e745568.zip
[clang-tidy] Disable google-readability-casting for .c files and their headers.
Some people have reasons to compile their .c files as C++ in some configurations (e.g. for testing purposes), so just looking at LangOptions is not enough. This patch disables the check on all .c files (and also for the headers included from .c files). llvm-svn: 237905
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
index 8248ff14d98..67ef8401393 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
@@ -143,6 +143,9 @@ public:
/// \brief Should be called when starting to process new translation unit.
void setCurrentFile(StringRef File);
+ /// \brief Returns the main file name of the current translation unit.
+ StringRef getCurrentFile() const { return CurrentFile; }
+
/// \brief Sets ASTContext for the current translation unit.
void setASTContext(ASTContext *Context);
OpenPOWER on IntegriCloud