diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2015-08-27 22:19:50 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2015-08-27 22:19:50 +0000 |
commit | 46c9ae357844dbe8d0101491a1863a73b6ce1a04 (patch) | |
tree | 1d0512a49b45c09d16e349abd66c3f2d48329eb8 | |
parent | c7eaa17fe1fab9e0dc1e0cbb0978003ca77fd388 (diff) | |
download | bcm5719-llvm-46c9ae357844dbe8d0101491a1863a73b6ce1a04.tar.gz bcm5719-llvm-46c9ae357844dbe8d0101491a1863a73b6ce1a04.zip |
Reverting r246209 while I investigate a build bot failure: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/30516
llvm-svn: 246224
5 files changed, 1 insertions, 21 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.h b/clang-tools-extra/clang-tidy/ClangTidy.h index a2dbcbc540e..2df17c2ef43 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.h +++ b/clang-tools-extra/clang-tidy/ClangTidy.h @@ -158,8 +158,6 @@ protected: OptionsView Options; /// \brief Returns the main file name of the current translation unit. StringRef getCurrentMainFile() const { return Context->getCurrentFile(); } - /// \brief Returns the language options from the context. - LangOptions getLangOpts() const { return Context->getLangOpts(); } }; class ClangTidyCheckFactories; diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp index e19011b2961..c383440f8be 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -212,7 +212,6 @@ void ClangTidyContext::setCurrentFile(StringRef File) { void ClangTidyContext::setASTContext(ASTContext *Context) { DiagEngine->SetArgToStringFn(&FormatASTNodeDiagnosticArgument, Context); - LangOpts = Context->getLangOpts(); } const ClangTidyGlobalOptions &ClangTidyContext::getGlobalOptions() const { diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h index a452d68cc84..f1ab4942c07 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h @@ -149,9 +149,6 @@ public: /// \brief Sets ASTContext for the current translation unit. void setASTContext(ASTContext *Context); - /// \brief Gets the language options from the AST context - LangOptions getLangOpts() const { return LangOpts; } - /// \brief Returns the name of the clang-tidy check which produced this /// diagnostic ID. StringRef getCheckName(unsigned DiagnosticID) const; @@ -201,8 +198,6 @@ private: ClangTidyOptions CurrentOptions; std::unique_ptr<GlobList> CheckFilter; - LangOptions LangOpts; - ClangTidyStats Stats; llvm::DenseMap<unsigned, std::string> CheckNamesByDiagnosticID; diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp index 3a3b0054422..ea3bd95013f 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp @@ -453,9 +453,7 @@ void UseNullptrCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { } void UseNullptrCheck::registerMatchers(MatchFinder *Finder) { - // Only register the matcher for C++11. - if (getLangOpts().CPlusPlus11) - Finder->addMatcher(makeCastSequenceMatcher(), this); + Finder->addMatcher(makeCastSequenceMatcher(), this); } void UseNullptrCheck::check(const MatchFinder::MatchResult &Result) { diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.c b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.c deleted file mode 100644 index c2ccbbd8117..00000000000 --- a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.c +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: clang-tidy %s -checks=-*,modernize-use-nullptr -- | count 0 - -// Note: this test expects no diagnostics, but FileCheck cannot handle that, -// hence the use of | count 0. - -#define NULL 0 -void f(void) { - char *str = NULL; // ok - (void)str; -} |