Decl =
ParseDeclaration(DeclaratorContext::BlockContext, DeclEnd, Attrs);
}
+ if (Attrs.Range.getBegin().isValid())
+ DeclStart = Attrs.Range.getBegin();
return Actions.ActOnDeclStmt(Decl, DeclStart, DeclEnd);
}
\r
}; // namespace std\r
\r
+// CHECK: NamespaceDecl {{.*}} attributed_decl\r
+namespace attributed_decl {\r
+ void f() {\r
+ // CHECK: DeclStmt {{.*}} <line:[[@LINE+1]]:5, col:28>\r
+ [[maybe_unused]] int i1;\r
+ // CHECK: DeclStmt {{.*}} <line:[[@LINE+1]]:5, col:35>\r
+ __attribute__((unused)) int i2;\r
+ // CHECK: DeclStmt {{.*}} <line:[[@LINE+1]]:5, col:35>\r
+ int __attribute__((unused)) i3;\r
+ // CHECK: DeclStmt {{.*}} <<built-in>:{{.*}}, {{.*}}:[[@LINE+1]]:40>\r
+ __declspec(dllexport) extern int i4;\r
+ // CHECK: DeclStmt {{.*}} <line:[[@LINE+1]]:5, col:40>\r
+ extern int __declspec(dllexport) i5;\r
+ }\r
+}\r
+\r
#if __cplusplus >= 201703L\r
// CHECK-1Z: FunctionDecl {{.*}} construct_with_init_list\r
std::map<int, int> construct_with_init_list() {\r