[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 11:32:17 PST 2018


aaron.ballman added inline comments.


================
Comment at: test/Sema/attr-nocf_check.c:1
+// RUN: %clang_cc1 -verify -fcf-protection=branch -target-feature +ibt -fsyntax-only %s
+
----------------
You likely need to specify an explicit triple here, or some of the bots fail this test because the attribute isn't supported on that architecture. You should also add a test that verifies the attribute isn't supported on non-x86 platforms.


================
Comment at: test/Sema/attr-nocf_check.cpp:1
+// RUN: %clang_cc1 -verify -fcf-protection=branch -target-feature +ibt -fsyntax-only %s
+
----------------
aaron.ballman wrote:
> For better test coverage, you can switch to the `[[gnu::nocf_check]]` spelling in this file and pass `-std=c++11`
This one also likely needs an explicit triple.


Repository:
  rL LLVM

https://reviews.llvm.org/D41880





More information about the cfe-commits mailing list