OSDN Git Service

[Sema] Introduce MaximumAlignment value, to be used instead of magical constants
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 24 Jan 2020 14:01:27 +0000 (17:01 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 24 Jan 2020 14:49:17 +0000 (17:49 +0300)
commit1d0972ff5eab544579c400ee674d5c9c60391ee1
tree3ac32e7fd2437ac854205bdb1e78c51cdf14a0a2
parent08ebd8c79e4b961d57da6c7e06b27db017327e8c
[Sema] Introduce MaximumAlignment value, to be used instead of magical constants

There is llvm::Value::MaximumAlignment, which is numerically
equivalent to these constants, but we can't use it directly
because we can't include llvm IR headers in clang Sema.
So instead, copy-paste the constant, and fixup the places to use it.

This was initially reviewed in https://reviews.llvm.org/D72998
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaChecking.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CXX/drs/dr6xx.cpp
clang/test/Sema/attr-aligned.c