summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticSemaKinds.td
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-12-14 21:11:28 +0000
committerEric Fiselier <eric@efcs.ca>2018-12-14 21:11:28 +0000
commit5e6ad21ed04379e510f72b14b9325a3ebf27a9a6 (patch)
treebdfd8d51152afa5b20113e9736c118f49bd673f6 /include/clang/Basic/DiagnosticSemaKinds.td
parente98c891a878808bd78a7947557e53b035d2336d8 (diff)
[Clang] Add __builtin_launder
Summary: This patch adds `__builtin_launder`, which is required to implement `std::launder`. Additionally GCC provides `__builtin_launder`, so thing brings Clang in-line with GCC. I'm not exactly sure what magic `__builtin_launder` requires, but based on previous discussions this patch applies a `@llvm.invariant.group.barrier`. As noted in previous discussions, this may not be enough to correctly handle vtables. Reviewers: rnk, majnemer, rsmith Reviewed By: rsmith Subscribers: kristina, Romain-Geissler-1A, erichkeane, amharc, jroelofs, cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D40218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index c11b6db488..2e84f5fedf 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -9475,4 +9475,8 @@ def warn_noderef_on_non_pointer_or_array : Warning<
def warn_noderef_to_dereferenceable_pointer : Warning<
"casting to dereferenceable pointer removes 'noderef' attribute">, InGroup<NoDeref>;
+def err_builtin_launder_invalid_arg : Error<
+ "%select{non-pointer|function pointer|void pointer}0 argument to "
+ "'__builtin_launder' is not allowed">;
+
} // end of sema component.