erichkeane wrote:

>I suppose the only question now is whether [[clang::assume]] should be treated 
>like [[assume]] if it’s not applied to a function declaration?

THAT is an interesting question that @AaronBallman might have some comments 
on...

Effectively, we have TWO 'assume' attributes-
1- An openmp FunctionDecl attribute that takes a string
2- The standard 'statement' attribute that takes an expression.

So the question is, how do we differentiate between the two?  We have a few 
options:
1- spelling: `[[clang::assume]]`/`__attribute__((assume))` currently work for 
the 'string' version, so make ONLY `[[assume]]` the C++ one.
2- Argument: The OMP one takes a string argument, we take an expression.  
Bifurcate based on that?
3- Appertainment: OMP is a function decl, standard is a statement.

Of the three, I lean towards 3 actually, I think that is perhaps the BEST idea, 
and is perhaps supported by our existing infrastructure already (if you have 
Attr.td set its targets right?).  I'd like to see what Aaron has to say, but I 
THINK that is my preference baring any concerns.

https://github.com/llvm/llvm-project/pull/81014
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to