[PATCH] D51650: Implement target_clones multiversioning

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 11 09:38:05 PST 2021


aaron.ballman added a comment.

In D51650#3124859 <https://reviews.llvm.org/D51650#3124859>, @erichkeane wrote:

> Did all the things Aaron asked for, but required adding 'lambda not supported yet' logic for this.

I don't see the .cpp test file, did it get dropped by accident?

Also, pre-commit isn't able to apply the patch, so it'd be good to resolve that to get the CI testing.



================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1970
+  // confusing behavior.
+  if (checkAttrMutualExclusion<CPUDispatchAttr>(S, D, AL) ||
+      checkAttrMutualExclusion<CPUSpecificAttr>(S, D, AL))
----------------
This diagnostic behavior is a bit unfortunate because we'll issue a diagnostic like:
```
// expected-error at +2 {{'target_clones' and 'target_clones' attributes are not compatible}}
```
Maybe we should add `err_duplicate_attribute` and steal its text from `warn_duplicate_attribute` and use `getAttr()` directly here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D51650/new/

https://reviews.llvm.org/D51650



More information about the cfe-commits mailing list