• Home
  • Raw
  • Download

Lines Matching refs:Attr

25                                     const AttributeList &Attr, Sema &S) const {  in ProcessDeclAttribute()  argument
30 const AttributeList &Attr, Sema &S) { in HandleMSP430InterruptAttr() argument
32 if (Attr.getNumArgs() != 1) { in HandleMSP430InterruptAttr()
33 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; in HandleMSP430InterruptAttr()
39 Expr *NumParamsExpr = static_cast<Expr *>(Attr.getArg(0)); in HandleMSP430InterruptAttr()
42 S.Diag(Attr.getLoc(), diag::err_attribute_argument_not_int) in HandleMSP430InterruptAttr()
49 S.Diag(Attr.getLoc(), diag::err_attribute_argument_out_of_bounds) in HandleMSP430InterruptAttr()
55 d->addAttr(::new (S.Context) MSP430InterruptAttr(Attr.getLoc(), S.Context, Num)); in HandleMSP430InterruptAttr()
56 d->addAttr(::new (S.Context) UsedAttr(Attr.getLoc(), S.Context)); in HandleMSP430InterruptAttr()
64 const AttributeList &Attr, Sema &S) const { in ProcessDeclAttribute() argument
65 if (Attr.getName()->getName() == "interrupt") { in ProcessDeclAttribute()
66 HandleMSP430InterruptAttr(D, Attr, S); in ProcessDeclAttribute()
74 static void HandleMBlazeInterruptHandlerAttr(Decl *d, const AttributeList &Attr, in HandleMBlazeInterruptHandlerAttr() argument
77 if (Attr.getNumArgs() != 0) { in HandleMBlazeInterruptHandlerAttr()
78 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; in HandleMBlazeInterruptHandlerAttr()
84 d->addAttr(::new (S.Context) MBlazeInterruptHandlerAttr(Attr.getLoc(), in HandleMBlazeInterruptHandlerAttr()
86 d->addAttr(::new (S.Context) UsedAttr(Attr.getLoc(), S.Context)); in HandleMBlazeInterruptHandlerAttr()
89 static void HandleMBlazeSaveVolatilesAttr(Decl *d, const AttributeList &Attr, in HandleMBlazeSaveVolatilesAttr() argument
92 if (Attr.getNumArgs() != 0) { in HandleMBlazeSaveVolatilesAttr()
93 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; in HandleMBlazeSaveVolatilesAttr()
99 d->addAttr(::new (S.Context) MBlazeSaveVolatilesAttr(Attr.getLoc(), in HandleMBlazeSaveVolatilesAttr()
101 d->addAttr(::new (S.Context) UsedAttr(Attr.getLoc(), S.Context)); in HandleMBlazeSaveVolatilesAttr()
109 bool ProcessDeclAttribute(Scope *scope, Decl *D, const AttributeList &Attr, in ProcessDeclAttribute() argument
111 if (Attr.getName()->getName() == "interrupt_handler") { in ProcessDeclAttribute()
112 HandleMBlazeInterruptHandlerAttr(D, Attr, S); in ProcessDeclAttribute()
114 } else if (Attr.getName()->getName() == "save_volatiles") { in ProcessDeclAttribute()
115 HandleMBlazeSaveVolatilesAttr(D, Attr, S); in ProcessDeclAttribute()
124 const AttributeList& Attr, in HandleX86ForceAlignArgPointerAttr() argument
127 if (Attr.getNumArgs() != 0) { in HandleX86ForceAlignArgPointerAttr()
128 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; in HandleX86ForceAlignArgPointerAttr()
145 S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) in HandleX86ForceAlignArgPointerAttr()
146 << Attr.getName() << /* function */0; in HandleX86ForceAlignArgPointerAttr()
150 D->addAttr(::new (S.Context) X86ForceAlignArgPointerAttr(Attr.getRange(), in HandleX86ForceAlignArgPointerAttr()
168 static void HandleDLLImportAttr(Decl *D, const AttributeList &Attr, Sema &S) { in HandleDLLImportAttr() argument
170 if (Attr.getNumArgs() != 0) { in HandleDLLImportAttr()
171 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; in HandleDLLImportAttr()
182 S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) in HandleDLLImportAttr()
183 << Attr.getName() << 2 /*variable and function*/; in HandleDLLImportAttr()
190 S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "dllimport"; in HandleDLLImportAttr()
194 unsigned Index = Attr.getAttributeSpellingListIndex(); in HandleDLLImportAttr()
195 DLLImportAttr *NewAttr = S.mergeDLLImportAttr(D, Attr.getRange(), Index); in HandleDLLImportAttr()
214 static void HandleDLLExportAttr(Decl *D, const AttributeList &Attr, Sema &S) { in HandleDLLExportAttr() argument
216 if (Attr.getNumArgs() != 0) { in HandleDLLExportAttr()
217 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; in HandleDLLExportAttr()
224 S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) in HandleDLLExportAttr()
225 << Attr.getName() << 2 /*variable and function*/; in HandleDLLExportAttr()
233 S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "dllexport"; in HandleDLLExportAttr()
237 unsigned Index = Attr.getAttributeSpellingListIndex(); in HandleDLLExportAttr()
238 DLLExportAttr *NewAttr = S.mergeDLLExportAttr(D, Attr.getRange(), Index); in HandleDLLExportAttr()
248 const AttributeList &Attr, Sema &S) const { in ProcessDeclAttribute() argument
252 switch (Attr.getKind()) { in ProcessDeclAttribute()
253 case AttributeList::AT_DLLImport: HandleDLLImportAttr(D, Attr, S); in ProcessDeclAttribute()
255 case AttributeList::AT_DLLExport: HandleDLLExportAttr(D, Attr, S); in ProcessDeclAttribute()
261 (Attr.getName()->getName() == "force_align_arg_pointer" || in ProcessDeclAttribute()
262 Attr.getName()->getName() == "__force_align_arg_pointer__")) { in ProcessDeclAttribute()
263 HandleX86ForceAlignArgPointerAttr(D, Attr, S); in ProcessDeclAttribute()
271 static void HandleMips16Attr(Decl *D, const AttributeList &Attr, Sema &S) { in HandleMips16Attr() argument
273 if (Attr.hasParameterOrArguments()) { in HandleMips16Attr()
274 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; in HandleMips16Attr()
279 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type) in HandleMips16Attr()
280 << Attr.getName() << /* function */0; in HandleMips16Attr()
283 D->addAttr(::new (S.Context) Mips16Attr(Attr.getRange(), S.Context, in HandleMips16Attr()
284 Attr.getAttributeSpellingListIndex())); in HandleMips16Attr()
287 static void HandleNoMips16Attr(Decl *D, const AttributeList &Attr, Sema &S) { in HandleNoMips16Attr() argument
289 if (Attr.hasParameterOrArguments()) { in HandleNoMips16Attr()
290 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; in HandleNoMips16Attr()
295 S.Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type) in HandleNoMips16Attr()
296 << Attr.getName() << /* function */0; in HandleNoMips16Attr()
300 NoMips16Attr(Attr.getRange(), S.Context, in HandleNoMips16Attr()
301 Attr.getAttributeSpellingListIndex())); in HandleNoMips16Attr()
308 bool ProcessDeclAttribute(Scope *scope, Decl *D, const AttributeList &Attr, in ProcessDeclAttribute() argument
310 if (Attr.getName()->getName() == "mips16") { in ProcessDeclAttribute()
311 HandleMips16Attr(D, Attr, S); in ProcessDeclAttribute()
313 } else if (Attr.getName()->getName() == "nomips16") { in ProcessDeclAttribute()
314 HandleNoMips16Attr(D, Attr, S); in ProcessDeclAttribute()