Coverage Report

Created: 2023-09-30 09:22

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/DiagOutputUtils.h
Line
Count
Source
1
//=======- DiagOutputUtils.h -------------------------------------*- C++ -*-==//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_CLANG_ANALYZER_WEBKIT_DIAGPRINTUTILS_H
10
#define LLVM_CLANG_ANALYZER_WEBKIT_DIAGPRINTUTILS_H
11
12
#include "clang/AST/Decl.h"
13
#include "llvm/Support/raw_ostream.h"
14
15
namespace clang {
16
17
template <typename NamedDeclDerivedT>
18
void printQuotedQualifiedName(llvm::raw_ostream &Os,
19
36
                              const NamedDeclDerivedT &D) {
20
36
  Os << "'";
21
36
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
36
                          /*Qualified=*/true);
23
36
  Os << "'";
24
36
}
void clang::printQuotedQualifiedName<clang::RecordDecl const*>(llvm::raw_ostream&, clang::RecordDecl const* const&)
Line
Count
Source
19
3
                              const NamedDeclDerivedT &D) {
20
3
  Os << "'";
21
3
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
3
                          /*Qualified=*/true);
23
3
  Os << "'";
24
3
}
void clang::printQuotedQualifiedName<clang::CXXRecordDecl const*>(llvm::raw_ostream&, clang::CXXRecordDecl const* const&)
Line
Count
Source
19
13
                              const NamedDeclDerivedT &D) {
20
13
  Os << "'";
21
13
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
13
                          /*Qualified=*/true);
23
13
  Os << "'";
24
13
}
void clang::printQuotedQualifiedName<clang::ParmVarDecl const*>(llvm::raw_ostream&, clang::ParmVarDecl const* const&)
Line
Count
Source
19
7
                              const NamedDeclDerivedT &D) {
20
7
  Os << "'";
21
7
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
7
                          /*Qualified=*/true);
23
7
  Os << "'";
24
7
}
void clang::printQuotedQualifiedName<clang::ValueDecl*>(llvm::raw_ostream&, clang::ValueDecl* const&)
Line
Count
Source
19
8
                              const NamedDeclDerivedT &D) {
20
8
  Os << "'";
21
8
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
8
                          /*Qualified=*/true);
23
8
  Os << "'";
24
8
}
void clang::printQuotedQualifiedName<clang::VarDecl const*>(llvm::raw_ostream&, clang::VarDecl const* const&)
Line
Count
Source
19
5
                              const NamedDeclDerivedT &D) {
20
5
  Os << "'";
21
5
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
22
5
                          /*Qualified=*/true);
23
5
  Os << "'";
24
5
}
25
26
template <typename NamedDeclDerivedT>
27
3
void printQuotedName(llvm::raw_ostream &Os, const NamedDeclDerivedT &D) {
28
3
  Os << "'";
29
3
  D->getNameForDiagnostic(Os, D->getASTContext().getPrintingPolicy(),
30
3
                          /*Qualified=*/false);
31
3
  Os << "'";
32
3
}
33
34
} // namespace clang
35
36
#endif