reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Sema/SemaDecl.cpp
 6483   DeclarationName Name = GetNameForDeclarator(D).getName();
 6487   if (D.isDecompositionDeclarator()) {
 6490     auto &Decomp = D.getDecompositionDeclarator();
 6496     Diag(D.getIdentifierLoc(), diag::err_bad_variable_name) << Name;
 6505       Diag(D.getIdentifierLoc(),
 6508       D.setInvalidType();
 6518         Diag(D.getIdentifierLoc(),
 6520         D.setInvalidType();
 6529         Diag(D.getIdentifierLoc(), diag::err_opencl_function_pointer);
 6530         D.setInvalidType();
 6540         Diag(D.getIdentifierLoc(), diag::err_opencl_half_declaration) << R;
 6541         D.setInvalidType();
 6551         Diag(D.getIdentifierLoc(), diag::err_wrong_sampler_addressspace);
 6560         Diag(D.getIdentifierLoc(), diag::err_opencl_nonconst_global_sampler);
 6561         D.setInvalidType();
 6570         Diag(D.getBeginLoc(), diag::err_event_t_addr_space_qual);
 6571         D.setInvalidType();
 6578     DeclSpec::TSCS TSC = D.getDeclSpec().getThreadStorageClassSpec();
 6581       Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
 6585       D.setInvalidType();
 6590   DeclSpec::SCS SCSpec = D.getDeclSpec().getStorageClassSpec();
 6591   StorageClass SC = StorageClassSpecToVarDeclStorageClass(D.getDeclSpec());
 6596       hasParsedAttr(S, D, ParsedAttr::AT_DLLImport) &&
 6597       !hasParsedAttr(S, D, ParsedAttr::AT_DLLExport))
 6607     Diag(D.getIdentifierLoc(), diag::err_mutable_nonmember);
 6608     D.setInvalidType();
 6613       !D.getAsmLabel() && !getSourceManager().isInSystemMacro(
 6614                               D.getDeclSpec().getStorageClassSpecLoc())) {
 6618     Diag(D.getDeclSpec().getStorageClassSpecLoc(),
 6621       << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());
 6624   DiagnoseFunctionSpecifiers(D.getDeclSpec());
 6630     if (SC == SC_Auto || (SC == SC_Register && !D.getAsmLabel())) {
 6631       Diag(D.getIdentifierLoc(), diag::err_typecheck_sclass_fscope);
 6632       D.setInvalidType();
 6644     NewVD = VarDecl::Create(Context, DC, D.getBeginLoc(), D.getIdentifierLoc(),
 6644     NewVD = VarDecl::Create(Context, DC, D.getBeginLoc(), D.getIdentifierLoc(),
 6650     if (D.isInvalidType())
 6666         Diag(D.getDeclSpec().getStorageClassSpecLoc(),
 6668           << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());
 6678         Diag(D.getDeclSpec().getStorageClassSpecLoc(),
 6680           << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());
 6690           Diag(D.getIdentifierLoc(),
 6697           Diag(D.getIdentifierLoc(),
 6703           Diag(D.getIdentifierLoc(),
 6712         D.getDeclSpec().getBeginLoc(), D.getIdentifierLoc(),
 6712         D.getDeclSpec().getBeginLoc(), D.getIdentifierLoc(),
 6713         D.getCXXScopeSpec(),
 6714         D.getName().getKind() == UnqualifiedIdKind::IK_TemplateId
 6715             ? D.getName().TemplateId
 6722           D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {
 6732         if (D.getName().getKind() == UnqualifiedIdKind::IK_TemplateId) {
 6746           Diag(D.getIdentifierLoc(),
 6754               D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) &&
 6764           S, D, TInfo, TemplateKWLoc, TemplateParams, SC,
 6770     } else if (D.isDecompositionDeclarator()) {
 6771       NewVD = DecompositionDecl::Create(Context, DC, D.getBeginLoc(),
 6772                                         D.getIdentifierLoc(), R, TInfo, SC,
 6775       NewVD = VarDecl::Create(Context, DC, D.getBeginLoc(),
 6776                               D.getIdentifierLoc(), II, R, TInfo, SC);
 6781           VarTemplateDecl::Create(Context, DC, D.getIdentifierLoc(), Name,
 6791     if (D.isInvalidType() || Invalid) {
 6797     SetNestedNameSpecifier(*this, NewVD, D);
 6807   if (D.getDeclSpec().isInlineSpecified()) {
 6809       Diag(D.getDeclSpec().getInlineSpecLoc(), diag::err_inline_non_function)
 6813       Diag(D.getDeclSpec().getInlineSpecLoc(),
 6815         << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc());
 6817       Diag(D.getDeclSpec().getInlineSpecLoc(),
 6831     if (D.isDecompositionDeclarator())
 6839   if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec()) {
 6850       Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
 6864         Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
 6870   switch (D.getDeclSpec().getConstexprSpecifier()) {
 6875     Diag(D.getDeclSpec().getConstexprSpecLoc(),
 6877       << D.getDeclSpec().getConstexprSpecifier();
 6893       Diag(D.getDeclSpec().getConstexprSpecLoc(),
 6897           Context, D.getDeclSpec().getConstexprSpecLoc(),
 6915       Diag(D.getDeclSpec().getStorageClassSpecLoc(),
 6921   if (D.getDeclSpec().isModulePrivateSpecified()) {
 6926                  D.getDeclSpec().getModulePrivateSpecLoc());
 6930         << FixItHint::CreateRemoval(D.getDeclSpec().getModulePrivateSpecLoc());
 6934         << SourceRange(D.getDeclSpec().getModulePrivateSpecLoc())
 6935         << FixItHint::CreateRemoval(D.getDeclSpec().getModulePrivateSpecLoc());
 6946   ProcessDeclAttributes(S, NewVD, D);
 6953       Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
 6977   if (Expr *E = (Expr*)D.getAsmLabel()) {
 7015         Diag(D.getBeginLoc(), diag::err_asm_bad_register_type);
 7036   NamedDecl *ShadowedDecl = D.getCXXScopeSpec().isEmpty()
 7044                        D.getCXXScopeSpec().isNotEmpty() ||
 7057     D.setRedeclaration(CheckVariableDeclaration(NewVD, Previous));
 7068           D.getCXXScopeSpec().isSet()) {
 7072           << D.getCXXScopeSpec().getRange();
 7076     } else if (D.getCXXScopeSpec().isSet()) {
 7078       Diag(D.getIdentifierLoc(), diag::err_no_member)
 7079         << Name << computeDeclContext(D.getCXXScopeSpec(), true)
 7080         << D.getCXXScopeSpec().getRange();
 7085       D.setRedeclaration(CheckVariableDeclaration(NewVD, Previous));
 7100               (D.getCXXScopeSpec().isSet() && DC && DC->isRecord() &&
 7115   if (ShadowedDecl && !D.isRedeclaration())
 7147       Diag(D.getBeginLoc(), diag::err_main_global_variable);
 7152       Diag(D.getBeginLoc(), diag::warn_main_redefined);
 7155   if (D.isRedeclaration() && !Previous.empty()) {
 7158                                    D.isFunctionDefinition());