Pure attribute

As far as I can tell, the pure attribute works (the following code
compiles), but where is the documentation for it?

[[clang::pure]]
int f(){return 5;}
int main() {
  return 0;
}

Unless this attribute has been added since last week I don't think it
is supported. I get a warning "unknown attribute 'pure' ignored".

You might try compiling a test program which should fail due to not
being pure, rather than one which should work. That's a better test to
see if the attribute does anything. You can also use the -Weverything
flag to be sure you see any warnings.

Sorry, I missed the warning.

The below compiles with no warning about the attribute (it does warn about a missing prototype). Changing pure to garbage made it complain about an unknown attribute, and making it modify a global did not change anything.

__attribute((pure))
int f(){return 5;}

int main(){}

Is this documented?