[PATCH] D54909: [clang][slh] add Clang attr no_speculative_load_hardening

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 14 05:07:12 PST 2018


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3786
+
+  ::
+
----------------
I think this is meant to be `.. code-block:: c` ?


================
Comment at: clang/test/SemaCXX/attr-no-speculative-load-hardening.cpp:5
+
+void f1() __attribute__((no_speculative_load_hardening));
+void f2() __attribute__((no_speculative_load_hardening(1))); // expected-error {{'no_speculative_load_hardening' attribute takes no arguments}}
----------------
Should this situation be diagnosed?
```
__attribute__((no_speculative_load_hardening))
void func();

__attribute__((speculative_load_hardening))
void func();
```
Which attribute should "win"?

If you want to diagnose, you can use `checkAttrMutualExclusion()` to handle this in SemaDeclAttr.cpp.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D54909





More information about the llvm-commits mailing list