[PATCH] Diagnose const destination to __atomic_load

Eric Fiselier eric at efcs.ca
Thu Jun 11 20:50:11 PDT 2015


In http://reviews.llvm.org/D10407#187132, @jroelofs wrote:

> It probably makes sense to extend this to all of the related builtins that can write to their pointer argument:
>
>   __atomic_store
>   __atomic_store_n
>   __atomic_exchange
>   __atomic_exchange
>   __atomic_compare_exchange
>   __atomic_compare_exchange_n
>   __atomic_test_and_set
>   __atomic_clear
>


I agree. I also think this is the wrong way to diagnose this one case where the second argument can't be const but the first can.  I'll take another stab at this tomorrow.


http://reviews.llvm.org/D10407

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list