Skip to content

Commit e7e2e90

Browse files
committed
Revert "Fix ast print of variables with attributes"
This reverts commit 46f3ade.
1 parent 871f5b0 commit e7e2e90

18 files changed

+55
-242
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,10 @@ class Spelling<string name, string variety, int version = 1> {
324324
}
325325

326326
class GNU<string name> : Spelling<name, "GNU">;
327-
class Declspec<string name> : Spelling<name, "Declspec"> {
328-
bit PrintOnLeft = 1;
329-
}
327+
class Declspec<string name> : Spelling<name, "Declspec">;
330328
class Microsoft<string name> : Spelling<name, "Microsoft">;
331329
class CXX11<string namespace, string name, int version = 1>
332330
: Spelling<name, "CXX11", version> {
333-
bit CanPrintOnLeft = 0;
334331
string Namespace = namespace;
335332
}
336333
class C23<string namespace, string name, int version = 1>
@@ -596,12 +593,6 @@ class AttrSubjectMatcherAggregateRule<AttrSubject subject> {
596593
def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule<Named>;
597594

598595
class Attr {
599-
// Specifies that when printed, this attribute is meaningful on the
600-
// 'left side' of the declaration.
601-
bit CanPrintOnLeft = 1;
602-
// Specifies that when printed, this attribute is required to be printed on
603-
// the 'left side' of the declaration.
604-
bit PrintOnLeft = 0;
605596
// The various ways in which an attribute can be spelled in source
606597
list<Spelling> Spellings;
607598
// The things to which an attribute can appertain
@@ -937,7 +928,6 @@ def AVRSignal : InheritableAttr, TargetSpecificAttr<TargetAVR> {
937928
}
938929

939930
def AsmLabel : InheritableAttr {
940-
let CanPrintOnLeft = 0;
941931
let Spellings = [CustomKeyword<"asm">, CustomKeyword<"__asm__">];
942932
let Args = [
943933
// Label specifies the mangled name for the decl.
@@ -1534,7 +1524,6 @@ def AllocSize : InheritableAttr {
15341524
}
15351525

15361526
def EnableIf : InheritableAttr {
1537-
let CanPrintOnLeft = 0;
15381527
// Does not have a [[]] spelling because this attribute requires the ability
15391528
// to parse function arguments but the attribute is not written in the type
15401529
// position.
@@ -3149,7 +3138,6 @@ def Unavailable : InheritableAttr {
31493138
}
31503139

31513140
def DiagnoseIf : InheritableAttr {
3152-
let CanPrintOnLeft = 0;
31533141
// Does not have a [[]] spelling because this attribute requires the ability
31543142
// to parse function arguments but the attribute is not written in the type
31553143
// position.

clang/include/clang/Basic/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ clang_tablegen(AttrList.inc -gen-clang-attr-list
3131
SOURCE Attr.td
3232
TARGET ClangAttrList)
3333

34-
clang_tablegen(AttrLeftSideCanPrintList.inc -gen-clang-attr-can-print-left-list
35-
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
36-
SOURCE Attr.td
37-
TARGET ClangAttrCanPrintLeftList)
38-
39-
clang_tablegen(AttrLeftSideMustPrintList.inc -gen-clang-attr-must-print-left-list
40-
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
41-
SOURCE Attr.td
42-
TARGET ClangAttrMustPrintLeftList)
43-
4434
clang_tablegen(AttrSubMatchRulesList.inc -gen-clang-attr-subject-match-rule-list
4535
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
4636
SOURCE Attr.td

clang/lib/AST/DeclPrinter.cpp

Lines changed: 16 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ namespace {
4949

5050
void PrintObjCTypeParams(ObjCTypeParamList *Params);
5151

52-
enum class AttrPrintLoc {
53-
None = 0,
54-
Left = 1,
55-
Right = 2,
56-
Any = Left | Right,
57-
58-
LLVM_MARK_AS_BITMASK_ENUM(/*DefaultValue=*/Any)
59-
};
60-
61-
void prettyPrintAttributes(Decl *D, raw_ostream &out,
62-
AttrPrintLoc loc = AttrPrintLoc::Any);
63-
6452
public:
6553
DeclPrinter(raw_ostream &Out, const PrintingPolicy &Policy,
6654
const ASTContext &Context, unsigned Indentation = 0,
@@ -129,11 +117,7 @@ namespace {
129117
const TemplateParameterList *Params);
130118
void printTemplateArguments(llvm::ArrayRef<TemplateArgumentLoc> Args,
131119
const TemplateParameterList *Params);
132-
133-
inline void prettyPrintAttributes(Decl *D) {
134-
prettyPrintAttributes(D, Out);
135-
}
136-
120+
void prettyPrintAttributes(Decl *D);
137121
void prettyPrintPragmas(Decl *D);
138122
void printDeclType(QualType T, StringRef DeclName, bool Pack = false);
139123
};
@@ -250,40 +234,7 @@ raw_ostream& DeclPrinter::Indent(unsigned Indentation) {
250234
return Out;
251235
}
252236

253-
static bool canPrintOnLeftSide(attr::Kind kind) {
254-
switch (kind) {
255-
#include "clang/Basic/AttrLeftSideCanPrintList.inc"
256-
return true;
257-
default:
258-
return false;
259-
}
260-
}
261-
262-
static bool canPrintOnLeftSide(const Attr *A) {
263-
if (A->isStandardAttributeSyntax())
264-
return false;
265-
266-
return canPrintOnLeftSide(A->getKind());
267-
}
268-
269-
static bool mustPrintOnLeftSide(attr::Kind kind) {
270-
switch (kind) {
271-
#include "clang/Basic/AttrLeftSideMustPrintList.inc"
272-
return true;
273-
default:
274-
return false;
275-
}
276-
}
277-
278-
static bool mustPrintOnLeftSide(const Attr *A) {
279-
if (A->isDeclspecAttribute())
280-
return true;
281-
282-
return mustPrintOnLeftSide(A->getKind());
283-
}
284-
285-
void DeclPrinter::prettyPrintAttributes(Decl *D, llvm::raw_ostream &Out,
286-
AttrPrintLoc Loc) {
237+
void DeclPrinter::prettyPrintAttributes(Decl *D) {
287238
if (Policy.PolishForDeclaration)
288239
return;
289240

@@ -292,32 +243,15 @@ void DeclPrinter::prettyPrintAttributes(Decl *D, llvm::raw_ostream &Out,
292243
for (auto *A : Attrs) {
293244
if (A->isInherited() || A->isImplicit())
294245
continue;
295-
296-
AttrPrintLoc AttrLoc = AttrPrintLoc::Right;
297-
if (mustPrintOnLeftSide(A)) {
298-
// If we must always print on left side (e.g. declspec), then mark as
299-
// so.
300-
AttrLoc = AttrPrintLoc::Left;
301-
} else if (canPrintOnLeftSide(A)) {
302-
// For functions with body defined we print the attributes on the left
303-
// side so that GCC accept our dumps as well.
304-
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
305-
FD && FD->isThisDeclarationADefinition())
306-
// In case Decl is a function with a body, then attrs should be print
307-
// on the left side.
308-
AttrLoc = AttrPrintLoc::Left;
309-
310-
// In case it is a variable declaration with a ctor, then allow
311-
// printing on the left side for readbility.
312-
else if (const VarDecl *VD = dyn_cast<VarDecl>(D);
313-
VD && VD->getInit() &&
314-
VD->getInitStyle() == VarDecl::CallInit)
315-
AttrLoc = AttrPrintLoc::Left;
316-
}
317-
318-
// Only print the side matches the user requested.
319-
if ((Loc & AttrLoc) != AttrPrintLoc::None)
246+
switch (A->getKind()) {
247+
#define ATTR(X)
248+
#define PRAGMA_SPELLING_ATTR(X) case attr::X:
249+
#include "clang/Basic/AttrList.inc"
250+
break;
251+
default:
320252
A->printPretty(Out, Policy);
253+
break;
254+
}
321255
}
322256
}
323257
}
@@ -689,22 +623,6 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
689623
printTemplateParameters(D->getTemplateParameterList(I));
690624
}
691625

692-
std::string LeftsideAttrs;
693-
llvm::raw_string_ostream LSAS(LeftsideAttrs);
694-
695-
prettyPrintAttributes(D, LSAS, AttrPrintLoc::Left);
696-
697-
// prettyPrintAttributes print a space on left side of the attribute.
698-
if (LeftsideAttrs[0] == ' ') {
699-
// Skip the space prettyPrintAttributes generated.
700-
LeftsideAttrs.erase(0, LeftsideAttrs.find_first_not_of(' '));
701-
702-
// Add a single space between the attribute and the Decl name.
703-
LSAS << ' ';
704-
}
705-
706-
Out << LeftsideAttrs;
707-
708626
CXXConstructorDecl *CDecl = dyn_cast<CXXConstructorDecl>(D);
709627
CXXConversionDecl *ConversionDecl = dyn_cast<CXXConversionDecl>(D);
710628
CXXDeductionGuideDecl *GuideDecl = dyn_cast<CXXDeductionGuideDecl>(D);
@@ -870,7 +788,7 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
870788
Ty.print(Out, Policy, Proto);
871789
}
872790

873-
prettyPrintAttributes(D, Out, AttrPrintLoc::Right);
791+
prettyPrintAttributes(D);
874792

875793
if (D->isPureVirtual())
876794
Out << " = 0";
@@ -967,23 +885,6 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
967885
Param && Param->isExplicitObjectParameter())
968886
Out << "this ";
969887

970-
std::string LeftSide;
971-
llvm::raw_string_ostream LeftSideStream(LeftSide);
972-
973-
// Print attributes that should be placed on the left, such as __declspec.
974-
prettyPrintAttributes(D, LeftSideStream, AttrPrintLoc::Left);
975-
976-
// prettyPrintAttributes print a space on left side of the attribute.
977-
if (LeftSide[0] == ' ') {
978-
// Skip the space prettyPrintAttributes generated.
979-
LeftSide.erase(0, LeftSide.find_first_not_of(' '));
980-
981-
// Add a single space between the attribute and the Decl name.
982-
LeftSideStream << ' ';
983-
}
984-
985-
Out << LeftSide;
986-
987888
QualType T = D->getTypeSourceInfo()
988889
? D->getTypeSourceInfo()->getType()
989890
: D->getASTContext().getUnqualifiedObjCPointerType(D->getType());
@@ -1016,21 +917,14 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
1016917
}
1017918
}
1018919

1019-
StringRef Name;
1020-
1021-
Name = (isa<ParmVarDecl>(D) && Policy.CleanUglifiedParameters &&
1022-
D->getIdentifier())
1023-
? D->getIdentifier()->deuglifiedName()
1024-
: D->getName();
1025-
1026920
if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
1027921
!Policy.SuppressUnwrittenScope)
1028922
MaybePrintTagKeywordIfSupressingScopes(Policy, T, Out);
1029-
printDeclType(T, Name);
1030923

1031-
// Print the attributes that should be placed right before the end of the
1032-
// decl.
1033-
prettyPrintAttributes(D, Out, AttrPrintLoc::Right);
924+
printDeclType(T, (isa<ParmVarDecl>(D) && Policy.CleanUglifiedParameters &&
925+
D->getIdentifier())
926+
? D->getIdentifier()->deuglifiedName()
927+
: D->getName());
1034928

1035929
Expr *Init = D->getInit();
1036930
if (!Policy.SuppressInitializers && Init) {
@@ -1060,6 +954,7 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
1060954
Out << ")";
1061955
}
1062956
}
957+
prettyPrintAttributes(D);
1063958
}
1064959

1065960
void DeclPrinter::VisitParmVarDecl(ParmVarDecl *D) {

clang/test/AST/ast-print-attr-knr.c

Lines changed: 0 additions & 17 deletions
This file was deleted.

clang/test/AST/ast-print-attr.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,3 @@ int *fun_returns() __attribute__((ownership_returns(fun_returns)));
3232

3333
// CHECK: void fun_holds(int *a) __attribute__((ownership_holds(fun_holds, 1)));
3434
void fun_holds(int *a) __attribute__((ownership_holds(fun_holds, 1)));
35-
36-
// CHECK: int fun_var_unused() {
37-
// CHECK-NEXT: int x __attribute__((unused)) = 0;
38-
// CHECK-NEXT: return x;
39-
// CHECK-NEXT: }
40-
int fun_var_unused() { int x __attribute__((unused)) = 0; return x; }

clang/test/AST/ast-print-method-decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct DefMethodsWithoutBody {
9494
// CHECK-NEXT: DefMethodsWithoutBody() = default;
9595
~DefMethodsWithoutBody() = default;
9696

97-
// CHECK-NEXT: __attribute__((alias("X"))) void m1();
97+
// CHECK-NEXT: void m1() __attribute__((alias("X")));
9898
void m1() __attribute__((alias("X")));
9999

100100
// CHECK-NEXT: };

clang/test/AST/ast-print-pragmas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void test_templates(int *List, int Length) {
9393
#ifdef MS_EXT
9494
#pragma init_seg(compiler)
9595
// MS-EXT: #pragma init_seg (.CRT$XCC){{$}}
96-
// MS-EXT-NEXT: __declspec(thread) int x = 3;
97-
__declspec(thread) int x = 3;
96+
// MS-EXT-NEXT: int x = 3 __declspec(thread);
97+
int __declspec(thread) x = 3;
9898
#endif //MS_EXT
9999

clang/test/Analysis/blocks.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void testBlockWithCaptureByReference() {
7878
// CHECK-NEXT: 1: 5
7979
// WARNINGS-NEXT: 2: [B1.1] (CXXConstructExpr, StructWithCopyConstructor)
8080
// ANALYZER-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.3], StructWithCopyConstructor)
81-
// CHECK-NEXT: 3: __attribute__((blocks("byref"))) StructWithCopyConstructor s(5);
81+
// CHECK-NEXT: 3: StructWithCopyConstructor s(5) __attribute__((blocks("byref")));
8282
// CHECK-NEXT: 4: ^{ }
8383
// CHECK-NEXT: 5: (void)([B1.4]) (CStyleCastExpr, ToVoid, void)
8484
// CHECK-NEXT: Preds (1): B2

clang/test/OpenMP/assumes_codegen.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,41 +67,41 @@ int lambda_outer() {
6767
}
6868
#pragma omp end assumes
6969

70-
// AST: __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) void foo() {
70+
// AST: void foo() __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
7171
// AST-NEXT: }
7272
// AST-NEXT: class BAR {
7373
// AST-NEXT: public:
74-
// AST-NEXT: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) BAR() {
74+
// AST-NEXT: BAR() __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
7575
// AST-NEXT: }
76-
// AST-NEXT: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) void bar1() {
76+
// AST-NEXT: void bar1() __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
7777
// AST-NEXT: }
78-
// AST-NEXT: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) static void bar2() {
78+
// AST-NEXT: static void bar2() __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
7979
// AST-NEXT: }
8080
// AST-NEXT: };
81-
// AST-NEXT: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) void bar() {
81+
// AST-NEXT: void bar() __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
8282
// AST-NEXT: BAR b;
8383
// AST-NEXT: }
8484
// AST-NEXT: void baz() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp")));
8585
// AST-NEXT: template <typename T> class BAZ {
8686
// AST-NEXT: public:
87-
// AST-NEXT: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) BAZ<T>() {
87+
// AST-NEXT: BAZ<T>() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
8888
// AST-NEXT: }
89-
// AST-NEXT: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) void baz1() {
89+
// AST-NEXT: void baz1() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
9090
// AST-NEXT: }
91-
// AST-NEXT: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) static void baz2() {
91+
// AST-NEXT: static void baz2() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
9292
// AST-NEXT: }
9393
// AST-NEXT: };
9494
// AST-NEXT: template<> class BAZ<float> {
9595
// AST-NEXT: public:
96-
// AST-NEXT: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) BAZ() {
96+
// AST-NEXT: BAZ() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
9797
// AST-NEXT: }
9898
// AST-NEXT: void baz1() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp")));
9999
// AST-NEXT: static void baz2() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp")));
100100
// AST-NEXT: };
101-
// AST-NEXT: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) void baz() {
101+
// AST-NEXT: void baz() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
102102
// AST-NEXT: BAZ<float> b;
103103
// AST-NEXT: }
104-
// AST-NEXT: __attribute__((assume("ompx_lambda_assumption"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) int lambda_outer() {
104+
// AST-NEXT: int lambda_outer() __attribute__((assume("ompx_lambda_assumption"))) __attribute__((assume("omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses"))) __attribute__((assume("omp_no_openmp"))) {
105105
// AST-NEXT: auto lambda_inner = []() {
106106
// AST-NEXT: return 42;
107107
// AST-NEXT: };

clang/test/OpenMP/assumes_print.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ void baz() {
3737
}
3838
#pragma omp end assumes
3939

40-
// CHECK: __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void foo()
41-
// CHECK: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void bar()
42-
// CHECK: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void baz()
40+
// CHECK: void foo() __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp")))
41+
// CHECK: void bar() __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp")))
42+
// CHECK: void baz() __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp")))
4343

4444
#endif

0 commit comments

Comments
 (0)