summaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-10-10 21:08:28 +0000
committerErich Keane <erich.keane@intel.com>2019-10-10 21:08:28 +0000
commit726918e196b413bcd80f08494c061fd6b3f26c94 (patch)
treef99f1c3dd2b7112ac694e7b026b6a924dbc27fbc /include/clang
parentc677d420e10769596cb21a859d7896139adc8be5 (diff)
downloadclang-726918e196b413bcd80f08494c061fd6b3f26c94.tar.gz
Fix __builtin_assume_aligned with too large values.
Code to handle __builtin_assume_aligned was allowing larger values, but would convert this to unsigned along the way. This patch removes the EmitAssumeAligned overloads that take unsigned to do away with this problem. Additionally, it adds a warning that values greater than 1 <<29 are ignored by LLVM. Differential Revision: https://reviews.llvm.org/D68824 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-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 bcd059be91..68f2b37950 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -2853,6 +2853,10 @@ def err_alignment_dependent_typedef_name : Error<
def err_attribute_aligned_too_great : Error<
"requested alignment must be %0 bytes or smaller">;
+def warn_assume_aligned_too_great
+ : Warning<"requested alignment must be %0 bytes or smaller; assumption "
+ "ignored">,
+ InGroup<DiagGroup<"builtin-assume-aligned-alignment">>;
def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
"%q0 redeclared without %1 attribute: previous %1 ignored">,
InGroup<MicrosoftInconsistentDllImport>;