the difference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193582
91177308-0d34-0410-b5e6-
96231b3b80d8
}
def Const : InheritableAttr {
- let Spellings = [GNU<"const">, GNU<"__const">, CXX11<"gnu", "const">];
+ let Spellings = [GNU<"const">, GNU<"__const">,
+ CXX11<"gnu", "const">, CXX11<"gnu", "__const">];
}
def Constructor : InheritableAttr {
A([[gnu::unused]] int a);
};
A::A([[gnu::unused]] int a) {}
+
+namespace GccConst {
+ // GCC's tokenizer treats const and __const as the same token.
+ [[gnu::const]] int *f1();
+ [[gnu::__const]] int *f2();
+ void f(const int *);
+ void g() { f(f1()); f(f2()); }
+}