aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 9e96e00..323c002 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -499,28 +499,6 @@ static bool fileContainsString(StringRef Substring, ASTContext &C) {
return Buffer.contains(Substring);
}
-static void reportAnalyzerFunctionMisuse(const AnalyzerOptions &Opts,
- const ASTContext &Ctx) {
- llvm::errs() << "Every top-level function was skipped.\n";
-
- if (!Opts.AnalyzerDisplayProgress)
- llvm::errs() << "Pass the -analyzer-display-progress for tracking which "
- "functions are analyzed.\n";
-
- bool HasBrackets =
- Opts.AnalyzeSpecificFunction.find("(") != std::string::npos;
-
- if (Ctx.getLangOpts().CPlusPlus && !HasBrackets) {
- llvm::errs()
- << "For analyzing C++ code you need to pass the function parameter "
- "list: -analyze-function=\"foobar(int, _Bool)\"\n";
- } else if (!Ctx.getLangOpts().CPlusPlus && HasBrackets) {
- llvm::errs() << "For analyzing C code you shouldn't pass the function "
- "parameter list, only the name of the function: "
- "-analyze-function=foobar\n";
- }
-}
-
void AnalysisConsumer::runAnalysisOnTranslationUnit(ASTContext &C) {
BugReporter BR(*Mgr);
TranslationUnitDecl *TU = C.getTranslationUnitDecl();
@@ -557,14 +535,6 @@ void AnalysisConsumer::runAnalysisOnTranslationUnit(ASTContext &C) {
BR.FlushReports();
RecVisitorBR = nullptr;
-
- // If the user wanted to analyze a specific function and the number of basic
- // blocks analyzed is zero, than the user might not specified the function
- // name correctly.
- // FIXME: The user might have analyzed the requested function in Syntax mode,
- // but we are unaware of that.
- if (!Opts->AnalyzeSpecificFunction.empty() && NumFunctionsAnalyzed == 0)
- reportAnalyzerFunctionMisuse(*Opts, *Ctx);
}
void AnalysisConsumer::reportAnalyzerProgress(StringRef S) {