clang
20.0.0git
lib
StaticAnalyzer
Checkers
WebKit
DiagOutputUtils.h
Go to the documentation of this file.
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
const
NamedDeclDerivedT &
D
) {
20
Os <<
"'"
;
21
D
->getNameForDiagnostic(Os,
D
->
getASTContext
().
getPrintingPolicy
(),
22
/*Qualified=*/
true
);
23
Os <<
"'"
;
24
}
25
26
template
<
typename
NamedDeclDerivedT>
27
void
printQuotedName
(llvm::raw_ostream &Os,
const
NamedDeclDerivedT &
D
) {
28
Os <<
"'"
;
29
D
->getNameForDiagnostic(Os,
D
->
getASTContext
().
getPrintingPolicy
(),
30
/*Qualified=*/
false
);
31
Os <<
"'"
;
32
}
33
34
}
// namespace clang
35
36
#endif
D
const Decl * D
Definition:
CheckExprLifetime.cpp:200
Decl.h
clang::ASTContext::getPrintingPolicy
const clang::PrintingPolicy & getPrintingPolicy() const
Definition:
ASTContext.h:713
clang::Decl::getASTContext
ASTContext & getASTContext() const LLVM_READONLY
Definition:
DeclBase.cpp:523
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
clang::printQuotedQualifiedName
void printQuotedQualifiedName(llvm::raw_ostream &Os, const NamedDeclDerivedT &D)
Definition:
DiagOutputUtils.h:18
clang::printQuotedName
void printQuotedName(llvm::raw_ostream &Os, const NamedDeclDerivedT &D)
Definition:
DiagOutputUtils.h:27
Generated on Fri Nov 22 2024 09:50:42 for clang by
1.9.6